discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

CGAL error

JW
Joe Weinpert
Fri, May 13, 2022 7:24 PM

When I rendered this with only one of the designs (instead of 3) it
rendered without a hitch. This tells me that there is no trouble with the
design itself.

When I rendered with three designs it threw this error after 30 minutes:

What steps should I take to try and prevent the error?

Is it some sort of memory issue?

Should I change the $fs and/or $fa values? If so, what should the values be?

Should I increase values in the preferences? If so, what should I try?

Rendering Polygon Mesh using CGAL...

ERROR: CGAL error in CGALUtils::applyUnion3D: CGAL ERROR: assertion
violation! Expr: itl != it->second.end() File:
/mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_3/SNC_external_structure.h
Line: 1152

Geometries in cache: 6

Geometry cache size in bytes: 118704128

CGAL Polyhedrons in cache: 5

CGAL cache size in bytes: 838592

Total rendering time: 0:30:08.772

Top level object is a 3D object:

Facets: 1004

Rendering finished.

[image: 2022-05-13_15-21-00.png]

[image: 2022-05-13_15-02-05.png]

When I rendered this with only one of the designs (instead of 3) it rendered without a hitch. This tells me that there is no trouble with the design itself. When I rendered with three designs it threw this error after 30 minutes: What steps should I take to try and prevent the error? Is it some sort of memory issue? Should I change the $fs and/or $fa values? If so, what should the values be? Should I increase values in the preferences? If so, what should I try? Rendering Polygon Mesh using CGAL... ERROR: CGAL error in CGALUtils::applyUnion3D: CGAL ERROR: assertion violation! Expr: itl != it->second.end() File: /mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_3/SNC_external_structure.h Line: 1152 Geometries in cache: 6 Geometry cache size in bytes: 118704128 CGAL Polyhedrons in cache: 5 CGAL cache size in bytes: 838592 Total rendering time: 0:30:08.772 Top level object is a 3D object: Facets: 1004 Rendering finished. [image: 2022-05-13_15-21-00.png] [image: 2022-05-13_15-02-05.png]
NH
nop head
Fri, May 13, 2022 8:01 PM

Your single object isn't manifold, so CGAl can't union three.

On Fri, 13 May 2022 at 20:25, Joe Weinpert joe.weinpert@gmail.com wrote:

When I rendered this with only one of the designs (instead of 3) it
rendered without a hitch. This tells me that there is no trouble with the
design itself.

When I rendered with three designs it threw this error after 30 minutes:

What steps should I take to try and prevent the error?

Is it some sort of memory issue?

Should I change the $fs and/or $fa values? If so, what should the values
be?

Should I increase values in the preferences? If so, what should I try?

Rendering Polygon Mesh using CGAL...

ERROR: CGAL error in CGALUtils::applyUnion3D: CGAL ERROR: assertion
violation! Expr: itl != it->second.end() File:
/mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_3/SNC_external_structure.h
Line: 1152

Geometries in cache: 6

Geometry cache size in bytes: 118704128

CGAL Polyhedrons in cache: 5

CGAL cache size in bytes: 838592

Total rendering time: 0:30:08.772

Top level object is a 3D object:

Facets: 1004

Rendering finished.

[image: 2022-05-13_15-21-00.png]

[image: 2022-05-13_15-02-05.png]


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Your single object isn't manifold, so CGAl can't union three. On Fri, 13 May 2022 at 20:25, Joe Weinpert <joe.weinpert@gmail.com> wrote: > When I rendered this with only one of the designs (instead of 3) it > rendered without a hitch. This tells me that there is no trouble with the > design itself. > > > When I rendered with three designs it threw this error after 30 minutes: > > > What steps should I take to try and prevent the error? > > > Is it some sort of memory issue? > > Should I change the $fs and/or $fa values? If so, what should the values > be? > > Should I increase values in the preferences? If so, what should I try? > > > > Rendering Polygon Mesh using CGAL... > > ERROR: CGAL error in CGALUtils::applyUnion3D: CGAL ERROR: assertion > violation! Expr: itl != it->second.end() File: > /mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_3/SNC_external_structure.h > Line: 1152 > > Geometries in cache: 6 > > Geometry cache size in bytes: 118704128 > > CGAL Polyhedrons in cache: 5 > > CGAL cache size in bytes: 838592 > > Total rendering time: 0:30:08.772 > > Top level object is a 3D object: > > Facets: 1004 > > Rendering finished. > > > > [image: 2022-05-13_15-21-00.png] > > > [image: 2022-05-13_15-02-05.png] > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
JW
Joe Weinpert
Fri, May 13, 2022 8:07 PM

