ImplicitCAD 0.0.1

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

ImplicitCAD 0.0.1

Christopher Olah
Hey all,

I'm ecstatic to announce the release of ImplicitCAD 0.0.1. ImplicitCAD
provides a parser for OpenSCAD and extends it in a number of very
exciting ways, including providing rounded unions, differences,
intersections, and extrusions. I think this can empower users to make
more professional looking objects.

The 0.0.1 release notes are here:
http://christopherolah.wordpress.com/2012/02/06/implicitcad-0-0-1-release/

And the GitHub page is here:
https://github.com/colah/ImplicitCAD

ImplicitCAD is ready for and desperately needs beta users. If you have
some time to play around with it, I'd love your feedback. There are
lots of bugs to be found and fixed.

I'd be particularly interested in what the OpenSCAD community thinks
of the changes I've made to the language. Am I insane, or going in an
interesting direction?

Get Excited and Make Things!

Chris

Reply | Threaded
Open this post in threaded view
|

Re: ImplicitCAD 0.0.1

Brad Pitcher
Looks really cool! :) I'm excited to try it out but I've run into issues installing for github. Actually, "cabal install" works fine:

brad@inspiration:~/code/ImplicitCAD$ cabal install
Resolving dependencies...
Configuring implicit-0.0.1...
Preprocessing library implicit-0.0.1...
Preprocessing executables for implicit-0.0.1...
Building implicit-0.0.1...
Registering implicit-0.0.1...
Installing library in /home/brad/.cabal/lib/implicit-0.0.1/ghc-7.0.3
Installing executable(s) in /home/brad/.cabal/bin
Registering implicit-0.0.1...

but then ghci is unable to find it, and throws this error:

