discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

can this render in less than 20 min?

BR
Bob Roos
Fri, Aug 11, 2023 12:03 AM

Hello Discuss,

Is there a way to make this render faster?  It takes 20 minutes.  In addition any movement in OpenSCAD preview frame goes very slowly and jerks

Thank you

// Steve's handle
// Bob Roos
// August 9, 2023

include <BOSL2/std.scad> //or screws or threading
include <BOSL2/threading.scad> //or screws or threading
include <BOSL2/screws.scad> //or screws or threading
$fn = 72;

Dstem = 6.25;
Dbase = 32.5;
Dmid = 23.5;
Danchor = 9.2;
Dsphere = 10.34;
Dhole = 5.25;
Hbase = 3.2;
Hmid = 5.25-Hbase;
Hanchor = 3;
Hoverall = 20;
Depth = 5;
Screw = "6-32";
OuterCount = 22;
InnerCount = 28;
T=2;

difference(){
union(){
cyl(d=Dbase,h=T);
for (i =[0:OuterCount-1]){
rotate(i16.35) right(Dbase/2-1.05) up(.8)xcyl(d=5,h=2,rounding=1);
}
for (i =[0:InnerCount-1]){
rotate(i
12.85) right(Dmid/2-1.9) up(1.4)ycyl(d=7,h=1.75,rounding=.75);
}
up(2.5)cyl(d=Dmid-9.5,h=5,rounding=1.5);
up(5)cyl(d=7,h=2.5,rounding=1);
up(9.5)sphere(d=Dsphere);
down()cyl(d=Dstem,h=5);
}
down(1.5)tube(od=1.5*Dbase,id=Dstem,h=2);
up(10)xcyl(d=5,h=12);

down(4)screw_hole("#6-32,.85",thread=true);
*cuboid([Dbase,Dbase,Dbase],anchor=BOTTOM+LEFT);  //cutaway
}

SupportGrid(num=9,size=5,height=1.8);

module SupportGrid (num=10,size=10,height=2) {
// grid parms
window_num = num; // number of windows
window_size = size; // size of individual windows
strut_size = .4; // size of the struts
height = height;
// grid itself
translate([-(window_num * (window_size + strut_size))/2,(window_num * (window_size + strut_size))/2,-2.5])  union(){
for (i = [0:window_num]) {
rotate ([90, 0, 0])
translate ([0, 0, (window_size + strut_size) * i])
cube (size=[window_num * (window_size + strut_size), height, strut_size]);
}

    for (i = [0:window_num]) {
        rotate ([0, 0, 270])
        translate ([0, (window_size + strut_size) * i, 0])
        cube (size=[window_num * (window_size + strut_size), strut_size,height]);
        }
} 

}

--
Best regards,
Bob                          mailto:roosbob@wybatap.com

Hello Discuss, Is there a way to make this render faster? It takes 20 minutes. In addition any movement in OpenSCAD preview frame goes very slowly and jerks Thank you // Steve's handle // Bob Roos // August 9, 2023 include <BOSL2/std.scad> //or screws or threading include <BOSL2/threading.scad> //or screws or threading include <BOSL2/screws.scad> //or screws or threading $fn = 72; Dstem = 6.25; Dbase = 32.5; Dmid = 23.5; Danchor = 9.2; Dsphere = 10.34; Dhole = 5.25; Hbase = 3.2; Hmid = 5.25-Hbase; Hanchor = 3; Hoverall = 20; Depth = 5; Screw = "6-32"; OuterCount = 22; InnerCount = 28; T=2; difference(){ union(){ cyl(d=Dbase,h=T); for (i =[0:OuterCount-1]){ rotate(i*16.35) right(Dbase/2-1.05) up(.8)xcyl(d=5,h=2,rounding=1); } for (i =[0:InnerCount-1]){ rotate(i*12.85) right(Dmid/2-1.9) up(1.4)ycyl(d=7,h=1.75,rounding=.75); } up(2.5)cyl(d=Dmid-9.5,h=5,rounding=1.5); up(5)cyl(d=7,h=2.5,rounding=1); up(9.5)sphere(d=Dsphere); down()cyl(d=Dstem,h=5); } down(1.5)tube(od=1.5*Dbase,id=Dstem,h=2); up(10)xcyl(d=5,h=12); down(4)screw_hole("#6-32,.85",thread=true); *cuboid([Dbase,Dbase,Dbase],anchor=BOTTOM+LEFT); //cutaway } SupportGrid(num=9,size=5,height=1.8); module SupportGrid (num=10,size=10,height=2) { // grid parms window_num = num; // number of windows window_size = size; // size of individual windows strut_size = .4; // size of the struts height = height; // grid itself translate([-(window_num * (window_size + strut_size))/2,(window_num * (window_size + strut_size))/2,-2.5]) union(){ for (i = [0:window_num]) { rotate ([90, 0, 0]) translate ([0, 0, (window_size + strut_size) * i]) cube (size=[window_num * (window_size + strut_size), height, strut_size]); } for (i = [0:window_num]) { rotate ([0, 0, 270]) translate ([0, (window_size + strut_size) * i, 0]) cube (size=[window_num * (window_size + strut_size), strut_size,height]); } } } -- Best regards, Bob mailto:roosbob@wybatap.com
JB
Jordan Brown
Fri, Aug 11, 2023 4:59 AM

