Where's my Brep?

I found a nice teardrop shape curve routine here that makes closed planar curves like this:

Screenshot_1

So to make a 3D teardrop shape I revolve it 180 degress like this:

Screenshot_2

But that shape is an invalid Brep. :hot_face:

So I tried RebuildSrf with 200 points for u and v. But that produced an Untrimmed surface. What I need is a closed Brep - because I want to combine the teardrop with another Closed Brep for 3D printing.

The teardrop routine is very simple, and it does make a nice closed planar curve. I thought for sure RevSrf would produce a closed Brep. But it doesn’t. And I can’t find a way to make it a Brep. Is there one?

teardrop.gh (6.4 KB)

Even a standard sphere is not a “Closed Brep”. Neither is a revolved circle.


teardrop_2023Jan30a.gh (8.1 KB)

P.S. Funny thing though… :thinking: Note the Flip Curve and see what happens when you skip it.


teardrop_2023Jan30b.gh (10.4 KB)

Thanks Joseph - your solution is very interesting indeed. Even though the teardrop is an untrimmed surface, when it is joined to a closed Brep the result is a closed Brep - which is what I’m looking for. So that’s surprising, but good nevertheless.

It’s not at all clear to me why revolving half of the curve 360 degrees is better than revolving the whole curve 180 degrees, but I’m not going to look a gift horse in the mouth.

Me neither. Seems that sometimes it works and sometimes it doesn’t. In my usual “Get 'er Done” fashion, I just move on. :sunglasses:

Great minds think alike.

Maybe I’m missing something but revolving a circle by 180° creates a single untrimmed surface where half of its normals are facing in and the other half of the normals are facing outwards. This is expected because of the relation of the curve and the axis of revolution. The important thing is that the result is a single surface with partially opposing normals.

The problem can be visualised by revolving a deformed circle. The result of the 180° revolution is an untrimmedd surface where the edges do not line up.

If the circle is split in half and one of the two remaining arc segments is flipped, the normals of the revolved surfaces are both pointing in the same direction. The two surfaces can be joined into a closed brep no matter if the normals direction and the result is a closed brep.

If the result of the revolution should be a closed brep, both halves of the teardrop shape need to be revolved by 180°.

teardrop_split_revolve.gh (42.8 KB)

1 Like

Wow Martin - it never occurred to me to consider the surface normals. But I see your point about them not being properly aligned across the whole surface. So I thought I’d try a trick - keep in mind that I don’t use Rhino and I really have no idea how it works.

My idea was to create the final teardrop by combining 2 half teardrops, the first by rotating half of the complete teardrop curve (a la Joseph_Oster) 180 degrees clockwise, and the other half by rotating it 180 degrees counter clockwise. My hope was that, if I were lucky, joining the 2 would create a closed Brep.

Would you believe this actually works! And it makes a huge difference in my final STL file - it cut the total number of triangles down from around 12 million to a bit less than 6 million.

teardrop2.gh (7.9 KB)

Of course you can revolve two halves 180° but why don’t you revolve one half 360°?

What is the expected benefit of having a closed brep versus an untrimmed surface when the object is converted to a mesh and exported as STL?

Did you convert one teardrop surface / brep to a mesh and then create all the copies and export?

How many of those teardrops?

See attached as well.

Surface_Teardrop.gh (48.3 KB)

Excellent analysis @martinsiegrist, thank you. Rather bizarre though.

The reason I added Flip Curve to my version ‘b’ yesterday was because I remembered this comment by @benedict a few days ago in another thread:

Basically if you make a boolean union (addition) between a positive and a negative volume, you’ll end up with a substraction.

This (below) uses the other half of the split curve, unflipped:

1 Like

Thanks @Joseph_Oster :slight_smile:

Unless surfaces are joined to a closed polysurface, I’m tring to make sure the curves are in the right direction for revolutions or sweeps…

Of course you can revolve two halves 180° but why don’t you revolve one half 360°?

Because a 360 degree rotation of 1/2 produces an Untrimmed surface, not a closed Brep

========================================================================

What is the expected benefit of having a closed brep versus an untrimmed surface when the object is converted to a mesh and exported as STL?

Because of the way Rhino works, any time you export anything other than closed Breps as an STL file there are likely to be mesh errors in the STL. I think the reason for this is that there are mis-matched vertices with any thing other than closed Breps. In most cases the problems with these can be resolved by running the resulting STL file through Netfabb, but for large STL files this does not always work. And it is annoyingly (for me anyway) time consuming.

I never convert my final geometry into a mesh before exporting as an STL. For reasons I don’t understand the STL files Rhino creates from it’s native internal formats are better than those it creates from meshes. “Better” means they print with smoother curves and surfaces.

========================================================================

Did you convert one teardrop surface / brep to a mesh and then create all the copies and export?

No. I combine (Brep Join) the teardrop with other Breps and then export that as an STL file. I don’t understand how meshes work and can never seem to get them to do what I want. Plus they react to changing variable inputs in ways that are surprising and unexpected (at least to me,)

=======================================================================

How many of those teardrops?

It varies. For what I’m currently working on the number is basically determined by total print time. This one took a bit less than 15 1/2 hours:

But this one, which is maybe 30% larger, would take around 34 hours:

Screenshot_1

======================================================================

3D printing is a hobby for me, so I have never had any formal training, and never had to meet anyone else’s specifications for anything. I do know a fair amount about how software that creates 3D geometry works (I used to write it), so I try to use methods that produce good results as easily as possible.

1 Like

Interesting! Thanks for the insight.

Hey Martin, I was lead to this thread because @Joseph_Oster mentionned me. If you like to conditionally turn the surface in GH, you can use this simple c# node:

 if (B.SolidOrientation == BrepSolidOrientation.Inward) B.Flip;
A=B;

I usually use it after every sweep in GH.

Have a nice day

Ben

(BTW, you are situated in Basel, right?)

1 Like

Thanks Ben, I live in Liestal.

Nice, next time I’ll go visit my parents, we may have a beer:)

1 Like