discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Impossibly slow

BR
Bob Roos
Thu, May 5, 2022 7:18 AM

Hello OpenSCAD,

  The code below just barely displays.  But if you remove the "*" from one more line it becomes non responsive.
But if you use a text editor and * out all the screws you can open the file in OpenScad remove the * character and press F6 and get a rendering.  The problem is the F5 process.
The placement of the screws was pretty much by visual and not mathematical. 

// string trimmer wheel stand
// Bob Roos
// May 2, 2022
include <BOSL2/std.scad>
include <BOSL2/screws.scad>
 
$fn = 24;
D = 25;
L = 100;
L2 = 80;
T = 1.6;
A = 26;
 
F2=5T;
F1 = -F2/2;
difference(){
    union(){
      cylinder(h=L,d=D+2
T,center=true);  // main tube
      rotate([-64,0,0])translate([0,0,L2/2])cylinder(h=L2,d=D+2T,center=true);  // side tube
        translate([0,-D/2,0])rotate([90,0,0])prismoid([5
T,T+L],[5T,2(T+L)/3],4T);    // left main
        translate([0,D/2+4
T,0])rotate([90,0,0])prismoid([5T,2(T+L)/3],[5T,T+L],4T);  // right main
        rotate([-64,0,0])translate([0,-D/2,L2*.60])rotate([90,0,0])prismoid([5T,.67L-T],[5T,2(.67L-T)/3],4T);  // top side
        rotate([-64,0,0])translate([0,+D/2+4T,L2.475])rotate([90,0,0])prismoid([5T,2(.8L-T)/3],[5T,.8L-T],4T); // bottom side
        }
    cylinder(h=L+.01,d=D,center=true);  // remove the middle to make room for shaft
    rotate([-64,0,0])translate([0,0,L/2])cylinder(h=L+.01,d=D,center=true);  // remove the middle to make room for shaft
    cube([1,2L+D+8T,L+4T],center=true);  // make into 2 halves
       
  * translate([F1,-D/2-2
T,2L/8])rotate([0,90,0]) screw("#6-32",head="flat",shank=2T,length=F2);
  * translate([F1,-D/2-2T,-2L/8])rotate([0,90,0]) screw("#6-32",head="flat",shank=2T,length=F2);
  * translate([F1,D/2+2
T,2L/8])rotate([0,90,0]) screw("#6-32",head="flat",shank=2T,length=F2);
  * translate([F1,D/2+2T,-2L/8])rotate([0,90,0]) screw("#6-32",head="flat",shank=2T,length=F2); 
       
  translate([F1,D+2
T,1.25D])rotate([0,90,0]) screw("#6-32",head="flat",shank=2T,length=F2);
  translate([F1,D+2T,-.04L])rotate([0,90,0]) screw("#6-32",head="flat",shank=2T,length=F2); 
 
  translate([F1,D
1.75,1.55D])rotate([0,90,0]) screw("#6-32",head="flat",shank=2T,length=F2);
  translate([F1,D2.5,.13L])rotate([0,90,0]) screw("#6-32",head="flat",shank=2*T,length=F2); 
}

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

