[OpenSCAD] ImplicitCAD 0.0.1

Christopher Olah christopherolah.co at gmail.com
Fri Feb 24 09:42:07 CET 2012


> Out of curiosity could you give an example of the sort of feature that can't
> be replicated?

Sure. In surfcad one could trivially make any homeomorphism of, say, a
sphere or cylinder, that was embedded in 3D space. I can't.

For a specific example, let's look at this surfcad object:
http://www.thingiverse.com/thing:9418

...
A = 1.
B = -5.
a = lambda t: (1./A*cos(A*t), 1./A*sin(A*t))
b = lambda t: (1./B*cos(B*t), 1./B*sin(B*t))
minkowski = cylinderical_surface(lambda t,h:
(20.*(a(t+h)[0]+b(t-h)[0]), 20.*(a(t+h)[1]+b(t-h)[1]),35*h), 1.25)
...

It might be possible for a Human to find an implicit function, and a
computer could certainly approximate one (this would be bad for
performance and loose the whole infinite resolution internal
representation thing), but since there's no general implicit solution
to cylinderical_surface(f) where f is a continuous function,
ImplicitCAD can't allow one to just enter a parametric equation like
this.

(caveat lector: I've never done any serious research into
implicitization. My understanding is that as a general problem there
is no way to compute a solution, but I'm too tired to find a proper
citation.  I've added some papers on implicitization to my reading
list, though I only expect to find some classes I can have ImplicitCAD
support... )

On the other hand, a parametric description of a homeomorphism of a
circle which varies the radius as a function of the angle can
trivially be converted. But if it started doing something more
complicated, we would no longer be able to do so again.

Or again, one could do something like this in ImplicitCAD, since we're
only varying height:

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

(In fact I did so in my OHJ paper on producing lenses with 3D printers
if you want to see an example)

(If the above is not very comprehensible, feel free to say so and I'll
write more when my brain is coherent again.)

> Do you expect to reach 100% compatibility with OpenSCAD?

Well, to begin with, I don't know that OpenSCAD is a clearly defined
goal. There's a lot of things about OpenSCAD that I consider to be
bugs and am breaking compatibility on (for example, my modules support
recursion).

Strictly in terms of the operations provided, the only one I don't see
a practical way to implement is Minkowski sums -- and I think that a
lot of the cases they made sense are replaced by rounded CSG.

That said, its possible that there will be some cases where CGAL and I
will disagree on what the right result is, even though we provide the
same operations. In which case, I will exercise common sense...

Chris


More information about the OpenSCAD mailing list