F5 works, but F6 gives: ERROR: CGAL error in CGAL_Nef_polyhedron3():

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

F5 works, but F6 gives: ERROR: CGAL error in CGAL_Nef_polyhedron3():

corpsman
Hello all,

i made a little "thing" (attached below).

If i press F5 i get it rendered with no problem. By pressing F6 i get :

ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion
violation! Expr: ss_plane.has_on(sv_prev->point()) File:
/usr/include/CGAL/Nef_3/polygon_mesh_to_nef_3.h Line: 294

i am using OpenSCAD version 2017.12.21

sometimes it will be rendered, but without the polyhedron.

can you help me, what i did wrong ?


/*
 * Thing starts here
 */
translate([0,35,0]) bodenprofil();
bodenprofil();

translate([3+4,0,5+3])cube([6,40,3]);
translate([40-7,0,5+3])cube([6,40,3]);

translate([3+5,18,5+3])cube([4,4,60]);

translate([3+4.25,16,5+3+60])
difference()
{
  cube([5.5,8,7]);
  translate([2,-1,2]) cube([1.5,10,6]);
}

module bodenprofil()
{
translate([0,5,0]) rotate([90,0,0]) linear_extrude(height = 5)
polygon([[0,0],[3,0],[3,5],[7,5],[7,8],[18,8],[18,5],[28,5],[28,8],[39,8],[39,5],[43,5],[43,0],[46,0],[46,11],[0,11]]);
}


polyhedron([
[39-5,0,11],
[43-5,0,11],
[43-5,5,11],
[39-5,5,11],

[12,18,58-5],
[12,18,58],
[12,22,58],
[12,22,58-5]
],
 [
  [0,1,2,3],  // bottom
  [4,5,1,0],  // front
  [7,6,5,4],  // top
  [5,6,2,1],  // right
  [6,7,3,2],  // back
  [7,4,0,3]]
);

polyhedron([
[39-5,0+35,11],
[43-5,0+35,11],
[43-5,5+35,11],
[39-5,5+35,11],

[12,18,58-5],
[12,18,58],
[12,22,58],
[12,22,58-5]
],
 [
  [0,1,2,3],  // bottom
  [4,5,1,0],  // front
  [7,6,5,4],  // top
  [5,6,2,1],  // right
  [6,7,3,2],  // back
  [7,4,0,3]]
);
/*
 * Thing stops here
 */

best regards corpsman

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

