PolySet has nonplanar faces --> ERROR: CGAL

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

PolySet has nonplanar faces --> ERROR: CGAL

DarioPellegrini
I am using v20180923. The minimal example below works with f5 but produces the following error with f6. Thank you for your attention!

PolySet has nonplanar faces. Attempting alternate construction
ERROR: CGAL error in CGALUtils::applyBinaryOperator union: CGAL ERROR: assertion violation! Expr: itl != it->second.end() File: /usr/include/CGAL/Nef_3/SNC_external_structure.h Line: 1153

use <list-comprehension-demos/sweep.scad> points = [ [-1,-1,0], [ 1, 1,0], [-1, 1,0], [ 1,-1,0] ]; shape = [ [-1,-1], [-1, 1], [ 1, 1], [ 1,-1] ]; path_transforms = construct_transform_path(5*points); union() { sweep(shape, path_transforms); cube(5, center=true); }

Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: PolySet has nonplanar faces --> ERROR: CGAL

DarioPellegrini
Same behaviour also with version 20181024.



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: PolySet has nonplanar faces --> ERROR: CGAL

Ronaldo
The path has a self-intersection. Then the polyhedron generated by sweep will have a self-intersection itself which is not allowed.

A quinta, 25/10/2018, 16:06, DarioPellegrini <[hidden email]> escreveu:
Same behaviour also with version 20181024.



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: PolySet has nonplanar faces --> ERROR: CGAL

DarioPellegrini
Thank you for your clarification!
Do you think that self-intersections could be allowed somehow?



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: PolySet has nonplanar faces --> ERROR: CGAL

Ronaldo
No, they are not allowed but might be cicumvented. I would try to split the path in non self-intersecting sections and union the sweeps build from then. Something like:

path1 = [ [-1,-1,0], [ 1, 1,0], [-1, 1,0] ];
path2 = [ [-1, 1,0], [ 1,-1,0] ];


Do you think that self-intersections could be allowed somehow?

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: PolySet has nonplanar faces --> ERROR: CGAL

DarioPellegrini
I see. The problem is that I encountered this error when playing with things
like this: https://www.thingiverse.com/thing:3179773
...so I may need some more advanced way to circumvent this limitation.



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: PolySet has nonplanar faces --> ERROR: CGAL

Ronaldo
Em sáb, 27 de out de 2018 às 15:31, DarioPellegrini <[hidden email]> escreveu:
I see. The problem is that I encountered this error when playing with things
like this: https://www.thingiverse.com/thing:3179773
...so I may need some more advanced way to circumvent this limitation.

A radical measure to avoid polyhedron self-intersections with sweep is to build one polyhedron for each pair of subsequent path points. That strategy has however a severe drawback: a very lengthy render time. You may find a code implementing that strategy in:


which requires the section to be convex. It is good enough for paths with a few hundred points.

A more efficient, less radical solution is waiting to be to be written. We may segment the path in shorter ones without self intersections and apply the sweep you used to each segment. 

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org