Grasshopper

algorithmic modeling for Rhino

Here is a shape I want to use for 3D printing:

When baked and exported as an STL file it seems that half the surface normals are reversed, and this makes it impossible to print.

The surface is made by joining 2 Breps, each of which is a Loft surface made from 11 plane curves rotated by different amounts. The first BRep  looks like this

and the second one is the same geometry, but with the curve rotations reversed (x * (-1)):

Apparently performing the curve rotation using reversed values causes the resulting surface normals to be reversed also. I've tried numerous methods (including mesh operations) to reverse them back, but nothing seems to actually do that.  So I am hoping that someone here can point me in the direction of how to do this successfully.

My overall objective is to print parts that look like the old fashioned faceted cut glass bowls and trays.

Views: 1938

Replies to This Discussion

Hallo,

I am just wondering how do you "join" the 2 Breps? Are you using boolean Union? Just asking since the Object seams to be open, which makes it somehow hard to print on most 3d printer I know and to use  boolean Union.

If this is the case maybe you can ue cap to close both breps, then use boolean union and than you can remove the top again.

If you provide a file, I could have a short look.

Hi Richard - I used the simple Brep Join component to join the 2 BReps. I tried the Solid Union component, but that gives an error "Boolean Union set is empty." This happens with and without caps on my original BReps. 

I do understand the images I posted are open BReps (with naked edges no less), but this is not the problem. For the final part I add an inside surface and a top & bottom surface to make a closed shape. Here's an example of one that uses only one twisted surface:

http://www.thingiverse.com/thing:1705829

However, I was able to resolve the surface normal problem by using your suggestion to cap the 2 reverse-twisted surfaces, thus making them solids.  I then BRep Joined them together, and then used Solid Difference to subtract the inside surface (which is a lofted from simple circles.) Here is a pic of the result, which looks pretty good to me:

I try to stay away from the SDiff  function because, as David has said, it takes a long time to calculate. But in this case it does solve a vexing problem, so I'm happy to use it.

I've still got some issues to resolve with my STL slicing software, but at least I now have geometry that I can work with.  Thanks again for your suggestion - I knew there had to be a solution out there somewhere..

Do you have a 3dm file that I can test with?
In print process, I suggest these steps:(if one fail, try one below)


1:Make sure every brep is closed (showedge command to test)
2:Booleanunion command(in your case you have only 2 simple brep, this should be fast)
3:Convert to mesh (showedge check again)
4:Use meshbooleanunion
5:if these ways above all failed, you will have to export these 2 meshes with stl format and use Magics

In Magics use Boolean to join them together.(there is no possibility of failure because Magics is made to deal with EVERY 3d print problem, also include flip normals)



If you still have problems dealing with this model, please upload 3dm file.

Hi Deer - thanks for your suggestions. I was not aware of the Magics software before so I will read about it and see if it would be a help for me.

The key thing I think I have learned about geometry like this, and more specifically about Lofted geometry, is that if you give the Loft function a bunch of complex curves to match the edges of,  the resulting Loft surface does not always match the curves used to make the surface. If you have 2 Loft surfaces that meet at the same curve (for instance, when picking the top curve of an inside and outside Loft surface to make a closed lip), the connection between them will have tiny gaps in various places. I attribute this to truncation and/or roundoff errors in calculating the Lofted surfaces.

However, it seems that using the Cap function actually eliminates this problem by turning an open Brep Loft into a closed/solid one. Of course I have no idea why this happens, but it does eliminate naked edges, edge gaps, and any other weirdness associated with joining Loft surfaces.

Before discovering this method I spent about a week trying all the suggestion you mentioned. None of them worked. All of the Join functions failed, different meshing parameters had no effect, and Mesh Smooth and Weld did not help either.

In pretty much all of these cases the 3D Builder app that I use for fixing/simplifying STL files exported from Rhino would run for a very long time, forever, or add artifacts (like a closed top) that rendered the part unprintable. 