What does that mean?  How do I fix it or change it?

On Fri, May 13, 2022 at 4:04 PM nop head nop.head@gmail.com wrote:

Your single object isn't manifold, so CGAl can't union three.

On Fri, 13 May 2022 at 20:25, Joe Weinpert joe.weinpert@gmail.com wrote:

When I rendered this with only one of the designs (instead of 3) it
rendered without a hitch. This tells me that there is no trouble with the
design itself.

When I rendered with three designs it threw this error after 30 minutes:

What steps should I take to try and prevent the error?

Is it some sort of memory issue?

Should I change the $fs and/or $fa values? If so, what should the values
be?

Should I increase values in the preferences? If so, what should I try?

Rendering Polygon Mesh using CGAL...

ERROR: CGAL error in CGALUtils::applyUnion3D: CGAL ERROR: assertion
violation! Expr: itl != it->second.end() File:
/mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_3/SNC_external_structure.h
Line: 1152

Geometries in cache: 6

Geometry cache size in bytes: 118704128

CGAL Polyhedrons in cache: 5

CGAL cache size in bytes: 838592

Total rendering time: 0:30:08.772

Top level object is a 3D object:

Facets: 1004

Rendering finished.

[image: 2022-05-13_15-21-00.png]

[image: 2022-05-13_15-02-05.png]


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

What does that mean? How do I fix it or change it? On Fri, May 13, 2022 at 4:04 PM nop head <nop.head@gmail.com> wrote: > Your single object isn't manifold, so CGAl can't union three. > > On Fri, 13 May 2022 at 20:25, Joe Weinpert <joe.weinpert@gmail.com> wrote: > >> When I rendered this with only one of the designs (instead of 3) it >> rendered without a hitch. This tells me that there is no trouble with the >> design itself. >> >> >> When I rendered with three designs it threw this error after 30 minutes: >> >> >> What steps should I take to try and prevent the error? >> >> >> Is it some sort of memory issue? >> >> Should I change the $fs and/or $fa values? If so, what should the values >> be? >> >> Should I increase values in the preferences? If so, what should I try? >> >> >> >> Rendering Polygon Mesh using CGAL... >> >> ERROR: CGAL error in CGALUtils::applyUnion3D: CGAL ERROR: assertion >> violation! Expr: itl != it->second.end() File: >> /mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_3/SNC_external_structure.h >> Line: 1152 >> >> Geometries in cache: 6 >> >> Geometry cache size in bytes: 118704128 >> >> CGAL Polyhedrons in cache: 5 >> >> CGAL cache size in bytes: 838592 >> >> Total rendering time: 0:30:08.772 >> >> Top level object is a 3D object: >> >> Facets: 1004 >> >> Rendering finished. >> >> >> >> [image: 2022-05-13_15-21-00.png] >> >> >> [image: 2022-05-13_15-02-05.png] >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
AM
Adrian Mariano
Fri, May 13, 2022 8:11 PM

To elaborate on what nophead said:  when you have just one object in a
model, CGAL is not invoked for processing, so it can be a completely
invalid model and you won't get an error.  Add just a cube into the model
and then CGAL runs and you get the error.  To fix it you have to figure out
why your model is invalid.

On Fri, May 13, 2022 at 3:24 PM Joe Weinpert joe.weinpert@gmail.com wrote:

