[OpenSCAD] Does PythonOCC work better than CGAL in Cadmium...?
Dan Zuras 3D
threedee at nonabelian.com
Sat Jun 11 18:18:21 CEST 2011
Jayesh,
This looks promising.
One of my criticisms of OpenSCAD has been the use of
CGAL as a backend. It is not that it doesn't work or
doesn't produce pretty results, it does. But it takes
a disproportionately HUGE amount of computational
resources (memory & time) to do it. Thus a relatively
simple design (with only a few thousand elements) can
suck up gigabytes of memory & tens of minutes of time.
Larger designs are just intractable.
Therefore, your success leads me to ask two questions:
(1) Does PythonOCC/OpenCASCADE do the job quicker &
with fewer resources?
(2) Can this be back ported into OpenSCAD?
If the answer to (1) is yes, I might be willing to port
to Cadmium if you plan to support it in the long term.
But if the answer to (2) is yes, maybe none of us has to.
Just curious...
Dan Zuras
P.S. - I have a suggestion: It occurs to me that you might
not KNOW if your approach is better/faster since your test
cases have been things ported from OpenSCAD. Let me suggest
you try to design & render some fairly large fractal to some
reasonable depth in the recursion. If Cadmium cannot handle
recursion it is sufficient to do the recursion explicitly in
the code to a depth of say half a dozen or a dozen, depending
on the fractal. These are things I have found to be nearly
impossible to do in OpenSCAD. So if Cadmium can do them it
might go a long way to demonstrating the worth of your
approach.
> From: openscad-request at rocklinux.org
> Subject: OpenSCAD Digest, Vol 19, Issue 7
> To: openscad at rocklinux.org
> Date: Sat, 11 Jun 2011 12:00:02 +0200
>
>
> Today's Topics:
>
> 1. Cadmium update (Jayesh Salvi)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 11 Jun 2011 14:37:04 +0530
> From: Jayesh Salvi <jayeshsalvi at gmail.com>
> Subject: [OpenSCAD] Cadmium update
> To: openscad at rocklinux.org
>
> Hi all,
>
> This week I managed to do decent progress with Cadmium and was able to
> get results that are good enough to share with you.
>
> If you don't remember my Cadmium announcement couple of weeks ago:
> Cadmium is a python library for solid modelling, that implements
> similar abstractions like OpenSCAD, but as a python module.
>
> A major breakthrough came after I switched from CGAL to PythonOCC as
> the backend. With CGAL I was facing a lot of assertion failures or
> crashes. Therefore I decided to give PythonOCC a try and it turned out
> to be a really good choice. The underlying OpenCASCADE library has so
> far been able to handle all the CSG operations I've thrown at it.
>
> Because PythonOCC/OpenCASCADE can do most of the algorithmic work,
> only job that is left to Cadmium is to define simple abstractions
> (Box, Cylinder, etc.) and provide easy way to write CSG operations.
>
> As a demo, I pulled out couple of OpenSCAD scripts from Thingiverse
> and translated them to Cadmium and the results turned out pretty well.
>
> You can find them here:
> http://jayesh3.github.com/cadmium/
>
> Please let me know what you think.
> Thanks,
> --
> Jayesh
>
More information about the OpenSCAD
mailing list