As originally written, on my antique desktop with 2021.01 it took about
an hour.

One of my mantras is that you never want to set $fn at the top level,
because it then applies to both large circles (where it may not be large
enough) and to small circles (where it may be too large).  Instead, set
$fs and $fa.  Exact values depend on how perfect you need your circles
to be.  I tried $fs=0.5 and $fa=1, which is probably finer than
necessary, and that dropped the render time to 17 minutes.  (It dropped
the complexity of the result by a factor of about three.)  Raising $fs
to 1 dropped the render time to 5 minutes.

$fs=1 / $fa=1 means "have each segment of a circle be no more than one
unit ($fs=1), with a maximum of 360 sides ($fa=1 degree)".

The two parameters both control the number of sides.  $fs controls small
circles, to make sure they don't have sides so small you wouldn't see
the difference.  $fa controls large circles, to make sure that they
don't have sides that are smoother than you can perceive.

Raising $fa to 2 didn't change the result; the circles here aren't large
enough.  With one-unit sides, a circle would have to have a diameter of
~114 units to have more than 360 sides.  But you might set it to 5
anyway; that would make large circles be 72-gons, which is what your $fn
setting was getting you.  You can see the sides on a large 72-gon.  I
don't know about on one with a diameter of only 30 or so mm.

Only use $fn to control the number of sides on a particular object, when
you want to generate a regular polygon.

If you really need super-smooth circles, consider setting $fs and $fa
high for development, and then set them to the values you really need
for a final render.  Print some samples to see what settings will really
make a difference in the result.

You can get a small benefit (10%?) by getting rid of the threads on the
screw hole.  Can you really print 6-32 threads?

As originally written, on my antique desktop with 2021.01 it took about an hour. One of my mantras is that you never want to set $fn at the top level, because it then applies to both large circles (where it may not be large enough) and to small circles (where it may be too large).  Instead, set $fs and $fa.  Exact values depend on how perfect you need your circles to be.  I tried $fs=0.5 and $fa=1, which is probably finer than necessary, and that dropped the render time to 17 minutes.  (It dropped the complexity of the result by a factor of about three.)  Raising $fs to 1 dropped the render time to 5 minutes. $fs=1 / $fa=1 means "have each segment of a circle be no more than one unit ($fs=1), with a maximum of 360 sides ($fa=1 degree)". The two parameters both control the number of sides.  $fs controls small circles, to make sure they don't have sides so small you wouldn't see the difference.  $fa controls large circles, to make sure that they don't have sides that are smoother than you can perceive. Raising $fa to 2 didn't change the result; the circles here aren't large enough.  With one-unit sides, a circle would have to have a diameter of ~114 units to have more than 360 sides.  But you might set it to 5 anyway; that would make large circles be 72-gons, which is what your $fn setting was getting you.  You *can* see the sides on a large 72-gon.  I don't know about on one with a diameter of only 30 or so mm. Only use $fn to control the number of sides on a particular object, when you want to generate a regular polygon. If you really need super-smooth circles, consider setting $fs and $fa high for development, and then set them to the values you really need for a final render.  Print some samples to see what settings will really make a difference in the result. You can get a small benefit (10%?) by getting rid of the threads on the screw hole.  Can you really print 6-32 threads?
JB
Jordan Brown
Fri, Aug 11, 2023 5:01 AM