When I rendered this with only one of the designs (instead of 3) it
rendered without a hitch. This tells me that there is no trouble with the
design itself.

When I rendered with three designs it threw this error after 30 minutes:

What steps should I take to try and prevent the error?

Is it some sort of memory issue?

Should I change the $fs and/or $fa values? If so, what should the values
be?

Should I increase values in the preferences? If so, what should I try?

Rendering Polygon Mesh using CGAL...

ERROR: CGAL error in CGALUtils::applyUnion3D: CGAL ERROR: assertion
violation! Expr: itl != it->second.end() File:
/mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_3/SNC_external_structure.h
Line: 1152

Geometries in cache: 6

Geometry cache size in bytes: 118704128

CGAL Polyhedrons in cache: 5

CGAL cache size in bytes: 838592

Total rendering time: 0:30:08.772

Top level object is a 3D object:

Facets: 1004

Rendering finished.

[image: 2022-05-13_15-21-00.png]

[image: 2022-05-13_15-02-05.png]


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

To elaborate on what nophead said: when you have just one object in a model, CGAL is not invoked for processing, so it can be a completely invalid model and you won't get an error. Add just a cube into the model and then CGAL runs and you get the error. To fix it you have to figure out why your model is invalid. On Fri, May 13, 2022 at 3:24 PM Joe Weinpert <joe.weinpert@gmail.com> wrote: > When I rendered this with only one of the designs (instead of 3) it > rendered without a hitch. This tells me that there is no trouble with the > design itself. > > > When I rendered with three designs it threw this error after 30 minutes: > > > What steps should I take to try and prevent the error? > > > Is it some sort of memory issue? > > Should I change the $fs and/or $fa values? If so, what should the values > be? > > Should I increase values in the preferences? If so, what should I try? > > > > Rendering Polygon Mesh using CGAL... > > ERROR: CGAL error in CGALUtils::applyUnion3D: CGAL ERROR: assertion > violation! Expr: itl != it->second.end() File: > /mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_3/SNC_external_structure.h > Line: 1152 > > Geometries in cache: 6 > > Geometry cache size in bytes: 118704128 > > CGAL Polyhedrons in cache: 5 > > CGAL cache size in bytes: 838592 > > Total rendering time: 0:30:08.772 > > Top level object is a 3D object: > > Facets: 1004 > > Rendering finished. > > > > [image: 2022-05-13_15-21-00.png] > > > [image: 2022-05-13_15-02-05.png] > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
JW
Joe Weinpert
Fri, May 13, 2022 8:29 PM

This particular design is made up of two different objects, the backboard
and the design.  When I created just the backboard by itself and rendered
it it was fine.  No errors.  When I created the design by itself and
rendered it was fine.  No errors.  Are you saying there could have been
errors, but CGAL did not say it?  I am using the vnf functions.

On Fri, May 13, 2022 at 4:11 PM Adrian Mariano avm4@cornell.edu wrote:

To elaborate on what nophead said:  when you have just one object in a
model, CGAL is not invoked for processing, so it can be a completely
invalid model and you won't get an error.  Add just a cube into the model
and then CGAL runs and you get the error.  To fix it you have to figure out
why your model is invalid.

On Fri, May 13, 2022 at 3:24 PM Joe Weinpert joe.weinpert@gmail.com
wrote:

When I rendered this with only one of the designs (instead of 3) it
rendered without a hitch. This tells me that there is no trouble with the
design itself.

When I rendered with three designs it threw this error after 30 minutes:

What steps should I take to try and prevent the error?

Is it some sort of memory issue?

Should I change the $fs and/or $fa values? If so, what should the values
be?

Should I increase values in the preferences? If so, what should I try?

Rendering Polygon Mesh using CGAL...

ERROR: CGAL error in CGALUtils::applyUnion3D: CGAL ERROR: assertion
violation! Expr: itl != it->second.end() File:
/mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_3/SNC_external_structure.h
Line: 1152

Geometries in cache: 6