thing_f5.png (15K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: F5 works, but F6 gives: ERROR: CGAL error in CGAL_Nef_polyhedron3():

Ronaldo
I had no problem to render (F6) your model with snapshot version 2018.01.06. The "front" facets of your polyhedra are not planar and that could be the reason of CGAL complaints for version 2017.12.21. Either install the new snapshot version or triangulate those facets.


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

Re: F5 works, but F6 gives: ERROR: CGAL error in CGAL_Nef_polyhedron3():

kintel
Administrator
I think a new snapshot should fix this. If not, please open a new issue.

 -Marius


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

Re: F5 works, but F6 gives: ERROR: CGAL error in CGAL_Nef_polyhedron3():

corpsman
In reply to this post by corpsman
my fault, i do not run Windows, (i tested it on Windows, there it works
with the version from 6.01.) is there a way to get the Linux version
from 6.01 ? to double check?

i am using Ubuntu Mate64 and tested it with the nightly build from
tonight, see attachment.
- Corpsman



On 01/15/2018 09:05 PM, Uwe Schächterle wrote:

> Hello all,
>
> i made a little "thing" (attached below).
>
> If i press F5 i get it rendered with no problem. By pressing F6 i get :
>
> ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion
> violation! Expr: ss_plane.has_on(sv_prev->point()) File:
> /usr/include/CGAL/Nef_3/polygon_mesh_to_nef_3.h Line: 294
>
> i am using OpenSCAD version 2017.12.21
>
> sometimes it will be rendered, but without the polyhedron.
>
> can you help me, what i did wrong ?
>
>
> /*
>  * Thing starts here
>  */
> translate([0,35,0]) bodenprofil();
> bodenprofil();
>
> translate([3+4,0,5+3])cube([6,40,3]);
> translate([40-7,0,5+3])cube([6,40,3]);
>
> translate([3+5,18,5+3])cube([4,4,60]);
>
> translate([3+4.25,16,5+3+60])
> difference()
> {
>   cube([5.5,8,7]);
>   translate([2,-1,2]) cube([1.5,10,6]);
> }
>
> module bodenprofil()
> {
> translate([0,5,0]) rotate([90,0,0]) linear_extrude(height = 5)
> polygon([[0,0],[3,0],[3,5],[7,5],[7,8],[18,8],[18,5],[28,5],[28,8],[39,8],[39,5],[43,5],[43,0],[46,0],[46,11],[0,11]]);
> }
>
>
> polyhedron([
> [39-5,0,11],
> [43-5,0,11],
> [43-5,5,11],
> [39-5,5,11],
>
> [12,18,58-5],
> [12,18,58],
> [12,22,58],
> [12,22,58-5]
> ],
>  [
>   [0,1,2,3],  // bottom
>   [4,5,1,0],  // front
>   [7,6,5,4],  // top
>   [5,6,2,1],  // right
>   [6,7,3,2],  // back
>   [7,4,0,3]]
> );
>
> polyhedron([
> [39-5,0+35,11],
> [43-5,0+35,11],
> [43-5,5+35,11],
> [39-5,5+35,11],
>
> [12,18,58-5],
> [12,18,58],
> [12,22,58],
> [12,22,58-5]
> ],
>  [
>   [0,1,2,3],  // bottom
>   [4,5,1,0],  // front
>   [7,6,5,4],  // top
>   [5,6,2,1],  // right
>   [6,7,3,2],  // back
>   [7,4,0,3]]
> );
> /*
>  * Thing stops here
>  */
>
> best regards corpsman
>
>
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
--

Auf meiner Homepage www.Corpsman.de ist immer was los, ständig wird sie
aktualisiert und erweitert. Da ist für jeden was dabei.

--

Schütze deine Privatsphäre, nutze E-mail Verschlüsselung.
Wie das geht steht z.B. hier :
https://support.mozilla.org/en-US/kb/digitally-signing-and-encrypting-messages#w_installing-gpg-and-enigmail

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

Screenshot at 2018-01-16 09-30-51.png (411K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: F5 works, but F6 gives: ERROR: CGAL error in CGAL_Nef_polyhedron3():

corpsman
To inform the ones that are interested in.

The Problem under Linux still exists, but i found a workaround.

if you write

hull()
{
}

around the polyhedron then F6 is possible under Linux too.



On 01/16/2018 12:32 PM, Uwe Schächterle wrote:

> my fault, i do not run Windows, (i tested it on Windows, there it works
> with the version from 6.01.) is there a way to get the Linux version
> from 6.01 ? to double check?
>
> i am using Ubuntu Mate64 and tested it with the nightly build from
> tonight, see attachment.
> - Corpsman
>
>
>
> On 01/15/2018 09:05 PM, Uwe Schächterle wrote:
>> Hello all,
>>
>> i made a little "thing" (attached below).
>>
>> If i press F5 i get it rendered with no problem. By pressing F6 i get :
>>
>> ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion
>> violation! Expr: ss_plane.has_on(sv_prev->point()) File:
>> /usr/include/CGAL/Nef_3/polygon_mesh_to_nef_3.h Line: 294
>>
>> i am using OpenSCAD version 2017.12.21
>>
>> sometimes it will be rendered, but without the polyhedron.
>>
>> can you help me, what i did wrong ?
>>
>>
>> /*
>>  * Thing starts here
>>  */
>> translate([0,35,0]) bodenprofil();
>> bodenprofil();
>>
>> translate([3+4,0,5+3])cube([6,40,3]);
>> translate([40-7,0,5+3])cube([6,40,3]);
>>
>> translate([3+5,18,5+3])cube([4,4,60]);
>>
>> translate([3+4.25,16,5+3+60])
>> difference()
>> {
>>   cube([5.5,8,7]);
>>   translate([2,-1,2]) cube([1.5,10,6]);
>> }
>>
>> module bodenprofil()
>> {
>> translate([0,5,0]) rotate([90,0,0]) linear_extrude(height = 5)
>> polygon([[0,0],[3,0],[3,5],[7,5],[7,8],[18,8],[18,5],[28,5],[28,8],[39,8],[39,5],[43,5],[43,0],[46,0],[46,11],[0,11]]);
>> }
>>
>>
>> polyhedron([
>> [39-5,0,11],
>> [43-5,0,11],
>> [43-5,5,11],
>> [39-5,5,11],
>>
>> [12,18,58-5],
>> [12,18,58],
>> [12,22,58],
>> [12,22,58-5]
>> ],
>>  [
>>   [0,1,2,3],  // bottom
>>   [4,5,1,0],  // front
>>   [7,6,5,4],  // top
>>   [5,6,2,1],  // right
>>   [6,7,3,2],  // back
>>   [7,4,0,3]]
>> );
>>
>> polyhedron([
>> [39-5,0+35,11],
>> [43-5,0+35,11],
>> [43-5,5+35,11],
>> [39-5,5+35,11],
>>
>> [12,18,58-5],
>> [12,18,58],
>> [12,22,58],
>> [12,22,58-5]
>> ],
>>  [
>>   [0,1,2,3],  // bottom
>>   [4,5,1,0],  // front
>>   [7,6,5,4],  // top
>>   [5,6,2,1],  // right
>>   [6,7,3,2],  // back
>>   [7,4,0,3]]
>> );
>> /*
>>  * Thing stops here
>>  */
>>
>> best regards corpsman
>>
>>
>>
>> _______________________________________________
>> 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
>

--

Auf meiner Homepage www.Corpsman.de ist immer was los, ständig wird sie
aktualisiert und erweitert. Da ist für jeden was dabei.

--

Schütze deine Privatsphäre, nutze E-mail Verschlüsselung.
Wie das geht steht z.B. hier :
https://support.mozilla.org/en-US/kb/digitally-signing-and-encrypting-messages#w_installing-gpg-and-enigmail

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

Re: F5 works, but F6 gives: ERROR: CGAL error in CGAL_Nef_polyhedron3():

Ronaldo

​Interesting workaround! It is "reasonable" since the hull operation depends only on the vertex positions. So, missing facets in a polyhedron are irrelevant.
For instance, this code renders fine:

intersection(){
  hull(){
    polyhedron( points=[[0,0,0],[0,10,0],[10,10,0], 
                        [0,0,10],[0,10,10],[10,10,10]],
                faces =[[0,1,2],[3,4,5]]);
  }
  sphere(8);
}

​If you drop the hull, CGAL complaints.

2018-01-17 14:10 GMT-02:00 Uwe Schächterle <[hidden email]>:
To inform the ones that are interested in.

The Problem under Linux still exists, but i found a workaround.

if you write

hull()
{
}

around the polyhedron then F6 is possible under Linux too.

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

Re: F5 works, but F6 gives: ERROR: CGAL error in CGAL_Nef_polyhedron3():

Ronaldo
Here is another interesting case. The hull is a tetrahedron but the inside polyhedron was defined with just one face ( a simple list of all vertices). It is surprising that the preview of the polyhedron alone is correct but the preview of the intersection with the sphere is void.

intersection(){
  hull(){
    polyhedron( points=[[0,0,0],[0,10,0],[10,10,0],[0,0,10]],
                faces =[[0,1,3,2]]);
  }
  sphere(8); // the preview is correct when this line is commented
}

 The same render comes to light for any order of vertices in the list faces.

2018-01-17 16:06 GMT-02:00 Ronaldo Persiano <[hidden email]>:

​Interesting workaround! It is "reasonable" since the hull operation depends only on the vertex positions. So, missing facets in a polyhedron are irrelevant.
For instance, this code renders fine:

intersection(){
  hull(){
    polyhedron( points=[[0,0,0],[0,10,0],[10,10,0], 
                        [0,0,10],[0,10,10],[10,10,10]],
                faces =[[0,1,2],[3,4,5]]);
  }
  sphere(8);
}

​If you drop the hull, CGAL complaints.

2018-01-17 14:10 GMT-02:00 Uwe Schächterle <[hidden email]>:
To inform the ones that are interested in.

The Problem under Linux still exists, but i found a workaround.

if you write

hull()
{
}

around the polyhedron then F6 is possible under Linux too.


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

Re: F5 works, but F6 gives: ERROR: CGAL error in CGAL_Nef_polyhedron3():

kintel
Administrator
> On Jan 17, 2018, at 5:34 PM, Ronaldo Persiano <[hidden email]> wrote:
>
> It is surprising that the preview of the polyhedron alone is correct but the preview of the intersection with the sphere is void.
>
Both previews should work, and do work here.
This sounds a bit like a rendering/driver issue.

 -Marius


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

Re: F5 works, but F6 gives: ERROR: CGAL error in CGAL_Nef_polyhedron3():

cacb
In reply to this post by Ronaldo
On 2018-01-17 23:34, Ronaldo Persiano wrote:

> Here is another interesting case. The hull is a tetrahedron but the
> inside polyhedron was defined with just one face ( a simple list of
> all vertices). It is surprising that the preview of the polyhedron
> alone is correct but the preview of the intersection with the sphere
> is void.
>
>> intersection(){
>> hull(){
>>    polyhedron( points=[[0,0,0],[0,10,0],[10,10,0],[0,0,10]],
>>                faces =[[0,1,3,2]]);
>>    }
>>    sphere(8); // the preview is correct when this line is commented
>> }

Since faces are of no interest in the context of hull() this works. But
the single face is totally warped, i.e. points not in the same plane.
According to
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/The_OpenSCAD_Language#polyhedron
this should be an error:
"Points which describe a single face must all be on the same plane."

Perhaps one could also say that a polyhedron with fewer than 4 faces is
always an error, perhaps with the exception of zero faces in the case of
using it within hull()?

Carsten Arnholm

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

Re: F5 works, but F6 gives: ERROR: CGAL error in CGAL_Nef_polyhedron3():

Parkinbot
cacb wrote
> Perhaps one could also say that a polyhedron with fewer than 4 faces is
> always an error, perhaps with the exception of zero faces in the case of
> using it within hull()?

I am heavily using this feature
- to preview 2D-polygons placed in 3D space,
- to see, what sweep() will do with my code
- to check for selfintersections

Indeed I even don't see much sense in restricting STL output to "proper"
manifolds. Is it part of the format specification?
 



--
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: F5 works, but F6 gives: ERROR: CGAL error in CGAL_Nef_polyhedron3():

cacb
On 2018-01-18 10:29, Parkinbot wrote:

> cacb wrote
>> Perhaps one could also say that a polyhedron with fewer than 4 faces
>> is
>> always an error, perhaps with the exception of zero faces in the case
>> of
>> using it within hull()?
>
> I am heavily using this feature
> - to preview 2D-polygons placed in 3D space,
> - to see, what sweep() will do with my code
> - to check for selfintersections
>
> Indeed I even don't see much sense in restricting STL output to
> "proper"
> manifolds. Is it part of the format specification?

My comment was not referring to STL or other output formats, only the
internal OpenSCAD definition of polyhedron. Ref. the OpenSCAD
documentation of polyhedron I lniked to. Either the documentation should
be changed to reflect the software, or the documented rule requiring
planar faces should be enforced.

OpenSCAD should tell the user when it receives clearly illegal input
according to documentation. Such illegal polyhedrons are usually a sign
of user error. There are many examples of novice users that run into
problems because they make mistakes in this area. My comment was
motivated to help such users.

Experienced users like yourself may "abuse" it to achieve useful special
effects like you describe. This is quite legitimate, but it sounds to me
like a different feature. You could perhaps serve both groups of users
by

a) Enforcing stricter rules on polyhedrons, and give good error messages
instead of silently accepting everything that is clearly wrong given
polyhedron definitions. This would help novice users.

b) Introduce a new feature to serve the more advanced needs you
describe. For example you could introduce a new object type called
"polygonsoup" (or whatever name you prefer) that has exactly the same
input syntax as polyhedron, but with relaxed rules, allowing previews of
polygons in 3d space.