Prelude> import Graphics.Implicit
module is not loaded: `Graphics.Implicit' (./Graphics/Implicit.hs)

It seems that ghci doesn't know to look in ~/.cabal/lib for libraries, because if I try it from that directory it works fine. How to I tell ghci to look there?
Thanks, Brad

On Mon, Feb 6, 2012 at 10:18 PM, Christopher Olah <[hidden email]> wrote:
Hey all,

I'm ecstatic to announce the release of ImplicitCAD 0.0.1. ImplicitCAD
provides a parser for OpenSCAD and extends it in a number of very
exciting ways, including providing rounded unions, differences,
intersections, and extrusions. I think this can empower users to make
more professional looking objects.

The 0.0.1 release notes are here:
http://christopherolah.wordpress.com/2012/02/06/implicitcad-0-0-1-release/

And the GitHub page is here:
https://github.com/colah/ImplicitCAD

ImplicitCAD is ready for and desperately needs beta users. If you have
some time to play around with it, I'd love your feedback. There are
lots of bugs to be found and fixed.

I'd be particularly interested in what the OpenSCAD community thinks
of the changes I've made to the language. Am I insane, or going in an
interesting direction?

Get Excited and Make Things!

Chris
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad

Reply | Threaded
Open this post in threaded view
|

Re: ImplicitCAD 0.0.1

Christopher Olah
> It seems that ghci doesn't know to look in ~/.cabal/lib for libraries,
> because if I try it from that directory it works fine. How to I tell ghci to
> look there?

The relevant option seems to be -L~/.cabal/lib . Alternatively, some
distros seem happier with sudo cabal install.

If someone can confirm that -L solves the issues, I'll update the docs.

Thanks for trying ImplicitCAD!

Chris

Reply | Threaded
Open this post in threaded view
|

Re: ImplicitCAD 0.0.1

Brad Pitcher
On Tue, Feb 7, 2012 at 7:53 AM, Christopher Olah <[hidden email]> wrote:
The relevant option seems to be -L~/.cabal/lib . Alternatively, some

Unfortunately that didn't work for me either
 
distros seem happier with sudo cabal install.

I tried this too, and no love. I should have mentioned I am running 64-bit Ubuntu 11.10. Actually this seems to have really messed up my cabal database, now I can't cabal install without sudo, even after purging cabal-install and rm -rf ~/.cabal
 

If someone can confirm that -L solves the issues, I'll update the docs.


Another update you may want to make while you're in there. Under the instructions for installing from github, you say to run "cabal install", but "cabal update" is needed first.
 
Thanks for trying ImplicitCAD!


No problem, thanks for writing it! :) 
Reply | Threaded
Open this post in threaded view
|

Re: ImplicitCAD 0.0.1

Christopher Olah
>> The relevant option seems to be -L~/.cabal/lib . Alternatively, some
>
> Unfortunately that didn't work for me either

Grr! Silly computer

>> distros seem happier with sudo cabal install.
>
> I tried this too, and no love. I should have mentioned I am running 64-bit
> Ubuntu 11.10. Actually this seems to have really messed up my cabal
> database, now I can't cabal install without sudo, even after purging
> cabal-install and rm -rf ~/.cabal

Ubuntu seems to have strange cabal issues.

Theoretically, cabal under sudo shouldn't be touching ~/.cabal -- that
isn't even its home folder! Maybe try rm -rf /root/.cabal/ ?

What error messages did cabal give?

If you get it working, try -L/home/yournamehere/.cabal/lib , and maybe
also -L ~/.cabal/lib in case the no space wasn't right.

> Another update you may want to make while you're in there. Under the
> instructions for installing from github, you say to run "cabal install", but
> "cabal update" is needed first.

D'oh! And I even had non-development one right!

Still, not updating it till we have a fix. It seems my advice is
making things worse!

> No problem, thanks for writing it! :)

No problem, I had an itch to scratch. :)

Reply | Threaded
Open this post in threaded view
|

Re: ImplicitCAD 0.0.1

Christopher Olah
Another thought, you probably have to update sudo cabal separately...
Try sudo cabal update; sudo cabal install implicit ?

On Tue, Feb 7, 2012 at 11:33 AM, Christopher Olah
<[hidden email]> wrote:

>>> The relevant option seems to be -L~/.cabal/lib . Alternatively, some
>>
>> Unfortunately that didn't work for me either
>
> Grr! Silly computer
>
>>> distros seem happier with sudo cabal install.
>>
>> I tried this too, and no love. I should have mentioned I am running 64-bit
>> Ubuntu 11.10. Actually this seems to have really messed up my cabal
>> database, now I can't cabal install without sudo, even after purging
>> cabal-install and rm -rf ~/.cabal
>
> Ubuntu seems to have strange cabal issues.
>
> Theoretically, cabal under sudo shouldn't be touching ~/.cabal -- that
> isn't even its home folder! Maybe try rm -rf /root/.cabal/ ?
>
> What error messages did cabal give?
>
> If you get it working, try -L/home/yournamehere/.cabal/lib , and maybe
> also -L ~/.cabal/lib in case the no space wasn't right.
>
>> Another update you may want to make while you're in there. Under the
>> instructions for installing from github, you say to run "cabal install", but
>> "cabal update" is needed first.
>
> D'oh! And I even had non-development one right!
>
> Still, not updating it till we have a fix. It seems my advice is
> making things worse!
>
>> No problem, thanks for writing it! :)
>
> No problem, I had an itch to scratch. :)

Reply | Threaded
Open this post in threaded view
|

Re: ImplicitCAD 0.0.1

donbright
I think its very very cool. Thanks for sharing it.

IMHO it could use a little intro for people who dont understand ghci /
haskell /etc .

Im trying to run the examples... i copy/pasted the example into the
ghci interpreter, i get this:

Prelude>
<interactive>:1:4: parse error on input `='
Prelude>
<interactive>:1:25: parse error on input `,'
Prelude>
<interactive>:1:30: parse error on input `]'
Prelude> Prelude>
<interactive>:1:5: parse error on input `='


So i put the example into a file, x.iscad, and tried 'ghci x.iscad'. i got this:

Warning: ignoring unrecognised input `x.icad'

PS I love the unicode:

./Graphics/Implicit/Definitions.hs: Triangle = (ℝ3, ℝ3, ℝ3)

-DB


On Tue, Feb 7, 2012 at 10:36 AM, Christopher Olah
<[hidden email]> wrote:

