discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

relative speeds of F6

GH
gene heskett
Wed, Feb 9, 2022 11:03 AM

Greetings all;

Whats the relative speed between:

359 iterations of a cylinder(h=3.175,r=5,center=true);
and 359 iterations of a cube with 3 var args,center=true?

The point being that a cube just wide enough vs a sq made by cylinder,
would leave a smoother surface on both inside and outside of the thread.

If the cube is faster, I'll convert this code.

Cheers, Gene Heskett.

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.

Greetings all; Whats the relative speed between: 359 iterations of a cylinder(h=3.175,r=5,center=true); and 359 iterations of a cube with 3 var args,center=true? The point being that a cube just wide enough vs a sq made by cylinder, would leave a smoother surface on both inside and outside of the thread. If the cube is faster, I'll convert this code. Cheers, Gene Heskett. -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author, 1940) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene>
MM
Michael Möller
Wed, Feb 9, 2022 11:40 AM

Depends on too much else, so here is a (too ?) simple test

for ( i = [1:400] ) translate([i,i/2,i/4])
cube([1+i/100,2+i/88,2-i/88],center=true) ;
for ( i = [1:400] ) translate([i,i/2,i/4])
cylinder(r=3.2,h=3+i/100,center=true) ;

Geometry cache size in bytes: 291928    Geometry cache size in bytes:
2003928
CGAL Polyhedrons in cache: 1            CGAL Polyhedrons in cache: 3
CGAL cache size in bytes: 5699488        CGAL cache size in bytes: 22387440
Total rendering time: 0:00:41.585        Total rendering time: 0:01:09.567
Top level object is a 3D object:        Top level object is a 3D object:
Simple:        yes                      Simple:        yes
Vertices:    3998                      Vertices:    10396
Halfedges:  12792                      Halfedges:  31188
Edges:        6396                      Edges:      15594
Halffacets:  4800                      Halffacets:  10400
Facets:      2400                      Facets:      5200
Volumes:        2                      Volumes:        2
Rendering finished.                      Rendering finished.

On Wed, 9 Feb 2022 at 12:23, gene heskett gheskett@shentel.net wrote:

Greetings all;

Whats the relative speed between:

359 iterations of a cylinder(h=3.175,r=5,center=true);
and 359 iterations of a cube with 3 var args,center=true?

The point being that a cube just wide enough vs a sq made by cylinder,
would leave a smoother surface on both inside and outside of the thread.

If the cube is faster, I'll convert this code.

Cheers, Gene Heskett.

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.


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

Depends on too much else, so here is a (too ?) simple test for ( i = [1:400] ) translate([i,i/2,i/4]) cube([1+i/100,2+i/88,2-i/88],center=true) ; for ( i = [1:400] ) translate([i,i/2,i/4]) cylinder(r=3.2,h=3+i/100,center=true) ; Geometry cache size in bytes: 291928 Geometry cache size in bytes: 2003928 CGAL Polyhedrons in cache: 1 CGAL Polyhedrons in cache: 3 CGAL cache size in bytes: 5699488 CGAL cache size in bytes: 22387440 Total rendering time: 0:00:41.585 Total rendering time: 0:01:09.567 Top level object is a 3D object: Top level object is a 3D object: Simple: yes Simple: yes Vertices: 3998 Vertices: 10396 Halfedges: 12792 Halfedges: 31188 Edges: 6396 Edges: 15594 Halffacets: 4800 Halffacets: 10400 Facets: 2400 Facets: 5200 Volumes: 2 Volumes: 2 Rendering finished. Rendering finished. On Wed, 9 Feb 2022 at 12:23, gene heskett <gheskett@shentel.net> wrote: > Greetings all; > > Whats the relative speed between: > > 359 iterations of a cylinder(h=3.175,r=5,center=true); > and 359 iterations of a cube with 3 var args,center=true? > > The point being that a cube just wide enough vs a sq made by cylinder, > would leave a smoother surface on both inside and outside of the thread. > > If the cube is faster, I'll convert this code. > > Cheers, Gene Heskett. > -- > "There are four boxes to be used in defense of liberty: > soap, ballot, jury, and ammo. Please use in that order." > -Ed Howdershelt (Author, 1940) > If we desire respect for the law, we must first make the law respectable. > - Louis D. Brandeis > Genes Web page <http://geneslinuxbox.net:6309/gene> > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
GH
gene heskett
Wed, Feb 9, 2022 3:04 PM

