discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

PolySet has nonplanar faces --> ERROR: CGAL

D
DarioPellegrini
Thu, Oct 25, 2018 2:48 PM

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: http://forum.openscad.org/

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: http://forum.openscad.org/
D
DarioPellegrini
Thu, Oct 25, 2018 3:06 PM

Same behaviour also with version 20181024.

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

Same behaviour also with version 20181024. -- Sent from: http://forum.openscad.org/
RP
Ronaldo Persiano
Fri, Oct 26, 2018 10:42 AM

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 pellegrini.dario@gmail.com
escreveu:

Same behaviour also with version 20181024.

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


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

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 <pellegrini.dario@gmail.com> escreveu: > Same behaviour also with version 20181024. > > > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
D
DarioPellegrini
Sat, Oct 27, 2018 1:23 PM

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

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

Thank you for your clarification! Do you think that self-intersections could be allowed somehow? -- Sent from: http://forum.openscad.org/
RP
Ronaldo Persiano
Sat, Oct 27, 2018 2:11 PM

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?

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? >
D
DarioPellegrini
Sat, Oct 27, 2018 2:30 PM

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/

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/
RP
Ronaldo Persiano
Sun, Oct 28, 2018 12:43 PM

Em sáb, 27 de out de 2018 às 15:31, DarioPellegrini <
pellegrini.dario@gmail.com> 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:

http://forum.openscad.org/Mirror-rotations-and-sweep-td21256.html

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.

Em sáb, 27 de out de 2018 às 15:31, DarioPellegrini < pellegrini.dario@gmail.com> 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: http://forum.openscad.org/Mirror-rotations-and-sweep-td21256.html 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.