Geometry cache size in bytes: 118704128

CGAL Polyhedrons in cache: 5

CGAL cache size in bytes: 838592

Total rendering time: 0:30:08.772

Top level object is a 3D object:

Facets: 1004

Rendering finished.

[image: 2022-05-13_15-21-00.png]

[image: 2022-05-13_15-02-05.png]


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

This particular design is made up of two different objects, the backboard and the design. When I created just the backboard by itself and rendered it it was fine. No errors. When I created the design by itself and rendered it was fine. No errors. Are you saying there could have been errors, but CGAL did not say it? I am using the vnf functions. On Fri, May 13, 2022 at 4:11 PM Adrian Mariano <avm4@cornell.edu> wrote: > To elaborate on what nophead said: when you have just one object in a > model, CGAL is not invoked for processing, so it can be a completely > invalid model and you won't get an error. Add just a cube into the model > and then CGAL runs and you get the error. To fix it you have to figure out > why your model is invalid. > > On Fri, May 13, 2022 at 3:24 PM Joe Weinpert <joe.weinpert@gmail.com> > wrote: > >> When I rendered this with only one of the designs (instead of 3) it >> rendered without a hitch. This tells me that there is no trouble with the >> design itself. >> >> >> When I rendered with three designs it threw this error after 30 minutes: >> >> >> What steps should I take to try and prevent the error? >> >> >> Is it some sort of memory issue? >> >> Should I change the $fs and/or $fa values? If so, what should the values >> be? >> >> Should I increase values in the preferences? If so, what should I try? >> >> >> >> Rendering Polygon Mesh using CGAL... >> >> ERROR: CGAL error in CGALUtils::applyUnion3D: CGAL ERROR: assertion >> violation! Expr: itl != it->second.end() File: >> /mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_3/SNC_external_structure.h >> Line: 1152 >> >> Geometries in cache: 6 >> >> Geometry cache size in bytes: 118704128 >> >> CGAL Polyhedrons in cache: 5 >> >> CGAL cache size in bytes: 838592 >> >> Total rendering time: 0:30:08.772 >> >> Top level object is a 3D object: >> >> Facets: 1004 >> >> Rendering finished. >> >> >> >> [image: 2022-05-13_15-21-00.png] >> >> >> [image: 2022-05-13_15-02-05.png] >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
JB
Jordan Brown
Fri, May 13, 2022 8:59 PM

On 5/13/2022 1:29 PM, Joe Weinpert wrote:

This particular design is made up of two different objects, the
backboard and the design.  When I created just the backboard by itself
and rendered it it was fine.  No errors.  When I created the design by
itself and rendered it was fine.  No errors.  Are you saying there
could have been errors, but CGAL did not say it?  I am using the vnf
functions.

Yes.  There's a class of errors that are only detected when CGAL (the
full rendering engine) gets involved, and it never gets involved if
there's only one object.

It would arguably be better if CGAL always got involved, but so far from
the outside I haven't found a way to force that without modifying the model.

When you have this kind of problem you can isolate it to one object by
disabling all but one object and then unioning that object with an
appropriately placed cube.

On 5/13/2022 1:29 PM, Joe Weinpert wrote: > This particular design is made up of two different objects, the > backboard and the design.  When I created just the backboard by itself > and rendered it it was fine.  No errors.  When I created the design by > itself and rendered it was fine.  No errors.  Are you saying there > could have been errors, but CGAL did not say it?  I am using the vnf > functions. Yes.  There's a class of errors that are only detected when CGAL (the full rendering engine) gets involved, and it never gets involved if there's only one object. It would arguably be better if CGAL always got involved, but so far from the outside I haven't found a way to force that without modifying the model. When you have this kind of problem you can isolate it to one object by disabling all but one object and then unioning that object with an appropriately placed cube.
JW
Joe Weinpert
Fri, May 13, 2022 10:29 PM

Well here is something that just happened.  I changed the code to remove
the BOSL2 xcopies() command ... and now it renders just fine.  Took a long
time but it was rendered.