On Wednesday, February 9, 2022 6:40:14 AM EST Michael Möller wrote:

Depends on too much else, so here is a (too ?) simple test

for ( i = [1:400] ) translate([i,i/2,i/4])
cube([1+i/100,2+i/88,2-i/88],center=true) ;
for ( i = [1:400] ) translate([i,i/2,i/4])
cylinder(r=3.2,h=3+i/100,center=true) ;

Geometry cache size in bytes: 291928    Geometry cache size in bytes:
2003928
CGAL Polyhedrons in cache: 1            CGAL Polyhedrons in cache: 3
CGAL cache size in bytes: 5699488        CGAL cache size in bytes:
22387440 Total rendering time: 0:00:41.585        Total rendering
time: 0:01:09.567 Top level object is a 3D object:        Top level
object is a 3D object: Simple:        yes
Simple:        yes Vertices:    3998                      Vertices:
10396 Halfedges:  12792                      Halfedges:  31188
Edges:        6396                      Edges:      15594
Halffacets:  4800                      Halffacets:  10400 Facets:
2400                      Facets:      5200 Volumes:        2
Volumes:        2 Rendering finished.
Rendering finished.

if the left column is cube, it wins, and the right column is cylinder,
its slower but they are not identified as to which is which here.

On Wed, 9 Feb 2022 at 12:23, gene heskett gheskett@shentel.net wrote:

Greetings all;

Whats the relative speed between:

359 iterations of a cylinder(h=3.175,r=5,center=true);
and 359 iterations of a cube with 3 var args,center=true?

The point being that a cube just wide enough vs a sq made by
cylinder,
would leave a smoother surface on both inside and outside of the
thread.

If the cube is faster, I'll convert this code.

But Ray pointed out in a PM that for wood, I should use a buttress
thread, which they don't grind mills for, but a 60 degree engraving bit
with a 20 degree wedge under the motor mount would come pretty close, so
thats being considered.

Thanks all.

Cheers, Gene Heskett.

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.

On Wednesday, February 9, 2022 6:40:14 AM EST Michael Möller wrote: > Depends on too much else, so here is a (too ?) simple test > > for ( i = [1:400] ) translate([i,i/2,i/4]) > cube([1+i/100,2+i/88,2-i/88],center=true) ; > for ( i = [1:400] ) translate([i,i/2,i/4]) > cylinder(r=3.2,h=3+i/100,center=true) ; > > Geometry cache size in bytes: 291928 Geometry cache size in bytes: > 2003928 > CGAL Polyhedrons in cache: 1 CGAL Polyhedrons in cache: 3 > CGAL cache size in bytes: 5699488 CGAL cache size in bytes: > 22387440 Total rendering time: 0:00:41.585 Total rendering > time: 0:01:09.567 Top level object is a 3D object: Top level > object is a 3D object: Simple: yes > Simple: yes Vertices: 3998 Vertices: > 10396 Halfedges: 12792 Halfedges: 31188 > Edges: 6396 Edges: 15594 > Halffacets: 4800 Halffacets: 10400 Facets: > 2400 Facets: 5200 Volumes: 2 > Volumes: 2 Rendering finished. > Rendering finished. if the left column is cube, it wins, and the right column is cylinder, its slower but they are not identified as to which is which here. > On Wed, 9 Feb 2022 at 12:23, gene heskett <gheskett@shentel.net> wrote: > > Greetings all; > > > > Whats the relative speed between: > > > > 359 iterations of a cylinder(h=3.175,r=5,center=true); > > and 359 iterations of a cube with 3 var args,center=true? > > > > The point being that a cube just wide enough vs a sq made by > > cylinder, > > would leave a smoother surface on both inside and outside of the > > thread. > > > > If the cube is faster, I'll convert this code. But Ray pointed out in a PM that for wood, I should use a buttress thread, which they don't grind mills for, but a 60 degree engraving bit with a 20 degree wedge under the motor mount would come pretty close, so thats being considered. Thanks all. Cheers, Gene Heskett. -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author, 1940) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene>
BC
Bob Carter
Wed, Feb 9, 2022 3:19 PM

Michael,
I am puzzled as to why I am seeing only half the geometry that your cube test generates whilst the cylinder matches exactly.

But I do like the performance of Marius’s M1 native OpenSCAD build.

