[OpenSCAD] Unusual hull() and minkowski modelling

Ronaldo rcmpersiano at gmail.com
Sat Jun 18 17:27:24 EDT 2016


Rudolf,

We have two different tricks to do the same thing. In mine, I hack the
system to generate a path that is not provided by the language. In yours, a
very thin polyhedron takes the place of my hack. I agree that my hack has a
short live and your trick should be valid in the future, but that is the
only advantage of it.

I have compared the running time of my sweep with yours. The preview of your
paths with my sweep took less than a second and the render spent 4min. I
gave up to preview that paths with your sweep in my old machine so I
shortened the paths. With a 16 segment path, the preview of your sweep took
more than 6min. On the other hand, the double sphere sweep with my hack took
13min to preview. I didn't try render any of them.

So, your robust trick is a lot slower than doing the right thing: minkowski
the solid with a real line. The reasons are clear to me. The path simulated
by thin polyhedron is a non-convex polyhedron with a lot of vertices. Even
if you do a convex decomposition of the solid to be swept, the path remains
non convex and it will require a lot of effort to be decomposed and
processed. If you have a real polyline, its convex decomposition is trivial.
So, the main effort will be the convex decomposition of the solid and the
union of the extrusions.

I insist that the main point is not the particular hack I devised but the
simplicity and efficiency of mixing 3D objects with lower dimension ones in
some cases. I see no additional complexity in mixing different dimensions in
OpenSCAD. It is enough not to send lower dimension shapes to CGAL and ignore
them in STL generation. The lower dimension objects would be used only for
display purposes and as input of some operations. Observe that the object
circle3() I defined above is able to be boolean operated with real 3D
solids. They seems to be witchcraft but they are real!

I miss lower dimension primitives like segment() in OpenSCAD from my first
experience with the system. So I created my own library to draw them in a
similar way you did. I use them a lot to display lines and facets during
model building debugging. But I cannot render them because the time CGAL
requires to union them is 
unaffordable.



--
View this message in context: http://forum.openscad.org/Unusual-hull-and-minkowski-modelling-tp17730p17758.html
Sent from the OpenSCAD mailing list archive at Nabble.com.




More information about the Discuss mailing list