Or, if you don't like a new type, then the default behaviour of
polyhedron could be as in a), but an extra "relaxed_rules=true"
parameter could relax the rules, so you get b).

Carsten Arnholm

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

Re: F5 works, but F6 gives: ERROR: CGAL error in CGAL_Nef_polyhedron3():

Parkinbot
cacb wrote
> Experienced users like yourself may "abuse" it to achieve useful special
> effects like you describe.

Polyhedron and polygon is like Peek and Poke of BASIC. While it opens the
door to hell, it does all the rest, what you can't do with the ordinary
language. History has shown that any accepted language needs such backdoors
and I don't see anything wrong in having some features for power users of
OpenSCAD, as they give most of the qualified feedback and do most of the
testing and "marketing" by producing impressive designs. To be honest,
without polyhedron I would have dropped the language after three weeks of
use, latest. In my eyes it is the real expressive power of OpenSCAD. Why
castrate it - and break a lot of code out there? Because a novice user can
stumble over it? If you offer a solution that differences out several
primitives with little differences, he will stumble at this point. You are
using and propagating AngleScript, because it lets you do things, that
OpenSCAD doesn't let you do. So you will understand this point.
I wouldn't touch these primitives, but opt to more emphazise the difference
between CSG and CGAL in the documentation. Most people especially beginners
don't know this essential difference.
F6 can (and should) give warnings about improper topologies, like it does
when it finds a singularity. But why should it prevent me with an error from
writing out an improper topology into an STL?  
 