Also:  you probably want your slicer to generate the support grid.  It
will probably do a better job than you will, keeping the walls thin,
putting some tiny separation between them and the model, and keeping the
supports away from the sides of the central shaft.

Also:  you probably want your slicer to generate the support grid.  It will probably do a better job than you will, keeping the walls thin, putting some tiny separation between them and the model, and keeping the supports away from the sides of the central shaft.
TP
Torsten Paul
Fri, Aug 11, 2023 12:27 PM

On 11.08.23 02:03, Bob Roos wrote:

Is there a way to make this render faster?  It takes 20 minutes.

Use DEV Snapshot version.

In Edit->Preferences->Features
Enable Manifold
Enable all the vertex-object-* Flags

This renders in ~10 Seconds on my 6 year old Notebook.

ciao,
Torsten.

On 11.08.23 02:03, Bob Roos wrote: > Is there a way to make this render faster? It takes 20 minutes. Use DEV Snapshot version. In Edit->Preferences->Features Enable Manifold Enable all the vertex-object-* Flags This renders in ~10 Seconds on my 6 year old Notebook. ciao, Torsten.
BR
Bob Roos
Sun, Aug 13, 2023 7:38 AM

Hi Torsten,

Thank you.

Please explain further.  I don't know what that is as I don't have "Features" in my preferences

Friday, August 11, 2023, 8:27:56 AM, you wrote:

On 11.08.23 02:03, Bob Roos wrote:

Is there a way to make this render faster?  It takes 20 minutes.

Use DEV Snapshot version.

In Edit->>Preferences->Features

Enable Manifold
Enable all the vertex-object-* Flags

This renders in ~10 Seconds on my 6 year old Notebook.

ciao,
Torsten.


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

--
have Fun,
Bob                          mailto:roosbob@wybatap.com

Hi Torsten, Thank you. Please explain further. I don't know what that is as I don't have "Features" in my preferences Friday, August 11, 2023, 8:27:56 AM, you wrote: > On 11.08.23 02:03, Bob Roos wrote: >> Is there a way to make this render faster? It takes 20 minutes. > Use DEV Snapshot version. In Edit->>Preferences->Features > Enable Manifold > Enable all the vertex-object-* Flags > This renders in ~10 Seconds on my 6 year old Notebook. > ciao, > Torsten. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org -- have Fun, Bob mailto:roosbob@wybatap.com
BR
Bob Roos
Sun, Aug 13, 2023 7:51 AM

Hi Jordan,

Thank you for you explanation of the $fa and $fs.  I am so glad that I asked about this.
 
The slicer put a pretty solid support structure under that.  You are right about the connection to the center cylinder my grid was too close.  There is a .2mm separation between the grid and the object and the grid pulled off easier than any generated support I have ever used.
 
As to threads — The screw turned out to be 8-32 so I had to drill and tap them anyway.  I was thinking that maybe that was too small to effectively print.  
 
Bob

Friday, August 11, 2023, 1:01:53 AM, you wrote:

Also:  you probably want your slicer to generate the support grid.  It will probably do a better job than you will, keeping the walls thin, putting some tiny separation between them and the model, and keeping the supports away from the sides of the central shaft.

-- 
have Fun,
 Bob                           mailto:roosbob@wybatap.com