Cube
for ( i = [1:400] ) translate([i,i/2,i/4]) cube([1+i/100,2+i/88,2-i/88],center=true) ;
Geometry cache size in bytes: 323200
CGAL Polyhedrons in cache: 1
CGAL cache size in bytes: 2715136
Total rendering time: 0:00:02.859
Top level object is a 3D object:
Simple: yes
Vertices: 2012
Halfedges: 6036
Edges: 3018
Halffacets: 2100
Facets: 1050
Volumes: 23
Rendering finished.

Cylinder
for ( i = [1:400] ) translate([i,i/2,i/4]) cylinder(r=3.2,h=3+i/100,center=true) ;
Geometry cache size in bytes: 1712000
CGAL Polyhedrons in cache: 2
CGAL cache size in bytes: 16687952
Total rendering time: 0:00:17.202
Top level object is a 3D object:
Simple: yes
Vertices: 10396
Halfedges: 31188
Edges: 15594
Halffacets: 10400
Facets: 5200
Volumes: 2
Rendering finished.

On 9 Feb 2022, at 11:40, Michael Möller private2michael@gmail.com wrote:

Depends on too much else, so here is a (too ?) simple test

for ( i = [1:400] ) translate([i,i/2,i/4]) cube([1+i/100,2+i/88,2-i/88],center=true) ;
for ( i = [1:400] ) translate([i,i/2,i/4]) cylinder(r=3.2,h=3+i/100,center=true) ;

Geometry cache size in bytes: 291928    Geometry cache size in bytes: 2003928
CGAL Polyhedrons in cache: 1            CGAL Polyhedrons in cache: 3
CGAL cache size in bytes: 5699488        CGAL cache size in bytes: 22387440
Total rendering time: 0:00:41.585        Total rendering time: 0:01:09.567
Top level object is a 3D object:        Top level object is a 3D object:
Simple:        yes                      Simple:        yes
Vertices:    3998                      Vertices:    10396
Halfedges:  12792                      Halfedges:  31188
Edges:        6396                      Edges:      15594
Halffacets:  4800                      Halffacets:  10400
Facets:      2400                      Facets:      5200
Volumes:        2                      Volumes:        2
Rendering finished.                      Rendering finished.

On Wed, 9 Feb 2022 at 12:23, gene heskett <gheskett@shentel.net mailto:gheskett@shentel.net> wrote:
Greetings all;

Whats the relative speed between:

359 iterations of a cylinder(h=3.175,r=5,center=true);
and 359 iterations of a cube with 3 var args,center=true?

The point being that a cube just wide enough vs a sq made by cylinder,
would leave a smoother surface on both inside and outside of the thread.

If the cube is faster, I'll convert this code.

Cheers, Gene Heskett.

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.


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


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

Michael, I am puzzled as to why I am seeing only half the geometry that your cube test generates whilst the cylinder matches exactly. But I do like the performance of Marius’s M1 native OpenSCAD build. Cube for ( i = [1:400] ) translate([i,i/2,i/4]) cube([1+i/100,2+i/88,2-i/88],center=true) ; Geometry cache size in bytes: 323200 CGAL Polyhedrons in cache: 1 CGAL cache size in bytes: 2715136 Total rendering time: 0:00:02.859 Top level object is a 3D object: Simple: yes Vertices: 2012 Halfedges: 6036 Edges: 3018 Halffacets: 2100 Facets: 1050 Volumes: 23 Rendering finished. Cylinder for ( i = [1:400] ) translate([i,i/2,i/4]) cylinder(r=3.2,h=3+i/100,center=true) ; Geometry cache size in bytes: 1712000 CGAL Polyhedrons in cache: 2 CGAL cache size in bytes: 16687952 Total rendering time: 0:00:17.202 Top level object is a 3D object: Simple: yes Vertices: 10396 Halfedges: 31188 Edges: 15594 Halffacets: 10400 Facets: 5200 Volumes: 2 Rendering finished. > On 9 Feb 2022, at 11:40, Michael Möller <private2michael@gmail.com> wrote: > > Depends on too much else, so here is a (too ?) simple test > > for ( i = [1:400] ) translate([i,i/2,i/4]) cube([1+i/100,2+i/88,2-i/88],center=true) ; > for ( i = [1:400] ) translate([i,i/2,i/4]) cylinder(r=3.2,h=3+i/100,center=true) ; > > Geometry cache size in bytes: 291928 Geometry cache size in bytes: 2003928 > CGAL Polyhedrons in cache: 1 CGAL Polyhedrons in cache: 3 > CGAL cache size in bytes: 5699488 CGAL cache size in bytes: 22387440 > Total rendering time: 0:00:41.585 Total rendering time: 0:01:09.567 > Top level object is a 3D object: Top level object is a 3D object: > Simple: yes Simple: yes > Vertices: 3998 Vertices: 10396 > Halfedges: 12792 Halfedges: 31188 > Edges: 6396 Edges: 15594 > Halffacets: 4800 Halffacets: 10400 > Facets: 2400 Facets: 5200 > Volumes: 2 Volumes: 2 > Rendering finished. Rendering finished. > > > > On Wed, 9 Feb 2022 at 12:23, gene heskett <gheskett@shentel.net <mailto:gheskett@shentel.net>> wrote: > Greetings all; > > Whats the relative speed between: > > 359 iterations of a cylinder(h=3.175,r=5,center=true); > and 359 iterations of a cube with 3 var args,center=true? > > The point being that a cube just wide enough vs a sq made by cylinder, > would leave a smoother surface on both inside and outside of the thread. > > If the cube is faster, I'll convert this code. > > Cheers, Gene Heskett. > -- > "There are four boxes to be used in defense of liberty: > soap, ballot, jury, and ammo. Please use in that order." > -Ed Howdershelt (Author, 1940) > If we desire respect for the law, we must first make the law respectable. > - Louis D. Brandeis > Genes Web page <http://geneslinuxbox.net:6309/gene <http://geneslinuxbox.net:6309/gene>> > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org <mailto:discuss-leave@lists.openscad.org> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
MM
Michael Möller
Wed, Feb 9, 2022 6:08 PM