Rendering Polygon Mesh using CGAL...
Geometries in cache: 2
Geometry cache size in bytes: 118559248
CGAL Polyhedrons in cache: 0
CGAL cache size in bytes: 0
Total rendering time: 0:51:28.114
Top level object is a 3D object:
Simple:        yes
Vertices:  547266
Halfedges:  2986684
Edges:      1493342
Halffacets: 1892156
Facets:    946078
Volumes:        2
Rendering finished.

Here is what the code was when rendering failed:

move([ 0, grapePosY, grapePosZ ])
xcopies( n=3, spacing=.5518+5.73134, sp=.5518 )
color( "tan" )
vnf_polyhedron(
vnf3,
anchor = BOTTOM+FRONT+RIGHT,
spin = -90
);

Here is what I changed it to after negating xcopies():

move([ .5518/2, grapePosY, grapePosZ ])
color( "tan" )
vnf_polyhedron(
vnf3,
anchor = BOTTOM+FRONT+RIGHT,
spin = -90
);

move([ .5518/2+5.73134+.5518, grapePosY, grapePosZ ])
color( "tan" )
vnf_polyhedron(
vnf3,
anchor = BOTTOM+FRONT+RIGHT,
spin = -90
);

move([ .5518/2+2*(5.73134+.5518), grapePosY, grapePosZ ])
color( "tan" )
vnf_polyhedron(
vnf3,
anchor = BOTTOM+FRONT+RIGHT,
spin = -90
);

So when I individualized the vnf_polyhedron() calls instead of using
xcopies() it rendered just fine.  I saved the STL and loaded it into
CURA, Meshmixer and Vector Aspire.  No problems with the openSCAD STL in
any of them.

I have no clue as to why removing the use of xcopies() would make a
difference.

On Fri, May 13, 2022 at 4:11 PM Adrian Mariano avm4@cornell.edu wrote:

To elaborate on what nophead said:  when you have just one object in a
model, CGAL is not invoked for processing, so it can be a completely
invalid model and you won't get an error.  Add just a cube into the model
and then CGAL runs and you get the error.  To fix it you have to figure out
why your model is invalid.

On Fri, May 13, 2022 at 3:24 PM Joe Weinpert joe.weinpert@gmail.com
wrote:

When I rendered this with only one of the designs (instead of 3) it
rendered without a hitch. This tells me that there is no trouble with the
design itself.

When I rendered with three designs it threw this error after 30 minutes:

What steps should I take to try and prevent the error?

Is it some sort of memory issue?

Should I change the $fs and/or $fa values? If so, what should the values
be?

Should I increase values in the preferences? If so, what should I try?

Rendering Polygon Mesh using CGAL...

ERROR: CGAL error in CGALUtils::applyUnion3D: CGAL ERROR: assertion
violation! Expr: itl != it->second.end() File:
/mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_3/SNC_external_structure.h
Line: 1152

Geometries in cache: 6

Geometry cache size in bytes: 118704128

CGAL Polyhedrons in cache: 5

CGAL cache size in bytes: 838592

Total rendering time: 0:30:08.772

Top level object is a 3D object:

Facets: 1004

Rendering finished.

[image: 2022-05-13_15-21-00.png]

