discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: STL compile warning for simplest rotate_extrude() combo

NH
nop head
Mon, Nov 7, 2022 9:17 AM

I think it is because you have sloping coincident faces where the outer
ring touches the inner ring. Due to numerical accuracy limitations
representing irritation numbers due to the rotation of each plane they
don't line up exactly, which is why you get 13 volumes instead of 2.

The shape can be represented with a single polygon, e.g.

rotate_extrude(convexity=1,
$fn=23) {
polygon(points=[pt03, pt00, pt02, pt01]);
}

Or they can be unioned in 2D as you said. or they must overlap slightly.

On Mon, 7 Nov 2022 at 00:36, neri-engineering via Discuss <
discuss@lists.openscad.org> wrote:

---------- Forwarded message ----------
From: neri-engineering neri-engineering@protonmail.com
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc:
Bcc:
Date: Mon, 07 Nov 2022 00:35:34 +0000
Subject: [OpenSCAD] STL compile warning for simplest rotate_extrude() combo
Using OpenSCAD 2021.01 on Ubuntu 22.10.

I have a very nice workflow in my projects, and part of that workflow
involves compiling parts to STL format on the command-line.  E.g. a UNIX
script  that would look like this (much simplified for purposes of this
discussion):

#!/bin/sh
openscad -o "extrude.stl"
"extrude.scad"

I then have the file "extrude.scad" which looks like so:

pt00=[5,3];
pt01=[7,6];
pt02=[6,7];
pt03=[9,5];
rotate_extrude(convexity=1,
$fn=23) {
polygon(points=[pt00,pt01,pt02]);
}
rotate_extrude(convexity=1,
$fn=23) {
polygon(points=[pt00,pt03,pt01]);
}

I noticed that when combining rotate_extrude() in such a manner (as above)
I consistently get STL compile warnings of this nature:

Geometries in cache: 4
Geometry cache size in bytes: 20432
CGAL Polyhedrons in cache: 1
CGAL cache size in bytes: 283680
Total rendering time: 0:00:00.261
Top level object is a 3D object:
Simple:        no
Vertices:      92
Halfedges:    622
Edges:        311
Halffacets:    444
Facets:        222
Volumes:        13
WARNING: Object may not be a valid 2-manifold and may need repair!
EXPORT-WARNING: Exported object may not be a valid 2-manifold and may need
repair

Just wondering.  I strive to get rid of all warnings.  I feel better that
way.  I have more of a guarantee that my STL files will play nice with
other apps.  For example I can union() the two polygon() objects and pass
the union through rotate_extrude().  That will solve the issue.  But in the
general case I am relying on different objects being joined together, and I
would like them to compile to STL w/o warnings.  If  I define polyhedron()
myself, bypassing rotate_extrude() altogether, then the compile warning
goes away as well.  It seems that rotate_extrude() does not play nice with
combinations and compiling to STL.  Any thoughts?  I can work around these
issues but it's much work to keep working around it.  I thought there would
be a simple solution, but after searching there seems to be no simple
solution, if I insist on no compile warnings.  Sorry if I missed something
obvious.

Sent with Proton Mail https://proton.me/ secure email.

---------- Forwarded message ----------
From: neri-engineering via Discuss discuss@lists.openscad.org
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc: neri-engineering neri-engineering@protonmail.com
Bcc:
Date: Mon, 07 Nov 2022 00:35:34 +0000
Subject: [OpenSCAD] STL compile warning for simplest rotate_extrude() combo


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