I am puzzled, too. I get the lower value now. Ah... sorry, cut-n-paste
error, that was from an earlier run

for ( i = [1:400] ) translate([i,i/2,i/4])
cube([1+i/100,2+i/88,2-i/88],center=true) ;  // fewer
for ( i = [1:400] ) translate([i,i/2,i/4]) cube([1,2,3],center=true) ;
//  more.

"I leave it to the reader as an exercise to explain why" ;-)  - I haven't
the foggiest

On Wed, 9 Feb 2022 at 16:33, Bob Carter caggius@gmail.com wrote:

Michael,
I am puzzled as to why I am seeing only half the geometry that your cube
test generates whilst the cylinder matches exactly.

But I do like the performance of Marius’s M1 native OpenSCAD build.

Cube
for ( i = [1:400] ) translate([i,i/2,i/4])
cube([1+i/100,2+i/88,2-i/88],center=true) ;
Geometry cache size in bytes: 323200
CGAL Polyhedrons in cache: 1
CGAL cache size in bytes: 2715136
Total rendering time: 0:00:02.859
Top level object is a 3D object:
Simple: yes
Vertices: 2012
Halfedges: 6036
Edges: 3018
Halffacets: 2100
Facets: 1050
Volumes: 23
Rendering finished.

Cylinder
for ( i = [1:400] ) translate([i,i/2,i/4])
cylinder(r=3.2,h=3+i/100,center=true) ;
Geometry cache size in bytes: 1712000
CGAL Polyhedrons in cache: 2
CGAL cache size in bytes: 16687952
Total rendering time: 0:00:17.202
Top level object is a 3D object:
Simple: yes
Vertices: 10396
Halfedges: 31188
Edges: 15594
Halffacets: 10400
Facets: 5200
Volumes: 2
Rendering finished.

On 9 Feb 2022, at 11:40, Michael Möller private2michael@gmail.com wrote:

Depends on too much else, so here is a (too ?) simple test

for ( i = [1:400] ) translate([i,i/2,i/4])
cube([1+i/100,2+i/88,2-i/88],center=true) ;
for ( i = [1:400] ) translate([i,i/2,i/4])
cylinder(r=3.2,h=3+i/100,center=true) ;

Geometry cache size in bytes: 291928    Geometry cache size in bytes:
2003928
CGAL Polyhedrons in cache: 1            CGAL Polyhedrons in cache: 3
CGAL cache size in bytes: 5699488        CGAL cache size in bytes: 22387440
Total rendering time: 0:00:41.585        Total rendering time: 0:01:09.567
Top level object is a 3D object:        Top level object is a 3D
object:
Simple:        yes                      Simple:        yes
Vertices:    3998                      Vertices:    10396
Halfedges:  12792                      Halfedges:  31188
Edges:        6396                      Edges:      15594
Halffacets:  4800                      Halffacets:  10400
Facets:      2400                      Facets:      5200
Volumes:        2                      Volumes:        2
Rendering finished.                      Rendering finished.