> Another thought, you probably have to update sudo cabal separately...
> Try sudo cabal update; sudo cabal install implicit ?
>
> On Tue, Feb 7, 2012 at 11:33 AM, Christopher Olah
> <[hidden email]> wrote:
>>>> The relevant option seems to be -L~/.cabal/lib . Alternatively, some
>>>
>>> Unfortunately that didn't work for me either
>>
>> Grr! Silly computer
>>
>>>> distros seem happier with sudo cabal install.
>>>
>>> I tried this too, and no love. I should have mentioned I am running 64-bit
>>> Ubuntu 11.10. Actually this seems to have really messed up my cabal
>>> database, now I can't cabal install without sudo, even after purging
>>> cabal-install and rm -rf ~/.cabal
>>
>> Ubuntu seems to have strange cabal issues.
>>
>> Theoretically, cabal under sudo shouldn't be touching ~/.cabal -- that
>> isn't even its home folder! Maybe try rm -rf /root/.cabal/ ?
>>
>> What error messages did cabal give?
>>
>> If you get it working, try -L/home/yournamehere/.cabal/lib , and maybe
>> also -L ~/.cabal/lib in case the no space wasn't right.
>>
>>> Another update you may want to make while you're in there. Under the
>>> instructions for installing from github, you say to run "cabal install", but
>>> "cabal update" is needed first.
>>
>> D'oh! And I even had non-development one right!
>>
>> Still, not updating it till we have a fix. It seems my advice is
>> making things worse!
>>
>>> No problem, thanks for writing it! :)
>>
>> No problem, I had an itch to scratch. :)
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad

Reply | Threaded
Open this post in threaded view
|

Re: ImplicitCAD 0.0.1

Christopher Olah
> I think its very very cool. Thanks for sharing it.

You're very welcome :)

> IMHO it could use a little intro for people who dont understand ghci /
> haskell /etc .

Will do.

> Im trying to run the examples... i copy/pasted the example into the
> ghci interpreter, i get this:
>
> Prelude>
> <interactive>:1:4: parse error on input `='
> Prelude>
> <interactive>:1:25: parse error on input `,'
> Prelude>
> <interactive>:1:30: parse error on input `]'
> Prelude> Prelude>
> <interactive>:1:5: parse error on input `='

/sigh. This is one of the really stupid things about ghc. Interactive
Haskell and normal haskell have slightly different syntaxes for silly
reasons. In particular, every assignment in interactive haskell must
be preceded by a 'let'.

This will apparently be fixed in upcoming versions of ghc.