[image: 2022-05-13_15-02-05.png]


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Well here is something that just happened. I changed the code to remove the BOSL2 xcopies() command ... and now it renders just fine. Took a long time but it was rendered. Rendering Polygon Mesh using CGAL... Geometries in cache: 2 Geometry cache size in bytes: 118559248 CGAL Polyhedrons in cache: 0 CGAL cache size in bytes: 0 Total rendering time: 0:51:28.114 Top level object is a 3D object: Simple: yes Vertices: 547266 Halfedges: 2986684 Edges: 1493342 Halffacets: 1892156 Facets: 946078 Volumes: 2 Rendering finished. Here is what the code was when rendering failed: move([ 0, grapePosY, grapePosZ ]) xcopies( n=3, spacing=.5518+5.73134, sp=.5518 ) color( "tan" ) vnf_polyhedron( vnf3, anchor = BOTTOM+FRONT+RIGHT, spin = -90 ); Here is what I changed it to after negating xcopies(): move([ .5518/2, grapePosY, grapePosZ ]) color( "tan" ) vnf_polyhedron( vnf3, anchor = BOTTOM+FRONT+RIGHT, spin = -90 ); move([ .5518/2+5.73134+.5518, grapePosY, grapePosZ ]) color( "tan" ) vnf_polyhedron( vnf3, anchor = BOTTOM+FRONT+RIGHT, spin = -90 ); move([ .5518/2+2*(5.73134+.5518), grapePosY, grapePosZ ]) color( "tan" ) vnf_polyhedron( vnf3, anchor = BOTTOM+FRONT+RIGHT, spin = -90 ); So when I individualized the *vnf_polyhedron()* calls instead of using *xcopies()* it rendered just fine. I saved the STL and loaded it into CURA, Meshmixer and Vector Aspire. No problems with the openSCAD STL in any of them. I have no clue as to why removing the use of xcopies() would make a difference. On Fri, May 13, 2022 at 4:11 PM Adrian Mariano <avm4@cornell.edu> wrote: > To elaborate on what nophead said: when you have just one object in a > model, CGAL is not invoked for processing, so it can be a completely > invalid model and you won't get an error. Add just a cube into the model > and then CGAL runs and you get the error. To fix it you have to figure out > why your model is invalid. > > On Fri, May 13, 2022 at 3:24 PM Joe Weinpert <joe.weinpert@gmail.com> > wrote: > >> When I rendered this with only one of the designs (instead of 3) it >> rendered without a hitch. This tells me that there is no trouble with the >> design itself. >> >> >> When I rendered with three designs it threw this error after 30 minutes: >> >> >> What steps should I take to try and prevent the error? >> >> >> Is it some sort of memory issue? >> >> Should I change the $fs and/or $fa values? If so, what should the values >> be? >> >> Should I increase values in the preferences? If so, what should I try? >> >> >> >> Rendering Polygon Mesh using CGAL... >> >> ERROR: CGAL error in CGALUtils::applyUnion3D: CGAL ERROR: assertion >> violation! Expr: itl != it->second.end() File: >> /mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_3/SNC_external_structure.h >> Line: 1152 >> >> Geometries in cache: 6 >> >> Geometry cache size in bytes: 118704128 >> >> CGAL Polyhedrons in cache: 5 >> >> CGAL cache size in bytes: 838592 >> >> Total rendering time: 0:30:08.772 >> >> Top level object is a 3D object: >> >> Facets: 1004 >> >> Rendering finished. >> >> >> >> [image: 2022-05-13_15-21-00.png] >> >> >> [image: 2022-05-13_15-02-05.png] >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
AM
Adrian Mariano
Sat, May 14, 2022 12:39 AM

That's pretty weird.  I have noticed that sometimes I can get away with
combining two invalid objects and somehow CGAL doesn't notice.  I don't
know what determines that, but it seems really strange that you can make
the same model and get a different result.

I suggest that you focus on troubleshooting your object to see if it
appears valid.  Take just one copy of your object and add a large cube that
intersects the object and see if it will render.  If you get the CGAL
error, that's evidence that your object is bad and you're going to be
bedeviled by problems until you fix whatever's wrong.  You might try
running vnf_validate on it, but with a large VNF that could run all day.
I wonder if there's an issue with the large face at the base.  That face
won't be coplanar after you curve it, which might cause some kind of
issue.

On Fri, May 13, 2022 at 6:30 PM Joe Weinpert joe.weinpert@gmail.com wrote:

Well here is something that just happened.  I changed the code to remove
the BOSL2 xcopies() command ... and now it renders just fine.  Took a long
time but it was rendered.

