simple test case: CGAL error in CGA_Nef_polyhedron3(): CGAL ERROR: assertion violation

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

simple test case: CGAL error in CGA_Nef_polyhedron3(): CGAL ERROR: assertion violation

Michael Brown
I was trying to make a printing plate to speed up printing 4 LM8UU bearing holders for the Prusa I am building. I downloaded the STL from http://www.thingiverse.com/thing:8900, and made a simple openscad file to print out two at a time:

translate([-6,81,0])
    import(file="LM8UUYHolders.stl");

rotate([0,0,180])
translate([-6,81,0])
    import(file="LM8UUYHolders.stl");


Compiling and rendering the design results in this:

Parsing design (AST generation)...

Compiling design (CSG Tree generation)...

Compilation finished.

Rendering Polygon Mesh using CGAL...

CGAL error in CGA_Nef_polyhedron3(): CGAL ERROR: assertion violation!

Expr: pe_prev->is_border() || !internal::Plane_constructor<Plane>::get_plane(pe_prev->facet(),pe_prev->facet()->plane()).is_degenerate()

File: /usr/include/CGAL/Nef_3/polyhedron_3_to_nef_3.h

Line: 252

CGAL Cache insert: import(file="/home/michael_e_brown/thing (0 verts)

CGAL Cache insert: multmatrix([[1,0,0,-6],[0,1,0,81],[0,0,1 (0 verts)

CGAL Cache insert: multmatrix([[-1,-1.22461e-16,0,0],[1.224 (0 verts)

CGAL Cache insert: group(){multmatrix([[1,0,0,-6],[0,1,0,81 (0 verts)

PolySets in cache: 1

Polygons in cache: 900

CGAL Polyhedrons in cache: 4

Vertices in cache: 0

Total rendering time: 0 hours, 0 minutes, 0 seconds

WARNING: No top level geometry to render


Reply | Threaded
Open this post in threaded view
|

Re: simple test case: CGAL error in CGA_Nef_polyhedron3(): CGAL ERROR: assertion violation

kintel
Administrator
On Oct 31, 2011, at 04:50 AM, Michael Brown wrote:

> I was trying to make a printing plate to speed up printing 4 LM8UU bearing holders for the Prusa I am building. I downloaded the STL from http://www.thingiverse.com/thing:8900, and made a simple openscad file to print out two at a time:
>
Ouch.
This is a long-standing issue and has been reported numerous times.
Unfortunately, the STL import pipeline in OpenSCAD is extremely sensitive, to the point where exported files sometime cannot be imported.
I fear this requires a fair bit of work to fix, and it's one of the things I'd like to do after the current development version is out the door.

For other devs out there:  I believe this has something to do with an internal optimization gone wrong (using a grid to merge vertices in close proximity, causing a non-manifold topology on imported 3D models).

 -Marius


Reply | Threaded
Open this post in threaded view
|

Re: simple test case: CGAL error in CGA_Nef_polyhedron3(): CGAL ERROR: assertion violation

kintel
Administrator
In reply to this post by Michael Brown
Update:

It also asserts in RapCAD, so my diagnostic must be wrong.
The next guess is that this is exported from SketchUp and it's not actually a closed volume.
OpenSCAD requires imported models to be closed, manifold meshes.

Perhaps a mesh repair tool (meshlab, netfabb) would help?
Getting the original SketchUp model and looking for issues in it might also help.

 -Marius


Reply | Threaded
Open this post in threaded view
|

Re: simple test case: CGAL error in CGA_Nef_polyhedron3(): CGAL ERROR: assertion violation

Michael Brown
Ok, thanks for the tips. Awfully inconvenient, though. :/  I neglected to google before sending.
--
Michael

On Mon, Oct 31, 2011 at 5:56 AM, Marius Kintel <[hidden email]> wrote:
Update:

It also asserts in RapCAD, so my diagnostic must be wrong.
The next guess is that this is exported from SketchUp and it's not actually a closed volume.
OpenSCAD requires imported models to be closed, manifold meshes.

Perhaps a mesh repair tool (meshlab, netfabb) would help?
Getting the original SketchUp model and looking for issues in it might also help.

 -Marius

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

Reply | Threaded
Open this post in threaded view
|

Re: simple test case: CGAL error in CGA_Nef_polyhedron3(): CGAL ERROR: assertion violation

kintel
Administrator
On Oct 31, 2011, at 15:36 PM, Michael Brown wrote:

> Ok, thanks for the tips. Awfully inconvenient, though. :/

On the positive side, it looks like this kind of compositing is common, so I'm considering implementing support for it in a way which doesn't post too many requirements on the integrity of the imported models. This is medium-term stuff though (next year?).

 -Marius


Reply | Threaded
Open this post in threaded view
|

Re: simple test case: CGAL error in CGA_Nef_polyhedron3(): CGAL ERROR: assertion violation

Brad Pitcher
In reply to this post by Michael Brown
Wow, that .stl must be seriously messed up. Even Netfabb fails to process it. Lucky for you there are several similar lm8uu bearing holders, including some that are %100 .scad. Can you use Greg's holder? http://www.thingiverse.com/thing:9871
-Brad


On Mon, Oct 31, 2011 at 7:36 AM, Michael Brown <[hidden email]> wrote:
Ok, thanks for the tips. Awfully inconvenient, though. :/  I neglected to google before sending.
--
Michael


On Mon, Oct 31, 2011 at 5:56 AM, Marius Kintel <[hidden email]> wrote:
Update:

It also asserts in RapCAD, so my diagnostic must be wrong.
The next guess is that this is exported from SketchUp and it's not actually a closed volume.
OpenSCAD requires imported models to be closed, manifold meshes.

Perhaps a mesh repair tool (meshlab, netfabb) would help?
Getting the original SketchUp model and looking for issues in it might also help.

 -Marius

_______________________________________________
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: simple test case: CGAL error in CGA_Nef_polyhedron3(): CGAL ERROR: assertion violation

Brad Pitcher
Strike that. Netfabb managed it. The initial response was one of failure, but a couple hours later I got an email indicating success. Sure enough, it renders in OpenSCAD now:

-Brad

On Mon, Oct 31, 2011 at 8:02 AM, Brad Pitcher <[hidden email]> wrote:
Wow, that .stl must be seriously messed up. Even Netfabb fails to process it. Lucky for you there are several similar lm8uu bearing holders, including some that are %100 .scad. Can you use Greg's holder? http://www.thingiverse.com/thing:9871
-Brad



On Mon, Oct 31, 2011 at 7:36 AM, Michael Brown <[hidden email]> wrote:
Ok, thanks for the tips. Awfully inconvenient, though. :/  I neglected to google before sending.
--
Michael


On Mon, Oct 31, 2011 at 5:56 AM, Marius Kintel <[hidden email]> wrote:
Update:

It also asserts in RapCAD, so my diagnostic must be wrong.
The next guess is that this is exported from SketchUp and it's not actually a closed volume.
OpenSCAD requires imported models to be closed, manifold meshes.

Perhaps a mesh repair tool (meshlab, netfabb) would help?
Getting the original SketchUp model and looking for issues in it might also help.

 -Marius

_______________________________________________
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: simple test case: CGAL error in CGA_Nef_polyhedron3(): CGAL ERROR: assertion violation

Michael Brown
Thanks, I downloaded it and am taking a look.
--
Michael

On Mon, Oct 31, 2011 at 12:07 PM, Brad Pitcher <[hidden email]> wrote:
Strike that. Netfabb managed it. The initial response was one of failure, but a couple hours later I got an email indicating success. Sure enough, it renders in OpenSCAD now:

-Brad


On Mon, Oct 31, 2011 at 8:02 AM, Brad Pitcher <[hidden email]> wrote:
Wow, that .stl must be seriously messed up. Even Netfabb fails to process it. Lucky for you there are several similar lm8uu bearing holders, including some that are %100 .scad. Can you use Greg's holder? http://www.thingiverse.com/thing:9871
-Brad



On Mon, Oct 31, 2011 at 7:36 AM, Michael Brown <[hidden email]> wrote:
Ok, thanks for the tips. Awfully inconvenient, though. :/  I neglected to google before sending.
--
Michael


On Mon, Oct 31, 2011 at 5:56 AM, Marius Kintel <[hidden email]> wrote:
Update:

It also asserts in RapCAD, so my diagnostic must be wrong.
The next guess is that this is exported from SketchUp and it's not actually a closed volume.
OpenSCAD requires imported models to be closed, manifold meshes.

Perhaps a mesh repair tool (meshlab, netfabb) would help?
Getting the original SketchUp model and looking for issues in it might also help.

 -Marius

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


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




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