Hi Jordan, Thank you for you explanation of the $fa and $fs.  I am so glad that I asked about this.   The slicer put a pretty solid support structure under that.  You are right about the connection to the center cylinder my grid was too close.  There is a .2mm separation between the grid and the object and the grid pulled off easier than any generated support I have ever used.   As to threads — The screw turned out to be 8-32 so I had to drill and tap them anyway.  I was thinking that maybe that was too small to effectively print.     Bob Friday, August 11, 2023, 1:01:53 AM, you wrote: > Also:  you probably want your slicer to generate the support grid.  It will probably do a better job than you will, keeping the walls thin, putting some tiny separation between them and the model, and keeping the supports away from the sides of the central shaft. --  have Fun,  Bob                           mailto:roosbob@wybatap.com
TP
Torsten Paul
Sun, Aug 13, 2023 10:41 AM

On 13.08.23 09:38, Bob Roos wrote:

I don't know what that is as I don't have "Features" in my preferences

Those are only available in the DEV Snapshots, which are listed
quite a bit down on the website:

https://openscad.org/downloads.html#snapshots

They can be used in parallel to the release version.

ciao,
Torsten.

On 13.08.23 09:38, Bob Roos wrote: > I don't know what that is as I don't have "Features" in my preferences Those are only available in the DEV Snapshots, which are listed quite a bit down on the website: https://openscad.org/downloads.html#snapshots They can be used in parallel to the release version. ciao, Torsten.
GH
gene heskett
Sun, Aug 13, 2023 1:48 PM

On 8/13/23 03:52, Bob Roos wrote:

Hi Jordan,

Thank you for you explanation of the $fa and $fs.  I am so glad that I
asked about this.

The slicer put a pretty solid support structure under that.  You are
right about the connection to the center cylinder my grid was too close.
 There is a .2mm separation between the grid and the object and the
grid pulled off easier than any generated support I have ever used.

As to threads — The screw turned out to be 8-32 so I had to drill and
tap them anyway.  I was thinking that maybe that was too small to
effectively print.

Bob

Friday, August 11, 2023, 1:01:53 AM, you wrote:

 Also:  you probably want your slicer to generate the support grid.
 It will probably do a better job than you will, keeping the walls
 thin, putting some tiny separation between them and the model, and
 keeping the supports away from the sides of the central shaft.

I'll third that rec, I just reprinted my sticks chuck for a duplicate
axis B on my go704 because the new shaft has builtin keys, and the
latest cura, which had been making very hard to remove supports in
previous incarnations, now makes a chuck socket that comes off the plate
leaving the support stuck to the plate, and the bottom of the chuck,
sitting on that support is the smoothest I've ever seen. instead of a
key slot.  That changed 3 lines of code in the .scad file. 2 were
dimension changes to compensate for the nozzles .4mm over flow, and the
original central shaft construction difference became a union.

--
have Fun,
 Bob mailto:roosbob@wybatap.com mailto:roosbob@wybatap.com


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

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 8/13/23 03:52, Bob Roos wrote: > Hi Jordan, > > > Thank you for you explanation of the $fa and $fs.  I am so glad that I > asked about this. > > The slicer put a pretty solid support structure under that.  You are > right about the connection to the center cylinder my grid was too close. >  There is a .2mm separation between the grid and the object and the > grid pulled off easier than any generated support I have ever used. > > As to threads — The screw turned out to be 8-32 so I had to drill and > tap them anyway.  I was thinking that maybe that was too small to > effectively print. > > Bob > > > Friday, August 11, 2023, 1:01:53 AM, you wrote: > > Also:  you probably want your slicer to generate the support grid. > It will probably do a better job than you will, keeping the walls > thin, putting some tiny separation between them and the model, and > keeping the supports away from the sides of the central shaft. > I'll third that rec, I just reprinted my sticks chuck for a duplicate axis B on my go704 because the new shaft has builtin keys, and the latest cura, which had been making very hard to remove supports in previous incarnations, now makes a chuck socket that comes off the plate leaving the support stuck to the plate, and the bottom of the chuck, sitting on that support is the smoothest I've ever seen. instead of a key slot. That changed 3 lines of code in the .scad file. 2 were dimension changes to compensate for the nozzles .4mm over flow, and the original central shaft construction difference became a union. > > -- > have Fun, >  Bob mailto:roosbob@wybatap.com <mailto:roosbob@wybatap.com> > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org 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/>