On Wed, 9 Feb 2022 at 12:23, gene heskett gheskett@shentel.net wrote:

Greetings all;

Whats the relative speed between:

359 iterations of a cylinder(h=3.175,r=5,center=true);
and 359 iterations of a cube with 3 var args,center=true?

The point being that a cube just wide enough vs a sq made by cylinder,
would leave a smoother surface on both inside and outside of the thread.

If the cube is faster, I'll convert this code.

Cheers, Gene Heskett.

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.


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

I am puzzled, too. I get the lower value now. Ah... sorry, cut-n-paste error, that was from an earlier run for ( i = [1:400] ) translate([i,i/2,i/4]) cube([1+i/100,2+i/88,2-i/88],center=true) ; // fewer for ( i = [1:400] ) translate([i,i/2,i/4]) cube([1,2,3],center=true) ; // more. "I leave it to the reader as an exercise to explain why" ;-) - I haven't the foggiest On Wed, 9 Feb 2022 at 16:33, Bob Carter <caggius@gmail.com> wrote: > Michael, > I am puzzled as to why I am seeing only half the geometry that your cube > test generates whilst the cylinder matches exactly. > > But I do like the performance of Marius’s M1 native OpenSCAD build. > > > Cube > for ( i = [1:400] ) translate([i,i/2,i/4]) > cube([1+i/100,2+i/88,2-i/88],center=true) ; > Geometry cache size in bytes: 323200 > CGAL Polyhedrons in cache: 1 > CGAL cache size in bytes: 2715136 > Total rendering time: 0:00:02.859 > Top level object is a 3D object: > Simple: yes > Vertices: 2012 > Halfedges: 6036 > Edges: 3018 > Halffacets: 2100 > Facets: 1050 > Volumes: 23 > Rendering finished. > > Cylinder > for ( i = [1:400] ) translate([i,i/2,i/4]) > cylinder(r=3.2,h=3+i/100,center=true) ; > Geometry cache size in bytes: 1712000 > CGAL Polyhedrons in cache: 2 > CGAL cache size in bytes: 16687952 > Total rendering time: 0:00:17.202 > Top level object is a 3D object: > Simple: yes > Vertices: 10396 > Halfedges: 31188 > Edges: 15594 > Halffacets: 10400 > Facets: 5200 > Volumes: 2 > Rendering finished. > > On 9 Feb 2022, at 11:40, Michael Möller <private2michael@gmail.com> wrote: > > Depends on too much else, so here is a (too ?) simple test > > for ( i = [1:400] ) translate([i,i/2,i/4]) > cube([1+i/100,2+i/88,2-i/88],center=true) ; > for ( i = [1:400] ) translate([i,i/2,i/4]) > cylinder(r=3.2,h=3+i/100,center=true) ; > > Geometry cache size in bytes: 291928 Geometry cache size in bytes: > 2003928 > CGAL Polyhedrons in cache: 1 CGAL Polyhedrons in cache: 3 > CGAL cache size in bytes: 5699488 CGAL cache size in bytes: 22387440 > Total rendering time: 0:00:41.585 Total rendering time: 0:01:09.567 > Top level object is a 3D object: Top level object is a 3D > object: > Simple: yes Simple: yes > Vertices: 3998 Vertices: 10396 > Halfedges: 12792 Halfedges: 31188 > Edges: 6396 Edges: 15594 > Halffacets: 4800 Halffacets: 10400 > Facets: 2400 Facets: 5200 > Volumes: 2 Volumes: 2 > Rendering finished. Rendering finished. > > > > On Wed, 9 Feb 2022 at 12:23, gene heskett <gheskett@shentel.net> wrote: > >> Greetings all; >> >> Whats the relative speed between: >> >> 359 iterations of a cylinder(h=3.175,r=5,center=true); >> and 359 iterations of a cube with 3 var args,center=true? >> >> The point being that a cube just wide enough vs a sq made by cylinder, >> would leave a smoother surface on both inside and outside of the thread. >> >> If the cube is faster, I'll convert this code. >> >> Cheers, Gene Heskett. >> -- >> "There are four boxes to be used in defense of liberty: >> soap, ballot, jury, and ammo. Please use in that order." >> -Ed Howdershelt (Author, 1940) >> If we desire respect for the law, we must first make the law respectable. >> - Louis D. Brandeis >> Genes Web page <http://geneslinuxbox.net:6309/gene> >> >> >> _______________________________________________ >> 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 >
WH
Will Hardiman
Wed, Feb 9, 2022 11:57 PM

"I leave it to the reader as an exercise to explain why" ;-)  - I haven't

the foggiest

Perhaps because when i/88 > 2, the cube has 0 size in z?

On Wed, 9 Feb 2022, 22:11 gene heskett, gheskett@shentel.net wrote:

On Wednesday, February 9, 2022 6:40:14 AM EST Michael Möller wrote:

Depends on too much else, so here is a (too ?) simple test

for ( i = [1:400] ) translate([i,i/2,i/4])
cube([1+i/100,2+i/88,2-i/88],center=true) ;
for ( i = [1:400] ) translate([i,i/2,i/4])
cylinder(r=3.2,h=3+i/100,center=true) ;

Geometry cache size in bytes: 291928    Geometry cache size in bytes:
2003928
CGAL Polyhedrons in cache: 1            CGAL Polyhedrons in cache: 3
CGAL cache size in bytes: 5699488        CGAL cache size in bytes:
22387440 Total rendering time: 0:00:41.585        Total rendering
time: 0:01:09.567 Top level object is a 3D object:        Top level
object is a 3D object: Simple:        yes
Simple:        yes Vertices:    3998                      Vertices:
10396 Halfedges:  12792                      Halfedges:  31188
Edges:        6396                      Edges:      15594
Halffacets:  4800                      Halffacets:  10400 Facets:
2400                      Facets:      5200 Volumes:        2
Volumes:        2 Rendering finished.
Rendering finished.

if the left column is cube, it wins, and the right column is cylinder,
its slower but they are not identified as to which is which here.

On Wed, 9 Feb 2022 at 12:23, gene heskett gheskett@shentel.net wrote:

Greetings all;

Whats the relative speed between:

359 iterations of a cylinder(h=3.175,r=5,center=true);
and 359 iterations of a cube with 3 var args,center=true?

The point being that a cube just wide enough vs a sq made by
cylinder,
would leave a smoother surface on both inside and outside of the
thread.

If the cube is faster, I'll convert this code.

But Ray pointed out in a PM that for wood, I should use a buttress
thread, which they don't grind mills for, but a 60 degree engraving bit
with a 20 degree wedge under the motor mount would come pretty close, so
thats being considered.

Thanks all.

Cheers, Gene Heskett.

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.


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

>"I leave it to the reader as an exercise to explain why" ;-) - I haven't the foggiest Perhaps because when i/88 > 2, the cube has 0 size in z? On Wed, 9 Feb 2022, 22:11 gene heskett, <gheskett@shentel.net> wrote: > On Wednesday, February 9, 2022 6:40:14 AM EST Michael Möller wrote: > > Depends on too much else, so here is a (too ?) simple test > > > > for ( i = [1:400] ) translate([i,i/2,i/4]) > > cube([1+i/100,2+i/88,2-i/88],center=true) ; > > for ( i = [1:400] ) translate([i,i/2,i/4]) > > cylinder(r=3.2,h=3+i/100,center=true) ; > > > > Geometry cache size in bytes: 291928 Geometry cache size in bytes: > > 2003928 > > CGAL Polyhedrons in cache: 1 CGAL Polyhedrons in cache: 3 > > CGAL cache size in bytes: 5699488 CGAL cache size in bytes: > > 22387440 Total rendering time: 0:00:41.585 Total rendering > > time: 0:01:09.567 Top level object is a 3D object: Top level > > object is a 3D object: Simple: yes > > Simple: yes Vertices: 3998 Vertices: > > 10396 Halfedges: 12792 Halfedges: 31188 > > Edges: 6396 Edges: 15594 > > Halffacets: 4800 Halffacets: 10400 Facets: > > 2400 Facets: 5200 Volumes: 2 > > Volumes: 2 Rendering finished. > > Rendering finished. > > if the left column is cube, it wins, and the right column is cylinder, > its slower but they are not identified as to which is which here. > > > On Wed, 9 Feb 2022 at 12:23, gene heskett <gheskett@shentel.net> wrote: > > > Greetings all; > > > > > > Whats the relative speed between: > > > > > > 359 iterations of a cylinder(h=3.175,r=5,center=true); > > > and 359 iterations of a cube with 3 var args,center=true? > > > > > > The point being that a cube just wide enough vs a sq made by > > > cylinder, > > > would leave a smoother surface on both inside and outside of the > > > thread. > > > > > > If the cube is faster, I'll convert this code. > > But Ray pointed out in a PM that for wood, I should use a buttress > thread, which they don't grind mills for, but a 60 degree engraving bit > with a 20 degree wedge under the motor mount would come pretty close, so > thats being considered. > > Thanks all. > > Cheers, Gene Heskett. > -- > "There are four boxes to be used in defense of liberty: > soap, ballot, jury, and ammo. Please use in that order." > -Ed Howdershelt (Author, 1940) > If we desire respect for the law, we must first make the law respectable. > - Louis D. Brandeis > Genes Web page <http://geneslinuxbox.net:6309/gene> > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
MM
Michael Möller
Thu, Feb 10, 2022 1:22 AM