Why sacrifice parts of the expressive power of CSG (e.g. color), only
because CGAL is not rich enough? There is a F5 and a F6. And they lead into
different worlds. E.g. I use OpenSCAD a lot to produce animations and to
explain things visually. You don't need proper polyhedrons or manifolds for
that, but fast and powerful code.

I would also provide a built-in import function like

data = import("mystl.stl");

that lets me implement all sorts of query and modifier stuff like

function boundary(data) = ...

or write code like

polyhedron(data[0]. data[1]);

and introduce at least a rudimentary interface for data import in a
standardized format (binary and ASCII). This would offer a pathway to solve
most of the severe problems (like quering a design), more experienced people
run into after having invested some learning time into OpenSCAD and trying
to implement something more sophisticated. Of course the import function
should be extended to support all data formats, OpenSCAD can write out.
Currently one has to write (or find) code that converts these formats into
SCAD code, which is very clumsy.





--
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: F5 works, but F6 gives: ERROR: CGAL error in CGAL_Nef_polyhedron3():

JordanBrown
In reply to this post by Parkinbot
On 1/18/2018 1:29 AM, Parkinbot wrote:
Indeed I even don't see much sense in restricting STL output to "proper" manifolds. Is it part of the format specification?

I have no idea whether there's  anything in the format spec, but it's quite frustrating to generate something with OpenSCAD, feed it to my slicer, and have my slicer misbehave because it doesn't follow the rules.