I have changed my GH layout to incorporate the Cap/SDiff functions now, but if you' like a 3DM file that uses the previous method I can certainly go back and create one for you.

There never has been any loft problem during my printing modeling process. Loft is one of the steady and accurate way to create closed brep, compared with patch, networksrf and even sweep. Make sure you did the right operation and also keep rhino tolerance in proper value, default will be fine. Do not change tolerance unless doing special operations. Normally join command will join small gaps, if your loft create rough models it is really odd. During my own process I rarely use any of the mesh commands, most operation is done in nurbs in order to keep everything closed.
If you counter into strange problems please upload with sample file.

You don't need to send it to magics to solve the normal's issues. Most mesh problems can be solved just using Rhino's Mesh Repair Command.

UTO Mesh Tools also has options to Unify Mesh Normal's in the Grasshopper Code.

http://www.food4rhino.com/project/meshedittools?etx 

- Unless you have changed some of the loft setting the loft will match even complex curves perfectly. (Check your loft options) that you are not rebuilding the curves etc)

- The reason it seem to all work after you reworked the code so you capped the separate parts was when you joined the open BREPs shown it was join the top and bottom edges.

- A closed Brep can have inverted normal's (they all have to point out) thus solving my all the normal's matched

- Have a look at Surface Flip Command in GH to flip the Inverted Brep (It still would not have solved you join issue as it was joing the wrong parts (as commented above)

 

Thanks Matt & Deer for your comments. As I said, it looks like I resolved the inverted normal problem by capping the Loft shape which I guess made it clear what was inside and outside, so somehow all normals got pointed to the outside.

But I am still not out of the woods - even though the normals are OK now. I attached a 3DM file baked from my current GH layout. The part is made using 4 basic steps: (1) capping the outside surface which is made by joining 2 surfaces, each lofted from 11 polyline curves, (2) capping the inside surface made by lofting 11 circles, (3) whacking 5 units of height off the bottom of (2) by doing SDiff with a 5 unit high capped cylinder, and (4) using SDiff to subtract (3) from (1)

Step 3 is necessary to allow for a solid bottom thickness of 5 units. All the surfaces are NURBS, none have been converted to meshes.

I would have thought that there would be no problems printing this part because it is made from only solid surfaces.  The 3DM file has no naked edges - which is what I expected. But my generated STL file is 23.19 MB in size and the 3D Builder program says it has errors. The 3DB program "fixes" the errors, but when it does so it closes the top of the part, so that function is useless. 3DB will also simplify the STL file and create a resulting file that is much smaller, but this also has problems that would result in a failed 3D print.

I totally realize that my problem may lie completely outside GH & Rhino and I don't mean to add clutter up this board with extraneous posts. It's just that I have not had issues like this until I tried the idea of joining 2 lofted surfaces that have reverse twists. I have made many parts before that included reverse twists - but not lofted surfaces. Here is just one example: http://www.thingiverse.com/thing:1606442

Attachments:

file checked.

2 single brep with no naked edge.

boolean into 1 brep with no naked edge.

turn to mesh with no naked edge.

everything seems fine.

after you export the stl file I think problem lies in your 3db program.

Hi Deer - thanks for taking a look at the file. What I discovered is that by using the Cap method the Rhino Solid/Union method works OK.  It would always fail when I was baking non-capped BRep surfaces that connected with each other.

As you know, when SOlid/Union works it takes all the baked parts and makes them into a single object. Because there are no naked edges this then exports as an STL file with no errors.  3D Builder still significantly reduces the size of the STL file (the process is called decimation for some reason) and the results slice OK.

My understanding is that 3D Builder uses the same algorithms as NetFabb, and that is considered to be the best fixer for STL files, at least here in the US.

I really appreciate all the help I got here. As a totally self-taught GH/Rhino user I have learned a lot for sure, but still have a long way to go.

You did study very hard.
Good luck!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service