Rendering Polygon Mesh using CGAL...
Geometries in cache: 2
Geometry cache size in bytes: 118559248
CGAL Polyhedrons in cache: 0
CGAL cache size in bytes: 0
Total rendering time: 0:51:28.114
Top level object is a 3D object:
Simple:        yes
Vertices:  547266
Halfedges:  2986684
Edges:      1493342
Halffacets: 1892156
Facets:    946078
Volumes:        2
Rendering finished.

Here is what the code was when rendering failed:

move([ 0, grapePosY, grapePosZ ])
xcopies( n=3, spacing=.5518+5.73134, sp=.5518 )
color( "tan" )
vnf_polyhedron(
vnf3,
anchor = BOTTOM+FRONT+RIGHT,
spin = -90
);

Here is what I changed it to after negating xcopies():

move([ .5518/2, grapePosY, grapePosZ ])
color( "tan" )
vnf_polyhedron(
vnf3,
anchor = BOTTOM+FRONT+RIGHT,
spin = -90
);

move([ .5518/2+5.73134+.5518, grapePosY, grapePosZ ])
color( "tan" )
vnf_polyhedron(
vnf3,
anchor = BOTTOM+FRONT+RIGHT,
spin = -90
);

move([ .5518/2+2*(5.73134+.5518), grapePosY, grapePosZ ])
color( "tan" )
vnf_polyhedron(
vnf3,
anchor = BOTTOM+FRONT+RIGHT,
spin = -90
);

So when I individualized the vnf_polyhedron() calls instead of using
xcopies() it rendered just fine.  I saved the STL and loaded it into
CURA, Meshmixer and Vector Aspire.  No problems with the openSCAD STL in
any of them.

I have no clue as to why removing the use of xcopies() would make a
difference.

On Fri, May 13, 2022 at 4:11 PM Adrian Mariano avm4@cornell.edu wrote:

To elaborate on what nophead said:  when you have just one object in a
model, CGAL is not invoked for processing, so it can be a completely
invalid model and you won't get an error.  Add just a cube into the model
and then CGAL runs and you get the error.  To fix it you have to figure out
why your model is invalid.

On Fri, May 13, 2022 at 3:24 PM Joe Weinpert joe.weinpert@gmail.com
wrote:

When I rendered this with only one of the designs (instead of 3) it
rendered without a hitch. This tells me that there is no trouble with the
design itself.

When I rendered with three designs it threw this error after 30 minutes:

What steps should I take to try and prevent the error?

Is it some sort of memory issue?

Should I change the $fs and/or $fa values? If so, what should the values
be?

Should I increase values in the preferences? If so, what should I try?

Rendering Polygon Mesh using CGAL...

ERROR: CGAL error in CGALUtils::applyUnion3D: CGAL ERROR: assertion
violation! Expr: itl != it->second.end() File:
/mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_3/SNC_external_structure.h
Line: 1152

Geometries in cache: 6

Geometry cache size in bytes: 118704128

CGAL Polyhedrons in cache: 5

CGAL cache size in bytes: 838592

Total rendering time: 0:30:08.772

Top level object is a 3D object:

Facets: 1004

Rendering finished.

[image: 2022-05-13_15-21-00.png]

[image: 2022-05-13_15-02-05.png]


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

