is there any node or plugin that gives a good result when offseting a brep?
i used panda a while ago, and it gave me good results… but panda is gone. are there any alternatives?
Very interesting. The “Holy Grail” of CAD dreams. Unfortunately, testing so far results in failure most of the time. For starters, if I plug a well formed “Closed Brep” into your component without any other inputs connected first (distance, solid, extend), the code hangs for 5.5 minutes!!!??
The attached model has four “hulls”:
- Box (standard Domain Box)
- proa hull (double-ended)
- chined hull (OPEN) (same as ‘chined hull’ but with open cockpit)
- chined hull (the only one that works well?)
shell_2020Dec5a.gh (114.7 KB)
By the way, in “real world” practice, being able to specify a different thickness for one or more faces can be very useful. A boat’s deck would be thicker than hull surfaces, for example.
I like your Offset Brep routine Dale - it’s a much cleaner way than my usual method of transforming a Lofted surface into a solid (closed) Brep. But the Extend value does not seem to do anything. Here’s an image of a typical shape for me that’s been made 3D printable using your routine:
Notice that the top becomes a beveled/slanted/raised surface instead of a flat one. This is not a severe problem - it would print OK - but a flat/horizontal surface would print better.
The bottom has a similar shape, but that’s not an issue for me since I’ll be adding a solid bottom that encompasses the slanted edge your routine makes.
I looked at your C code and it is quite straightforward - I understand how using the Rhino CreateOffsetBrep routine would produce similar results to the GH Offset Curve function. But I get the same results with the Extend parameter set to either True or False.
I tried editing the code myself but I know nothing of C syntax so my efforts created only compile errors. (Fortran will do that to you when it’s the first language learned.) Apparently I’m missing something about what really going on with CreateOffsetBrep, but what could it be? Thanks for any info you can provide.
I believe ‘extend’ depends on the shape. You can see what it does by toggling the Boolean in @dale’s example test_offset_brep.gh. It appears to me that all brep faces get the offset surface treatment and then, if ‘extend’ is True, those offset surfaces are extended until they intersect. If ‘extend’ is False, the gaps between offset faces are filled with a radius (fillet?) surface.
In the test model I posted, the result of toggling both of these Boolean inputs is more mysterious, often resulting in no output at all.
Yes, that makes sense for shapes with corners - like an extruded polygon. When I use a polygonal shape I almost always give it rounded corners - even if it’s a star-type shape. I’ll have to do some testing with shapes like that.
I’m guessing however that the top and bottom surfaces will be extended/shortened like they are now. I guess I could always whack off the top to make it flat. But doing that just duplicates the SDiff I normally use for the bottom - so there might not be much of an overall gain for me.
Try with the scale component, at the end it is the same.
nope its not