> So i put the example into a file, x.iscad, and tried 'ghci x.iscad'. i got this:
>
> Warning: ignoring unrecognised input `x.icad'

Save it as foo.hs, then run "runhaskell foo.hs". Or if you want to
compile it and then run a compiled version "ghc foo.hs" and then run
the binary.

> PS I love the unicode:
>
> ./Graphics/Implicit/Definitions.hs: Triangle = (ℝ3, ℝ3, ℝ3)

You're the first person to approve of it!

> -DB
>
>
> On Tue, Feb 7, 2012 at 10:36 AM, Christopher Olah
> <[hidden email]> wrote:
>> Another thought, you probably have to update sudo cabal separately...
>> Try sudo cabal update; sudo cabal install implicit ?
>>
>> On Tue, Feb 7, 2012 at 11:33 AM, Christopher Olah
>> <[hidden email]> wrote:
>>>>> The relevant option seems to be -L~/.cabal/lib . Alternatively, some
>>>>
>>>> Unfortunately that didn't work for me either
>>>
>>> Grr! Silly computer
>>>
>>>>> distros seem happier with sudo cabal install.
>>>>
>>>> I tried this too, and no love. I should have mentioned I am running 64-bit
>>>> Ubuntu 11.10. Actually this seems to have really messed up my cabal
>>>> database, now I can't cabal install without sudo, even after purging
>>>> cabal-install and rm -rf ~/.cabal
>>>
>>> Ubuntu seems to have strange cabal issues.
>>>
>>> Theoretically, cabal under sudo shouldn't be touching ~/.cabal -- that
>>> isn't even its home folder! Maybe try rm -rf /root/.cabal/ ?
>>>
>>> What error messages did cabal give?
>>>
>>> If you get it working, try -L/home/yournamehere/.cabal/lib , and maybe
>>> also -L ~/.cabal/lib in case the no space wasn't right.
>>>
>>>> Another update you may want to make while you're in there. Under the
>>>> instructions for installing from github, you say to run "cabal install", but
>>>> "cabal update" is needed first.
>>>
>>> D'oh! And I even had non-development one right!
>>>
>>> Still, not updating it till we have a fix. It seems my advice is
>>> making things worse!
>>>
>>>> No problem, thanks for writing it! :)
>>>
>>> No problem, I had an itch to scratch. :)
>> _______________________________________________
>> OpenSCAD mailing list
>> [hidden email]
>> http://rocklinux.net/mailman/listinfo/openscad
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad

Reply | Threaded
Open this post in threaded view
|

Re: ImplicitCAD 0.0.1

nophead
In reply to this post by Christopher Olah
Hi Chris,
  I am interested in how you implemented the rounded union, etc. Is it faster than Openscad's Minkowski? What library do you use for the rendering? Is it something that could be ported to Openscad?


On 7 February 2012 06:18, Christopher Olah <[hidden email]> wrote:
Hey all,

I'm ecstatic to announce the release of ImplicitCAD 0.0.1. ImplicitCAD
provides a parser for OpenSCAD and extends it in a number of very
exciting ways, including providing rounded unions, differences,
intersections, and extrusions. I think this can empower users to make
more professional looking objects.

The 0.0.1 release notes are here:
http://christopherolah.wordpress.com/2012/02/06/implicitcad-0-0-1-release/

And the GitHub page is here:
https://github.com/colah/ImplicitCAD

ImplicitCAD is ready for and desperately needs beta users. If you have
some time to play around with it, I'd love your feedback. There are
lots of bugs to be found and fixed.

I'd be particularly interested in what the OpenSCAD community thinks
of the changes I've made to the language. Am I insane, or going in an
interesting direction?

Get Excited and Make Things!

Chris
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad

Reply | Threaded
Open this post in threaded view
|

Re: ImplicitCAD 0.0.1

Christopher Olah
>   I am interested in how you implemented the rounded union, etc. Is it
> faster than Openscad's Minkowski? What library do you use for the rendering?
> Is it something that could be ported to Openscad?

I had to write my own graphics engine. ImplicitCAD doesn't use any
external libraries for rendering, it does everything.

The techniques are outlined in this blog post.

http://christopherolah.wordpress.com/2011/11/06/manipulation-of-implicit-functions-with-an-eye-on-cad/

It's fundamentally tied to my implicit function strategy. I have some
ideas for implementing it in other approaches, but nothing usable yet.

I haven't bench marked it against Minkowski, but there aren't really
analogous test cases between them. You can use Minkowski to round the
whole object and I can't do that. On the other hand, I can round the
interface between two objects without touching anything else.

That said, the performance difference between rounded CSG and normal
CSG is basically negligible in ImplicitCAD... Performance in
ImplicitCAD scales differently than in OpenSCAD. Unless your object is
being rendered symbolically, only the bounding box and resolution of
your object will (in practical cases) significantly effect the speed
of rendering.

>
> On 7 February 2012 06:18, Christopher Olah <[hidden email]>
> wrote:
>>
>> Hey all,
>>
>> I'm ecstatic to announce the release of ImplicitCAD 0.0.1. ImplicitCAD
>> provides a parser for OpenSCAD and extends it in a number of very
>> exciting ways, including providing rounded unions, differences,
>> intersections, and extrusions. I think this can empower users to make
>> more professional looking objects.
>>
>> The 0.0.1 release notes are here:
>> http://christopherolah.wordpress.com/2012/02/06/implicitcad-0-0-1-release/
>>
>> And the GitHub page is here:
>> https://github.com/colah/ImplicitCAD
>>
>> ImplicitCAD is ready for and desperately needs beta users. If you have
>> some time to play around with it, I'd love your feedback. There are
>> lots of bugs to be found and fixed.
>>
>> I'd be particularly interested in what the OpenSCAD community thinks
>> of the changes I've made to the language. Am I insane, or going in an
>> interesting direction?
>>
>> Get Excited and Make Things!
>>
>> Chris
>> _______________________________________________
>> OpenSCAD mailing list
>> [hidden email]
>> http://rocklinux.net/mailman/listinfo/openscad
>
>
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
>

Reply | Threaded
Open this post in threaded view
|

Re: ImplicitCAD 0.0.1

tbuser
I'm curious, have you done any benchmarks at all to see how fast ImplicitCAD compiles openscad code to STL compared to openscad itself?

On Wed, Feb 8, 2012 at 9:58 PM, Christopher Olah <[hidden email]> wrote:
That said, the performance difference between rounded CSG and normal
CSG is basically negligible in ImplicitCAD... Performance in
ImplicitCAD scales differently than in OpenSCAD. Unless your object is
being rendered symbolically, only the bounding box and resolution of
your object will (in practical cases) significantly effect the speed
of rendering.

Reply | Threaded
Open this post in threaded view
|

Re: ImplicitCAD 0.0.1

Christian Siefkes
In reply to this post by Christopher Olah
Hi Christopher, hi all,

On 02/07/2012 07:18 AM, Christopher Olah wrote:
> I'm ecstatic to announce the release of ImplicitCAD 0.0.1. ImplicitCAD
> provides a parser for OpenSCAD and extends it in a number of very
> exciting ways, including providing rounded unions, differences,
> intersections, and extrusions. I think this can empower users to make
> more professional looking objects.

I'm very impressed, especially since I'm a big Haskell fan and think that
creating 3D designs in Haskell is a cool idea :-)

However, I note that the implicit package at
http://hackage.haskell.org/package/implicit lacks module documentation --
the list of module names is there, but the usual links to the Haddock
documentation are missing. Maybe you could fix that? The intro at
https://github.com/colah/ImplicitCAD gives some nice examples, but I think
it would be great to have some more systematic overview of what's actually
possible in ImplicitCAD...

In any case, thanks for that exciting piece of software!

        Christian

--
|------- Dr. Christian Siefkes ------- [hidden email] -------
| Homepage: http://www.siefkes.net/ | Blog: http://www.keimform.de/
|    Peer Production Everywhere:       http://peerconomy.org/wiki/
|---------------------------------- OpenPGP Key ID: 0x346452D8 --
...the deadlines whirled past us like dry leaves in a gust of wind...
        -- Neil Gaiman


signature.asc (262 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ImplicitCAD 0.0.1

Christopher Olah
> I'm curious, have you done any benchmarks at all to see how fast ImplicitCAD
> compiles openscad code to STL compared to openscad itself?

I haven't done anything rigorous as far as test go.

ImplicitCAD has very different performance characteristics than
OpenSCAD, because of the implicit function approach. My expectation
would be:

* OpenSCAD and ImplicitCAD are about the same speed for very simple objects.
* OpenSCAD quickly takes the lead for moderately complicated objects
* ImplicitCAD is faster again for very complicated objects.

I'm hoping that I can expand ImplicitCAD's symbolic rendering
capabilities (the fast "simple" category), but we'll see.

> However, I note that the implicit package at
> http://hackage.haskell.org/package/implicit lacks module documentation --
> the list of module names is there, but the usual links to the Haddock
> documentation are missing. Maybe you could fix that? The intro at
> https://github.com/colah/ImplicitCAD gives some nice examples, but I think
> it would be great to have some more systematic overview of what's actually
> possible in ImplicitCAD...

The haddock documentation builds at my end. I think I'm still in the
queue waiting for my documentation to be built... For 0.0.0 it took
about a week until the documentation links appeared. This delay is a
known property of Hackage, and fully expected.

If it doesn't show up in the next few days, I'll start poking people. :)

> In any case, thanks for that exciting piece of software!

You're very welcome.

Chris

Reply | Threaded
Open this post in threaded view
|

Re: ImplicitCAD 0.0.1

Gordon Wrigley
In reply to this post by Christopher Olah
I find this quite interesting from a tech point of view.
From what I've seen of the code, OpenSCAD's core representation of a 3d solid object seems to be seems to be a triangle mesh of the objects shell.
By contrast the ImplicitCAD core representation as I understand it is a function over space indicating whether a particular point is in or out of the object.
It seems to me that ImplicitCAD's representation is much closer to the objects being modeled.
With a triangle mesh of the shell there is little difference between a point inside the shell, a point outside the shell and poorly formed mesh that doesn't have an inside or outside and doesn't represent a 3d solid.
In ImplictCAD these things are fundamental, you can't represent something that isn't a 3d solid and there can be no doubt about what is inside and what is outside.
That difference has all sorts of interesting implications. It should for example eliminate most of the potential sources of non manifold output. It also enables the rounded operations mentioned.
I wonder what the draw backs are, one obvious one is that our primary outputs (STL and 3D rendering) are both triangle mesh formats.

On Tue, Feb 7, 2012 at 5:18 PM, Christopher Olah <[hidden email]> wrote:
Hey all,

I'm ecstatic to announce the release of ImplicitCAD 0.0.1. ImplicitCAD
provides a parser for OpenSCAD and extends it in a number of very
exciting ways, including providing rounded unions, differences,
intersections, and extrusions. I think this can empower users to make
more professional looking objects.

The 0.0.1 release notes are here:
http://christopherolah.wordpress.com/2012/02/06/implicitcad-0-0-1-release/

And the GitHub page is here:
https://github.com/colah/ImplicitCAD

ImplicitCAD is ready for and desperately needs beta users. If you have
some time to play around with it, I'd love your feedback. There are
lots of bugs to be found and fixed.

I'd be particularly interested in what the OpenSCAD community thinks
of the changes I've made to the language. Am I insane, or going in an
interesting direction?

Get Excited and Make Things!

Chris
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad

Reply | Threaded
Open this post in threaded view
|

Re: ImplicitCAD 0.0.1

Christopher Olah
> I wonder what the draw backs are, one obvious one is that our primary
> outputs (STL and 3D rendering) are both triangle mesh formats.

I'm aware of two disadvantages.

The first and biggest is the one you observed. Triangle meshes are not
my natural representation of objects and there is a very big
computational cost to convert them. This is why ImplicitCAD has very
different performance characteristics than OpenSCAD: I pay a big
overhead on conversion to triangle meshes, but most operations (eg.
CSG) are very inexpensive. (This is further complicated by the fact
that it is implemented in a lazy language...)

(To be competitive in simple cases, ImplicitCAD does "symbolic
rendering" where it recognizes objects like a simple sphere or such
and renders them without doing anything with Implicit functions. This
has a long ways to go.)

The second disadvantage is that one can't define an object with
arbitrary parametric equations, since once can't convert parametric
equations to implicit functions in full generality. That means that,
for example, some of the features I had in surfcad, can't be
replicated here.

I think these are both completely worth while sacrifices for the
benefits of the implicit function approach.

Chris

Reply | Threaded
Open this post in threaded view
|

Re: ImplicitCAD 0.0.1

Gordon Wrigley
> That means that, for example, some of the features I had in surfcad, can't be replicated here.

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

Do you expect to reach 100% compatibility with OpenSCAD? 

G

On Fri, Feb 24, 2012 at 6:10 PM, Christopher Olah <[hidden email]> wrote:
> I wonder what the draw backs are, one obvious one is that our primary
> outputs (STL and 3D rendering) are both triangle mesh formats.

I'm aware of two disadvantages.

The first and biggest is the one you observed. Triangle meshes are not
my natural representation of objects and there is a very big
computational cost to convert them. This is why ImplicitCAD has very
different performance characteristics than OpenSCAD: I pay a big
overhead on conversion to triangle meshes, but most operations (eg.
CSG) are very inexpensive. (This is further complicated by the fact
that it is implemented in a lazy language...)

(To be competitive in simple cases, ImplicitCAD does "symbolic
rendering" where it recognizes objects like a simple sphere or such
and renders them without doing anything with Implicit functions. This
has a long ways to go.)

The second disadvantage is that one can't define an object with
arbitrary parametric equations, since once can't convert parametric
equations to implicit functions in full generality. That means that,
for example, some of the features I had in surfcad, can't be
replicated here.

I think these are both completely worth while sacrifices for the
benefits of the implicit function approach.

Chris
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad

Reply | Threaded
Open this post in threaded view
|

Re: ImplicitCAD 0.0.1

Christopher Olah
> 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