(As best I can tell, usually this happens when there are extremely small features that start running into the OpenSCAD resolution limits - like when I took my 25.4:1 scale model of my house and then scaled it down by a further 25.4:1.)

(Intuitively, I would say that a string of points that aren't coplanar cannot be a face of a polyhedron.  They might be something else, and I don't have a problem with having a way to create and manipulate them under a different name.)


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

Re: F5 works, but F6 gives: ERROR: CGAL error in CGAL_Nef_polyhedron3():

jon_bondy

Is there a middle ground here where error messages are displayed when an invalid STL file is created, so that you can avoid feeding that STL to your slicer while the other OpenSCAD features remain intact?  Perhaps I am missing a subtlety here

Jon


On 1/18/2018 12:20 PM, Jordan Brown wrote:
On 1/18/2018 1:29 AM, Parkinbot wrote:
Indeed I even don't see much sense in restricting STL output to "proper" manifolds. Is it part of the format specification?

I have no idea whether there's  anything in the format spec, but it's quite frustrating to generate something with OpenSCAD, feed it to my slicer, and have my slicer misbehave because it doesn't follow the rules.

(As best I can tell, usually this happens when there are extremely small features that start running into the OpenSCAD resolution limits - like when I took my 25.4:1 scale model of my house and then scaled it down by a further 25.4:1.)

