Re: Importing STLs with multiple volumes/shells in OpenSCAD

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Importing STLs with multiple volumes/shells in OpenSCAD

Clifford Wolf
Hi Jonas,

I'm sending this mail CC to the openscad mailing list.

On Wed, Dec 30, 2009 at 08:20:48PM +0100, Jonas Pfeil wrote:
> I tested with example 12, which worked and then modified the STL file to
> contain a second identical mesh next to the original one. This resulted in
> a crash. The CGAL example program for 3D Nef polyhedra also crashed on me
> when I investigated CGAL a few months ago. Is it possible to use CGAL (or
> OpenSCAD) for meshes that have multiple shells/volumes (e.g. two boxes that
> do not intersect)? There probably exists a mathematical term for this ;)

yes. this is possible.

e.g. I can render the following openscad script to an stl file:

        translate([ -60, 0, 0 ]) cube(100, true);
        translate([ +60, 0, 0 ]) cube(100, true);

And I can use this stl file in another design without any problems:

        import_stl(filename = "demo.stl");

However, when the stl file is not 100% valid you have a good chance of
crashing CGAL. An invalid STL file would of course be everything that is not a
valid 2-manifold like (1) self intersecting structures (2) structures
where a half edge does not have extacly one matching other half edge with
the same vetrices but in the other order or (3) infinite objects.

yours,
 - clifford

--
Caffeine for mind, pizza for body, sushi for soul.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Importing STLs with multiple volumes/shells in OpenSCAD

Clifford Wolf
Hi Jonas, hi list,

On Sun, Jan 03, 2010 at 02:48:25AM +0100, Jonas Pfeil wrote:
> I'm quite positive, that my file is ok. I just duplicated the mesh from
> example 12 in blender. The meshes are not touching. I also checked the STL
> file in netfabb. I attached the file I used in case you want to test it. It
> crashes when just importing the STL after pressing F6.

got it:

there was a bug in the loader for binary stl files. It is fixed now in svn
rev 196. I've added the binary STL file you created as part of testcase
examples/example016.scad.

yours,
 - clifford

--
/"\  ASCII Ribbon Campaign - against html email
\ /                        - against microsoft office attachments
 X                         - against text above fullquote below
/ \                        - against lines longer than 79 characters

Loading...