That's pretty weird. I have noticed that sometimes I can get away with combining two invalid objects and somehow CGAL doesn't notice. I don't know what determines that, but it seems really strange that you can make the same model and get a different result. I suggest that you focus on troubleshooting your object to see if it appears valid. Take just one copy of your object and add a large cube that intersects the object and see if it will render. If you get the CGAL error, that's evidence that your object is bad and you're going to be bedeviled by problems until you fix whatever's wrong. You might try running vnf_validate on it, but with a large VNF that could run all day. I wonder if there's an issue with the large face at the base. That face won't be coplanar after you curve it, which might cause some kind of issue. On Fri, May 13, 2022 at 6:30 PM Joe Weinpert <joe.weinpert@gmail.com> wrote: > Well here is something that just happened. I changed the code to remove > the BOSL2 xcopies() command ... and now it renders just fine. Took a long > time but it was rendered. > > Rendering Polygon Mesh using CGAL... > Geometries in cache: 2 > Geometry cache size in bytes: 118559248 > CGAL Polyhedrons in cache: 0 > CGAL cache size in bytes: 0 > Total rendering time: 0:51:28.114 > Top level object is a 3D object: > Simple: yes > Vertices: 547266 > Halfedges: 2986684 > Edges: 1493342 > Halffacets: 1892156 > Facets: 946078 > Volumes: 2 > Rendering finished. > > > > Here is what the code was when rendering failed: > > move([ 0, grapePosY, grapePosZ ]) > xcopies( n=3, spacing=.5518+5.73134, sp=.5518 ) > color( "tan" ) > vnf_polyhedron( > vnf3, > anchor = BOTTOM+FRONT+RIGHT, > spin = -90 > ); > > > Here is what I changed it to after negating xcopies(): > > move([ .5518/2, grapePosY, grapePosZ ]) > color( "tan" ) > vnf_polyhedron( > vnf3, > anchor = BOTTOM+FRONT+RIGHT, > spin = -90 > ); > > > move([ .5518/2+5.73134+.5518, grapePosY, grapePosZ ]) > color( "tan" ) > vnf_polyhedron( > vnf3, > anchor = BOTTOM+FRONT+RIGHT, > spin = -90 > ); > > > move([ .5518/2+2*(5.73134+.5518), grapePosY, grapePosZ ]) > color( "tan" ) > vnf_polyhedron( > vnf3, > anchor = BOTTOM+FRONT+RIGHT, > spin = -90 > ); > > > So when I individualized the *vnf_polyhedron()* calls instead of using > *xcopies()* it rendered just fine. I saved the STL and loaded it into > CURA, Meshmixer and Vector Aspire. No problems with the openSCAD STL in > any of them. > > I have no clue as to why removing the use of xcopies() would make a > difference. > > > > On Fri, May 13, 2022 at 4:11 PM Adrian Mariano <avm4@cornell.edu> wrote: > >> To elaborate on what nophead said: when you have just one object in a >> model, CGAL is not invoked for processing, so it can be a completely >> invalid model and you won't get an error. Add just a cube into the model >> and then CGAL runs and you get the error. To fix it you have to figure out >> why your model is invalid. >> >> On Fri, May 13, 2022 at 3:24 PM Joe Weinpert <joe.weinpert@gmail.com> >> wrote: >> >>> When I rendered this with only one of the designs (instead of 3) it >>> rendered without a hitch. This tells me that there is no trouble with the >>> design itself. >>> >>> >>> When I rendered with three designs it threw this error after 30 minutes: >>> >>> >>> What steps should I take to try and prevent the error? >>> >>> >>> Is it some sort of memory issue? >>> >>> Should I change the $fs and/or $fa values? If so, what should the values >>> be? >>> >>> Should I increase values in the preferences? If so, what should I try? >>> >>> >>> >>> Rendering Polygon Mesh using CGAL... >>> >>> ERROR: CGAL error in CGALUtils::applyUnion3D: CGAL ERROR: assertion >>> violation! Expr: itl != it->second.end() File: >>> /mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_3/SNC_external_structure.h >>> Line: 1152 >>> >>> Geometries in cache: 6 >>> >>> Geometry cache size in bytes: 118704128 >>> >>> CGAL Polyhedrons in cache: 5 >>> >>> CGAL cache size in bytes: 838592 >>> >>> Total rendering time: 0:30:08.772 >>> >>> Top level object is a 3D object: >>> >>> Facets: 1004 >>> >>> Rendering finished. >>> >>> >>> >>> [image: 2022-05-13_15-21-00.png] >>> >>> >>> [image: 2022-05-13_15-02-05.png] >>> _______________________________________________ >>> OpenSCAD mailing list >>> To unsubscribe send an email to discuss-leave@lists.openscad.org >>> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >