Welcome! Log In Create A New Profile

Advanced

CGAL error

Posted by appjaws1 
CGAL error
September 07, 2016 04:25AM
Hi,
How do I solve this error?

ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion violation! Expr: pe_prev->is_border() || !internal:tongue sticking out smileylane_constructor::get_plane(pe_prev->facet(),pe_prev->facet()->plane()).is_degenerate() File: /opt/mxe/usr/x86_64-w64-mingw32.static/include/CGAL/Nef_3/polyhedron_3_to_nef_3.h Line: 251

This is the code (Wheel_Guide.stl is attached)

difference(){
union(){
translate([12.5,7.7,4.4]) cube([40,2,20.6]);
translate([52.55,24,15]) rotate([0,90,0]) cylinder(h=4.8,r=3,$fn=60);
import("Wheel_Guide.stl",convexity=10);
}
translate([11.6,13,4.8]) cube([41,1.1,22]);
translate([52,23,15]) rotate([0,90,0]) cylinder(h=6,r=2.65,$fn=60);
translate([40,32,-0.1]) cube([20,2,30]);
}


appjaws - Core XYUV Duet Ethernet Duex5
firmware 3.1.1 Web Interface 3.1.1
Ormerod 1-converted to laser engraver, Duet wifi
OpenSCAD version 2020.07
slic3r-1.3.0, Simplify3D 4.1.2, Cura-4.4.1
Attachments:
open | download - Wheel_Guide.stl (175.9 KB)
Re: CGAL error
September 07, 2016 10:30AM
OpenScad doesn't like to edit some STLs. I see that your code renders OK with F5, but fails with F6. You could try repairing the STL (e.g. with [netfabb.azurewebsites.net] which currently seems to hang so I could not try it). I have a feeling that there is something amiss with that STL, because if I load it into Slic3r and then export as an STL (which will repair some STLs), Silc3r creates an invalid STL.

However the STL shape seems to be fairly simple, so my next step would be to model the entire thing with OpenScad. You can temporarily keep the STL imported to use as a template for your code, rendering with F5 to check dimensions & positions.

Dave

Edited 1 time(s). Last edit at 09/07/2016 10:33AM by dmould.
Re: CGAL error
September 10, 2016 10:08AM
Thank you Dave,
I came to the same conclusion and have designed the part using the original as a guide.
I did try and repair the modified stl but every program I tried did not find any errors.... strange.
It would have been interesting to discover the reason for the error so perhaps I could avoid whatever it is in the future.

Paul


appjaws - Core XYUV Duet Ethernet Duex5
firmware 3.1.1 Web Interface 3.1.1
Ormerod 1-converted to laser engraver, Duet wifi
OpenSCAD version 2020.07
slic3r-1.3.0, Simplify3D 4.1.2, Cura-4.4.1
Sorry, only registered users may post in this forum.

Click here to login