(Intuitively, I would say that a string of points that aren't coplanar cannot be a face of a polyhedron.  They might be something else, and I don't have a problem with having a way to create and manipulate them under a different name.)



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

-- 
Sent from my desktop computer.  
I do not receive emails while away from my desk, 
nor do I receive texts on my main phone number 
(which is a land line).  
If you know that I am on the road, please text me.  
If you know that I am home, please email me.

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

Re: F5 works, but F6 gives: ERROR: CGAL error in CGAL_Nef_polyhedron3():

Parkinbot
In reply to this post by JordanBrown
JordanBrown wrote
> On 1/18/2018 1:29 AM, Parkinbot wrote:
>> Indeed I even don't see much sense in restricting STL output to
>> "proper" manifolds. Is it part of the format specification?
>
> I have no idea whether there's  anything in the format spec, but it's
> quite frustrating to generate something with OpenSCAD, feed it to my
> slicer, and have my slicer misbehave because it doesn't follow the rules.

Currently there is either no hint (emptying the cache can help), or a
cryptic CGAL error or a warning in the case of a singularity.
The current workaround to have a user defined polyhedron explicitly tested
for manifoldness is to union it with something else (any Boolean operation
will do) starting from an empty cache.

mypolyhedron();
cube();  



> (As best I can tell, usually this happens when there are extremely small
> features that start running into the OpenSCAD resolution limits - like
> when I took my 25.4:1 scale model of my house and then scaled it down by
> a further 25.4:1.)
>
> (Intuitively, I would say that a string of points that aren't coplanar
> cannot be a face of a polyhedron.  They might be something else, and I
> don't have a problem with having a way to create and manipulate them
> under a different name.)

There was a planarity bug connected with polyhedra faces in the late 2017
dev builds, which has been fixed in the 2018.1.x Have you tried to update?
It is also known that you can sometimes heal a small scale design by scaling
it up, while a scale-down is never a good idea.




--
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: F5 works, but F6 gives: ERROR: CGAL error in CGAL_Nef_polyhedron3():

cacb
In reply to this post by Parkinbot
On 18. jan. 2018 15:23, Parkinbot wrote:
> Polyhedron and polygon is like Peek and Poke of BASIC. While it opens the
> door to hell, it does all the rest, what you can't do with the ordinary
> language.

My point was simply that the door to hell does not have to be wide open
for everyone all the time. You can open it when you want to.