Of course. <facepalm slap!>

It shows that a "quick test case" ... there is no such thing. A test case
needs as careful coding as a "real" code. I just threw in the
"/88 +-something" to make nonidentical cubes. Didn't think it through. Just
wanted to show that of course a cube is faster than a cylinder - less
triangles, no trigonometry and so on.

Well, now I have to go and wash this egg off my shirt ....;-)

On Thu, 10 Feb 2022 at 00:58, Will Hardiman bill.hardiman1995@gmail.com
wrote:

"I leave it to the reader as an exercise to explain why" ;-)  - I

haven't the foggiest

Perhaps because when i/88 > 2, the cube has 0 size in z?

On Wed, 9 Feb 2022, 22:11 gene heskett, gheskett@shentel.net wrote:

On Wednesday, February 9, 2022 6:40:14 AM EST Michael Möller wrote:

Depends on too much else, so here is a (too ?) simple test

for ( i = [1:400] ) translate([i,i/2,i/4])
cube([1+i/100,2+i/88,2-i/88],center=true) ;
for ( i = [1:400] ) translate([i,i/2,i/4])
cylinder(r=3.2,h=3+i/100,center=true) ;

Geometry cache size in bytes: 291928    Geometry cache size in bytes:
2003928
CGAL Polyhedrons in cache: 1            CGAL Polyhedrons in cache: 3
CGAL cache size in bytes: 5699488        CGAL cache size in bytes:
22387440 Total rendering time: 0:00:41.585        Total rendering
time: 0:01:09.567 Top level object is a 3D object:        Top level
object is a 3D object: Simple:        yes
Simple:        yes Vertices:    3998                      Vertices:
10396 Halfedges:  12792                      Halfedges:  31188
Edges:        6396                      Edges:      15594
Halffacets:  4800                      Halffacets:  10400 Facets:
2400                      Facets:      5200 Volumes:        2
Volumes:        2 Rendering finished.
Rendering finished.

if the left column is cube, it wins, and the right column is cylinder,
its slower but they are not identified as to which is which here.

On Wed, 9 Feb 2022 at 12:23, gene heskett gheskett@shentel.net wrote:

Greetings all;

Whats the relative speed between:

359 iterations of a cylinder(h=3.175,r=5,center=true);
and 359 iterations of a cube with 3 var args,center=true?

The point being that a cube just wide enough vs a sq made by
cylinder,
would leave a smoother surface on both inside and outside of the
thread.

If the cube is faster, I'll convert this code.

But Ray pointed out in a PM that for wood, I should use a buttress
thread, which they don't grind mills for, but a 60 degree engraving bit
with a 20 degree wedge under the motor mount would come pretty close, so
thats being considered.

Thanks all.

Cheers, Gene Heskett.

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.


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