Hello OpenSCAD,   The code below just barely displays.  But if you remove the "*" from one more line it becomes non responsive. But if you use a text editor and * out all the screws you can open the file in OpenScad remove the * character and press F6 and get a rendering.  The problem is the F5 process. The placement of the screws was pretty much by visual and not mathematical.  // string trimmer wheel stand // Bob Roos // May 2, 2022 include <BOSL2/std.scad> include <BOSL2/screws.scad>   $fn = 24; D = 25; L = 100; L2 = 80; T = 1.6; A = 26;   F2=5*T; F1 = -F2/2; difference(){     union(){       cylinder(h=L,d=D+2*T,center=true);  // main tube       rotate([-64,0,0])translate([0,0,L2/2])cylinder(h=L2,d=D+2*T,center=true);  // side tube         translate([0,-D/2,0])rotate([90,0,0])prismoid([5*T,T+L],[5*T,2*(T+L)/3],4*T);    // left main         translate([0,D/2+4*T,0])rotate([90,0,0])prismoid([5*T,2*(T+L)/3],[5*T,T+L],4*T);  // right main         rotate([-64,0,0])translate([0,-D/2,L2*.60])rotate([90,0,0])prismoid([5*T,.67*L-T],[5*T,2*(.67*L-T)/3],4*T);  // top side         rotate([-64,0,0])translate([0,+D/2+4*T,L2*.475])rotate([90,0,0])prismoid([5*T,2*(.8*L-T)/3],[5*T,.8*L-T],4*T); // bottom side         }     cylinder(h=L+.01,d=D,center=true);  // remove the middle to make room for shaft     rotate([-64,0,0])translate([0,0,L/2])cylinder(h=L+.01,d=D,center=true);  // remove the middle to make room for shaft     cube([1,2*L+D+8*T,L+4*T],center=true);  // make into 2 halves           * translate([F1,-D/2-2*T,2*L/8])rotate([0,90,0]) screw("#6-32",head="flat",shank=2*T,length=F2);   * translate([F1,-D/2-2*T,-2*L/8])rotate([0,90,0]) screw("#6-32",head="flat",shank=2*T,length=F2);   * translate([F1,D/2+2*T,2*L/8])rotate([0,90,0]) screw("#6-32",head="flat",shank=2*T,length=F2);   * translate([F1,D/2+2*T,-2*L/8])rotate([0,90,0]) screw("#6-32",head="flat",shank=2*T,length=F2);            translate([F1,D+2*T,1.25*D])rotate([0,90,0]) screw("#6-32",head="flat",shank=2*T,length=F2);   translate([F1,D+2*T,-.04*L])rotate([0,90,0]) screw("#6-32",head="flat",shank=2*T,length=F2);      translate([F1,D*1.75,1.55*D])rotate([0,90,0]) screw("#6-32",head="flat",shank=2*T,length=F2);   translate([F1,D*2.5,.13*L])rotate([0,90,0]) screw("#6-32",head="flat",shank=2*T,length=F2);  } --  Best regards,  Bob                          mailto:roosbob@wybatap.com
TP
Torsten Paul
Thu, May 5, 2022 8:19 AM

Differencing complex things like screws is a big burden on the
preview display logic.

It should help using

... render() screw("#6-32",head="flat",shank=2*T,length=F2);

instead. This resolves the mesh for the screw() even in preview
mode which should help quite a bit at the expense of an initial
delay on the first preview. After that the screw() geometry is
cached.

ciao,
Torsten.

Differencing complex things like screws is a big burden on the preview display logic. It should help using ... render() screw("#6-32",head="flat",shank=2*T,length=F2); instead. This resolves the mesh for the screw() even in preview mode which should help quite a bit at the expense of an initial delay on the first preview. After that the screw() geometry is cached. ciao, Torsten.
BR
Bob Roos
Thu, May 5, 2022 3:27 PM

Hi Torsten,

It was a HUGE hlep.  Thank you!

It was also a help. ;)

Thursday, May 5, 2022, 4:19:15 AM, you wrote:

Differencing complex things like screws is a big burden on the
preview display logic.

It should help using

... render() screw("#6-32",head="flat",shank=2*T,length=F2);

instead. This resolves the mesh for the screw() even in preview
mode which should help quite a bit at the expense of an initial
delay on the first preview. After that the screw() geometry is
cached.

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, It was a HUGE hlep. Thank you! It was also a help. ;) Thursday, May 5, 2022, 4:19:15 AM, you wrote: > Differencing complex things like screws is a big burden on the > preview display logic. > It should help using > ... render() screw("#6-32",head="flat",shank=2*T,length=F2); > instead. This resolves the mesh for the screw() even in preview > mode which should help quite a bit at the expense of an initial > delay on the first preview. After that the screw() geometry is > cached. > ciao, > Torsten. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org -- have Fun, Bob mailto:roosbob@wybatap.com