I think it is because you have sloping coincident faces where the outer ring touches the inner ring. Due to numerical accuracy limitations representing irritation numbers due to the rotation of each plane they don't line up exactly, which is why you get 13 volumes instead of 2. The shape can be represented with a single polygon, e.g. rotate_extrude(convexity=1, $fn=23) { polygon(points=[pt03, pt00, pt02, pt01]); } Or they can be unioned in 2D as you said. or they must overlap slightly. On Mon, 7 Nov 2022 at 00:36, neri-engineering via Discuss < discuss@lists.openscad.org> wrote: > > > > ---------- Forwarded message ---------- > From: neri-engineering <neri-engineering@protonmail.com> > To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org> > Cc: > Bcc: > Date: Mon, 07 Nov 2022 00:35:34 +0000 > Subject: [OpenSCAD] STL compile warning for simplest rotate_extrude() combo > Using OpenSCAD 2021.01 on Ubuntu 22.10. > > I have a very nice workflow in my projects, and part of that workflow > involves compiling parts to STL format on the command-line. E.g. a UNIX > script that would look like this (much simplified for purposes of this > discussion): > > #!/bin/sh > openscad -o "extrude.stl" \ > "extrude.scad" > > I then have the file "extrude.scad" which looks like so: > > pt00=[5,3]; > pt01=[7,6]; > pt02=[6,7]; > pt03=[9,5]; > rotate_extrude(convexity=1, > $fn=23) { > polygon(points=[pt00,pt01,pt02]); > } > rotate_extrude(convexity=1, > $fn=23) { > polygon(points=[pt00,pt03,pt01]); > } > > I noticed that when combining rotate_extrude() in such a manner (as above) > I consistently get STL compile warnings of this nature: > > Geometries in cache: 4 > Geometry cache size in bytes: 20432 > CGAL Polyhedrons in cache: 1 > CGAL cache size in bytes: 283680 > Total rendering time: 0:00:00.261 > Top level object is a 3D object: > Simple: no > Vertices: 92 > Halfedges: 622 > Edges: 311 > Halffacets: 444 > Facets: 222 > Volumes: 13 > WARNING: Object may not be a valid 2-manifold and may need repair! > EXPORT-WARNING: Exported object may not be a valid 2-manifold and may need > repair > > Just wondering. I strive to get rid of all warnings. I feel better that > way. I have more of a guarantee that my STL files will play nice with > other apps. For example I can union() the two polygon() objects and pass > the union through rotate_extrude(). That will solve the issue. But in the > general case I am relying on different objects being joined together, and I > would like them to compile to STL w/o warnings. If I define polyhedron() > myself, bypassing rotate_extrude() altogether, then the compile warning > goes away as well. It seems that rotate_extrude() does not play nice with > combinations and compiling to STL. Any thoughts? I can work around these > issues but it's much work to keep working around it. I thought there would > be a simple solution, but after searching there seems to be no simple > solution, if I insist on no compile warnings. Sorry if I missed something > obvious. > > Sent with Proton Mail <https://proton.me/> secure email. > > > > ---------- Forwarded message ---------- > From: neri-engineering via Discuss <discuss@lists.openscad.org> > To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org> > Cc: neri-engineering <neri-engineering@protonmail.com> > Bcc: > Date: Mon, 07 Nov 2022 00:35:34 +0000 > Subject: [OpenSCAD] STL compile warning for simplest rotate_extrude() combo > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
MM
Michael Möller
Mon, Nov 7, 2022 9:24 AM

"Due to numerical accuracy limitations representing irritation numbers "

Oh yes, very irritating they are :-) :-D

Michael, fra mobilen

man. 7. nov. 2022 10.18 skrev nop head nop.head@gmail.com:

I think it is because you have sloping coincident faces where the outer
ring touches the inner ring. Due to numerical accuracy limitations
representing irritation numbers due to the rotation of each plane they
don't line up exactly, which is why you get 13 volumes instead of 2.

The shape can be represented with a single polygon, e.g.

rotate_extrude(convexity=1,
$fn=23) {
polygon(points=[pt03, pt00, pt02, pt01]);
}

Or they can be unioned in 2D as you said. or they must overlap slightly.

On Mon, 7 Nov 2022 at 00:36, neri-engineering via Discuss <
discuss@lists.openscad.org> wrote:

---------- Forwarded message ----------
From: neri-engineering neri-engineering@protonmail.com
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc:
Bcc:
Date: Mon, 07 Nov 2022 00:35:34 +0000
Subject: [OpenSCAD] STL compile warning for simplest rotate_extrude()
combo
Using OpenSCAD 2021.01 on Ubuntu 22.10.

I have a very nice workflow in my projects, and part of that workflow
involves compiling parts to STL format on the command-line.  E.g. a UNIX
script  that would look like this (much simplified for purposes of this
discussion):

#!/bin/sh
openscad -o "extrude.stl"
"extrude.scad"

I then have the file "extrude.scad" which looks like so:

pt00=[5,3];
pt01=[7,6];
pt02=[6,7];
pt03=[9,5];
rotate_extrude(convexity=1,
$fn=23) {
polygon(points=[pt00,pt01,pt02]);
}
rotate_extrude(convexity=1,
$fn=23) {
polygon(points=[pt00,pt03,pt01]);
}

I noticed that when combining rotate_extrude() in such a manner (as
above) I consistently get STL compile warnings of this nature:

Geometries in cache: 4
Geometry cache size in bytes: 20432
CGAL Polyhedrons in cache: 1
CGAL cache size in bytes: 283680
Total rendering time: 0:00:00.261
Top level object is a 3D object:
Simple:        no
Vertices:      92
Halfedges:    622
Edges:        311
Halffacets:    444
Facets:        222
Volumes:        13
WARNING: Object may not be a valid 2-manifold and may need repair!
EXPORT-WARNING: Exported object may not be a valid 2-manifold and may
need repair