Of course. <facepalm slap!> It shows that a "quick test case" ... there is no such thing. A test case needs as careful coding as a "real" code. I just threw in the "/88 +-something" to make nonidentical cubes. Didn't think it through. Just wanted to show that of course a cube is faster than a cylinder - less triangles, no trigonometry and so on. Well, now I have to go and wash this egg off my shirt ....;-) On Thu, 10 Feb 2022 at 00:58, Will Hardiman <bill.hardiman1995@gmail.com> wrote: > >"I leave it to the reader as an exercise to explain why" ;-) - I > haven't the foggiest > > Perhaps because when i/88 > 2, the cube has 0 size in z? > > > On Wed, 9 Feb 2022, 22:11 gene heskett, <gheskett@shentel.net> wrote: > >> On Wednesday, February 9, 2022 6:40:14 AM EST Michael Möller wrote: >> > Depends on too much else, so here is a (too ?) simple test >> > >> > for ( i = [1:400] ) translate([i,i/2,i/4]) >> > cube([1+i/100,2+i/88,2-i/88],center=true) ; >> > for ( i = [1:400] ) translate([i,i/2,i/4]) >> > cylinder(r=3.2,h=3+i/100,center=true) ; >> > >> > Geometry cache size in bytes: 291928 Geometry cache size in bytes: >> > 2003928 >> > CGAL Polyhedrons in cache: 1 CGAL Polyhedrons in cache: 3 >> > CGAL cache size in bytes: 5699488 CGAL cache size in bytes: >> > 22387440 Total rendering time: 0:00:41.585 Total rendering >> > time: 0:01:09.567 Top level object is a 3D object: Top level >> > object is a 3D object: Simple: yes >> > Simple: yes Vertices: 3998 Vertices: >> > 10396 Halfedges: 12792 Halfedges: 31188 >> > Edges: 6396 Edges: 15594 >> > Halffacets: 4800 Halffacets: 10400 Facets: >> > 2400 Facets: 5200 Volumes: 2 >> > Volumes: 2 Rendering finished. >> > Rendering finished. >> >> if the left column is cube, it wins, and the right column is cylinder, >> its slower but they are not identified as to which is which here. >> >> > On Wed, 9 Feb 2022 at 12:23, gene heskett <gheskett@shentel.net> wrote: >> > > Greetings all; >> > > >> > > Whats the relative speed between: >> > > >> > > 359 iterations of a cylinder(h=3.175,r=5,center=true); >> > > and 359 iterations of a cube with 3 var args,center=true? >> > > >> > > The point being that a cube just wide enough vs a sq made by >> > > cylinder, >> > > would leave a smoother surface on both inside and outside of the >> > > thread. >> > > >> > > If the cube is faster, I'll convert this code. >> >> But Ray pointed out in a PM that for wood, I should use a buttress >> thread, which they don't grind mills for, but a 60 degree engraving bit >> with a 20 degree wedge under the motor mount would come pretty close, so >> thats being considered. >> >> Thanks all. >> >> Cheers, Gene Heskett. >> -- >> "There are four boxes to be used in defense of liberty: >> soap, ballot, jury, and ammo. Please use in that order." >> -Ed Howdershelt (Author, 1940) >> If we desire respect for the law, we must first make the law respectable. >> - Louis D. Brandeis >> Genes Web page <http://geneslinuxbox.net:6309/gene> >> >> >> _______________________________________________ >> 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 >
DM
Douglas Miller
Thu, Feb 10, 2022 1:45 AM

For what it's worth... in my experience, linear_extrude() of a circle or
a square will render /much/ faster than cylinder() or cube().

You can seamlessly replace cylinder()s with extruded circles by
including this module:

module cylinder(d,h,center=false) {
    z = center? -h/2 : 0;
    translate([0,0,z]) linear_extrude(height=h) circle(d=d);
}

On 2/9/2022 6:03 AM, gene heskett wrote:

Greetings all;

Whats the relative speed between:

359 iterations of a cylinder(h=3.175,r=5,center=true);
and 359 iterations of a cube with 3 var args,center=true?

The point being that a cube just wide enough vs a sq made by cylinder,
would leave a smoother surface on both inside and outside of the thread.

If the cube is faster, I'll convert this code.

Cheers, Gene Heskett.

For what it's worth... in my experience, linear_extrude() of a circle or a square will render */much/* faster than cylinder() or cube(). You can seamlessly replace cylinder()s with extruded circles by including this module: module cylinder(d,h,center=false) {     z = center? -h/2 : 0;     translate([0,0,z]) linear_extrude(height=h) circle(d=d); } On 2/9/2022 6:03 AM, gene heskett wrote: > Greetings all; > > Whats the relative speed between: > > 359 iterations of a cylinder(h=3.175,r=5,center=true); > and 359 iterations of a cube with 3 var args,center=true? > > The point being that a cube just wide enough vs a sq made by cylinder, > would leave a smoother surface on both inside and outside of the thread. > > If the cube is faster, I'll convert this code. > > Cheers, Gene Heskett.