> History has shown that any accepted language needs such backdoors
> and I don't see anything wrong in having some features for power users of
> OpenSCAD, as they give most of the qualified feedback and do most of the
> testing and "marketing" by producing impressive designs.

I think you scanned my post too fast, because I never said there is
anything wrong with power features, on the contrary I said power
features are legitimate. My message is to support the needs of both
novices as well as power users, and my post suggested ways of doing it.

> To be honest,
> without polyhedron I would have dropped the language after three weeks of
> use, latest. In my eyes it is the real expressive power of OpenSCAD. Why
> castrate it - and break a lot of code out there? Because a novice user can
> stumble over it?

To my knowledge, nobody suggests dropping polyhedron.

Carsten Arnholmdy

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

Re: F5 works, but F6 gives: ERROR: CGAL error in CGAL_Nef_polyhedron3():

Parkinbot
Carsten I reread your post and you are right. An additional parameter for
polyhedron properly defaulted for novices will not close the door to hell.
Ok, it will break some code, but the fix would be straight forward.
 
My point is that added complexity like introducing a new, somehow "safer"
polyhedron primitive (say it will solve the "pink" challenge (CCW/CW
orientation) and check for manifoldness (without the Boolean operation
workaround) will not seal all traps a novice can and will encounter.
Wouldn't it just throw yet another, hopefully more reliable CGAL error (no
cache flush required any more) or even THE error, polyhedron users are all
waiting for? The only thing, I really opted for was: Make a reliable warning
and not an error out of it, to not prevent people from outputing
non-manifold STLs if they want.  

An error will indicate, but not solve the self-intersection and singularity
challenges and trap the people there. While the documentation is quite
explicit on the pink challenge, it happens from time to time that people
sign in, who got trapped there. Is this a weakness of the language? Yes it
can be fixed. OpenSCAD could check it and automatically switch to F12 mode.
But then a novice might not know, why the output (partly) turned pink. So
let's also output a warning or even an error? But most errors and warnings
are hard to read or neglected ...  







--
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: F5 works, but F6 gives: ERROR: CGAL error in CGAL_Nef_polyhedron3():

JordanBrown
In reply to this post by Parkinbot
On 1/18/2018 10:03 AM, Parkinbot wrote:
There was a planarity bug connected with polyhedra faces in the late 2017 dev builds, which has been fixed in the 2018.1.x Have you tried to update?

I don't use polyhedra very much.  My top-level comment was that generating STL files that don't follow the rules is rude.

And a side comment that by a common-sense definition, a list of points that's not coplanar is not a polyhedron face.

It is also known that you can sometimes heal a small scale design by scaling it up, while a scale-down is never a good idea.

I did need a scaled-down version of the model.  (After all, it's a model of my house; it has to include a copy of the model.)

I don't remember how I got it to print.  Maybe I just ignored the things the slicer did wrong.  I might have been better off having the STL be full-sized (about a meter across) and then scaling down in the slicer.

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

Re: F5 works, but F6 gives: ERROR: CGAL error in CGAL_Nef_polyhedron3():

Parkinbot
JordanBrown wrote
> I don't use polyhedra very much.  My top-level comment was that generating
> STL files that don't follow the rules is rude.

If you buy a product or pay a lot money for the licence, the word "rude"
might apply ...


> And a side comment that by a common-sense definition, a list of points
> that's not coplanar is not a polyhedron face.

If you want constructive help it is a good idea to show some code that
misbehaves and - again - to test it with the latest development snapshot
first.






--
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: F5 works, but F6 gives: ERROR: CGAL error in CGAL_Nef_polyhedron3():

codifies
On 19/01/18 21:00, Parkinbot wrote:
> If you buy a product or pay a lot money for the licence, the word "rude"
> might apply ...
On the contrary if its free (as in beer) and open source then it would
be "rude" to make some inappropriate output to a STL file, if not at
least because you're sure gonna get called out on it... in public... so
better to do it right....

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