Grasshopper

algorithmic modeling for Rhino

This bowl is made from a Loft surface generated from 11 curves rotated by different amounts:

I can bake and export this geometry from Rhino with no problems - it has no naked edges, is manifold, and the resulting STL file has no problems. I was going to make a 3D print of it but I thought I could make it even more interesting.

When I make a duplicate piece of geometry with reversed curve rotation values and combine the 2 together I get this interesting result:

However, after baking this geometry the exported STL file has a huge number of errors - there are literally thousands of flipped normals, multiple mesh parts, and disconnected triangles.

I have tried lots of things to resolve this and none of them worked: converting to meshes in GH, GH mesh smooth, Rhino Solid Union, Mesh Repair, Align Normals, etc. I use 3D Builder to correct STL problems, but it can't fix this one.

An even more interesting shape happens when I twist the above shape in one direction, and then add it to another that is twisted in the opposite direction:

Of course the STL file for this one is even worse because it just compounds the previous problems.

Is there any way to resolve these problems?  My GH file is somewhat messy and perhaps a bit obscure, but I'd be happy to clean it up and share it with anyone who thinks there is a way to get this puppy working.

Views: 927

Replies to This Discussion

I have a feeling your having similar problems as before with your last code, if you can upload the code and the references curves i should be simple enough to solve.  

Thanks Matt - I seriously do hope the fix is simple for you.  I've been having a rough time with this one.  I tweaked my GH file to hopefully make it more understandable; the full file has parts that allow the shape to be either a vase or an LED lamp, but the LED stuff is not relevant to my problem.

All the geometry is in the GH file, I never use Rhino to initiate designs. I am looking forward to seeing what you think about my approach.

Attachments:

Hmm so i found you just needed to change the join into a Boolean union to create one solid of the 2 shapes before you boolean it out to make the vase... shame the Boolean Union in Grasshopper or even Rhino fails after about 5 mins.

So i went back to the drawing board for you as i could see the shapes you have been creating are made up of strips, I have not been able to totally code these (Currently there require some manual editing before re importing into Grasshopper as a single polysurface but its a start and it means you can create printable options in the end.) I would be possible to code this workflow but i have run out of time for tonight.

Meshing and Mesh Repair done in Rhino.

Can't seem to get the files to load at the moment so hears a screen capture of the code for tonight  Edits in RED Groups

Oh wow - this is a major surprise for sure.

I see that you are doing stuff to the underlying planer curves I use to generate the Loft surface. I understand these curves are constructed from a number of separate curve & line segments, but it never occurred to me that that would affect the resulting Loft surface. I can see how that led you to the concept of strips, which is something I never even considered. So I am naturally rather confused about exactly what's going on with your method, and more fundamentally, why it is necessary to deal with the individual planer curves and their segments and not just the resulting Loft surface.

There are a number of GH components in your layout that I have never used before, so I need to look into those.  Hopefully you will be able to upload your GH file so I can see exactly how everything is hooked together and what the resulting geometry looks like.

FYI I did try substituting the GH Sunion function for the Join function I used to join the Outside and Reverse Outside Breps. But SUnion failed with "Boolean Union set is empty" for both the capped and uncapped Breps. So it's pretty clear I need to do something significantly different.

Thanks much for your help with this; I can see I've got a bunch more stuff to learn about.

Files Attached Hopefully

Attachments:

Got them - thanks.

Looks like I'll be busy for a while.

Hi Matt - here's some follow-up on what I have discovered and done after looking at your updated GH layout.

The first thing I did was tweak it so it did not reference any Rhino geometry. This was easy to do once I figured out how you use only a small portion of each of my generated curves to make the 360 degree Loft surface. I had a huge AHA! moment when I realized the complete Loft surface really only needs a small portion of the generated curves rotated around to form a closed (except for top & bottom) surface. That is a major new insight for me and I appreciate you pointing it out.

I also tweaked the Twist angle parameter a bit so the resulting positive and negative Twist surfaces, when combined, yielded a result that was closer to my original shape. This is when I discovered something very interesting.

When I baked/exported the result using just one of the 2 twisted surfaces I got an STL file that had no errors, that 3D Builder was able to simplify from a 37 MB file to a 3 MB file, and that sliced A-OK. But, when I combined the left and right twisted surfaces, I was back with my same set of problems: the exported STL file had many errors, could not be fixed, and did not slice properly.

I went back to my original layout that uses the complete set of generated curves to create the Loft surface and found I got exactly the same results - using only one twisted surface worked fine, but nothing worked when the left and right twisted surfaces were combined. By nothing I mean I tried all the standard methods (GH Join and Sunion, Rhino Solid/Union, Join, etc.) What I think this means is that the Loft surface behaves the same, and apparently is the same, regardless if it is generated by rotating strips or by using complete closed curves.

Furthermore, I am guessing the problems with the combined/exported STL file made from both left and right twisted surfaces has to do with overlapping/coincident parts of each one - like the top & bottom planar surfaces and some of the wiggly parts.

If I am correct about this then it suggests to me that there is some sort of glitch in Rhino's STL Export function. This is surprising to me since I though an STL file only paid attention to the external shape of thngs,and did not know or care about any inside stuff. Of course this is all conjecture on my part, but at least for now seems it will be impossible for me to actually print the double-twisted geometry.

Problem Solved!

After more experimenting I found a solution to my original problem. Here it is:

I just had to tweak the single-twisted Breps before baking them into Rhino. By converting the 2 twisted BReps to meshes and then doing some cleanup operations on them I was able to do a final Mesh Join that resulted in a single mesh. 

Baking this mesh and exporting it from Rhino resulted in an STL file that still had errors, but this time 3D Builder was able to fix them. The result was an STL file that is sliceable and printable.  

Using the above method I was even able to add a fancy curved lip to the top of the bowl (a 2-rail sweep) that replaces the original plain flat face.

Please to see you have found a solution that works.

Regarding the STL as i understand it exports everything not just the outside shape/s. I don't think there is any Glitch as it would have been solved long ago considering how much printing etc is done using STL files. 

One thing to note is it is possible to have single mesh that is made up of 2 or more mesh parts that are not joined some can be open and others closed too. This is something that is not possible with Breps. 

(Give it a try, make a few meshes some intersecting some not. Join them, they will create a single open mesh. then if you run the command split disjointed mesh in Rhino it will return all the mesh parts again. when you create an single STL file this will do the same.

Ps Do keeping working with your files like the one you sent me with processes grouped and every in order and you will find it much easier to find/ understand errors both in small codes like this and much larger more complex one.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service