Just wondering.  I strive to get rid of all warnings.  I feel better that
way.  I have more of a guarantee that my STL files will play nice with
other apps.  For example I can union() the two polygon() objects and pass
the union through rotate_extrude().  That will solve the issue.  But in the
general case I am relying on different objects being joined together, and I
would like them to compile to STL w/o warnings.  If  I define polyhedron()
myself, bypassing rotate_extrude() altogether, then the compile warning
goes away as well.  It seems that rotate_extrude() does not play nice with
combinations and compiling to STL.  Any thoughts?  I can work around these
issues but it's much work to keep working around it.  I thought there would
be a simple solution, but after searching there seems to be no simple
solution, if I insist on no compile warnings.  Sorry if I missed something
obvious.

Sent with Proton Mail https://proton.me/ secure email.

---------- Forwarded message ----------
From: neri-engineering via Discuss discuss@lists.openscad.org
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc: neri-engineering neri-engineering@protonmail.com
Bcc:
Date: Mon, 07 Nov 2022 00:35:34 +0000
Subject: [OpenSCAD] STL compile warning for simplest rotate_extrude()
combo


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

"Due to numerical accuracy limitations representing irritation numbers " Oh yes, very irritating they are :-) :-D Michael, fra mobilen man. 7. nov. 2022 10.18 skrev nop head <nop.head@gmail.com>: > I think it is because you have sloping coincident faces where the outer > ring touches the inner ring. Due to numerical accuracy limitations > representing irritation numbers due to the rotation of each plane they > don't line up exactly, which is why you get 13 volumes instead of 2. > > The shape can be represented with a single polygon, e.g. > > rotate_extrude(convexity=1, > $fn=23) { > polygon(points=[pt03, pt00, pt02, pt01]); > } > > Or they can be unioned in 2D as you said. or they must overlap slightly. > > > On Mon, 7 Nov 2022 at 00:36, neri-engineering via Discuss < > discuss@lists.openscad.org> wrote: > >> >> >> >> ---------- Forwarded message ---------- >> From: neri-engineering <neri-engineering@protonmail.com> >> To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org> >> Cc: >> Bcc: >> Date: Mon, 07 Nov 2022 00:35:34 +0000 >> Subject: [OpenSCAD] STL compile warning for simplest rotate_extrude() >> combo >> Using OpenSCAD 2021.01 on Ubuntu 22.10. >> >> I have a very nice workflow in my projects, and part of that workflow >> involves compiling parts to STL format on the command-line. E.g. a UNIX >> script that would look like this (much simplified for purposes of this >> discussion): >> >> #!/bin/sh >> openscad -o "extrude.stl" \ >> "extrude.scad" >> >> I then have the file "extrude.scad" which looks like so: >> >> pt00=[5,3]; >> pt01=[7,6]; >> pt02=[6,7]; >> pt03=[9,5]; >> rotate_extrude(convexity=1, >> $fn=23) { >> polygon(points=[pt00,pt01,pt02]); >> } >> rotate_extrude(convexity=1, >> $fn=23) { >> polygon(points=[pt00,pt03,pt01]); >> } >> >> I noticed that when combining rotate_extrude() in such a manner (as >> above) I consistently get STL compile warnings of this nature: >> >> Geometries in cache: 4 >> Geometry cache size in bytes: 20432 >> CGAL Polyhedrons in cache: 1 >> CGAL cache size in bytes: 283680 >> Total rendering time: 0:00:00.261 >> Top level object is a 3D object: >> Simple: no >> Vertices: 92 >> Halfedges: 622 >> Edges: 311 >> Halffacets: 444 >> Facets: 222 >> Volumes: 13 >> WARNING: Object may not be a valid 2-manifold and may need repair! >> EXPORT-WARNING: Exported object may not be a valid 2-manifold and may >> need repair >> >> Just wondering. I strive to get rid of all warnings. I feel better that >> way. I have more of a guarantee that my STL files will play nice with >> other apps. For example I can union() the two polygon() objects and pass >> the union through rotate_extrude(). That will solve the issue. But in the >> general case I am relying on different objects being joined together, and I >> would like them to compile to STL w/o warnings. If I define polyhedron() >> myself, bypassing rotate_extrude() altogether, then the compile warning >> goes away as well. It seems that rotate_extrude() does not play nice with >> combinations and compiling to STL. Any thoughts? I can work around these >> issues but it's much work to keep working around it. I thought there would >> be a simple solution, but after searching there seems to be no simple >> solution, if I insist on no compile warnings. Sorry if I missed something >> obvious. >> >> Sent with Proton Mail <https://proton.me/> secure email. >> >> >> >> ---------- Forwarded message ---------- >> From: neri-engineering via Discuss <discuss@lists.openscad.org> >> To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org> >> Cc: neri-engineering <neri-engineering@protonmail.com> >> Bcc: >> Date: Mon, 07 Nov 2022 00:35:34 +0000 >> Subject: [OpenSCAD] STL compile warning for simplest rotate_extrude() >> combo >> _______________________________________________ >> 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 >