Planning Custom Aluminum Enclosures With #OpenSCAD https://hackaday.com/2021/12/26/planning-custom-aluminum-enclosures-with-openscad/
#openscad
One person like that
Plotting d235|21
#openSCAD can't export lines, only closed polygons - but you can use the text output.
And adding a pen to your 3Dprinter makes this easy.
include<ub.scad> useVersion=21.218;//⇒ v.gd/ubaer
assert(Version>=useVersion,str("lib version ",Version," detected, install ",useVersion," ub.scad library‼ ⇒http://v.gd/ubaer"));
nozzle=.2;
bed=true;
printPos=[125,110];
stiftOffset=[56,0];
r=60;//size
r2=r+0;
turns=200;
f=0.001;
fx=+1.015;// difference in frequency
phi=0;
line=n(2);// line width
steps=turns*360;
rainbow=0.8;// how many colors
colorstart=0.55; // start color
damp=steps/(r);
damp2=steps/(r2);
step=max(3,ceil(steps/9998));// resolution
rotations=0.35;
gcode=true;
t=[0,0];// offset × radius
echo(step=ceil(len(points)/10000));
points=[for(i=[-2500:5:steps])each RotPoints(-i/steps*rotations*360,[[sin(i*fx)*(r-i/damp)*cos(i*f)+t[0]*(r-i/damp),cos(i)*(r2-i/damp2)*cos(i*f+phi)+t[1]*(r-i/damp)]])+[printPos]-[stiftOffset]];
GCODE=[for(i=[0:len(points)-1])str("G1"," X",points[i][0]," Y",points[i][1],"<br>")];
T(stiftOffset)for(i=[0:ceil(len(points)/10000):len(points)-2])hull(){
T(points[i])circle(d=line,$fn=6);
T(points[i+ceil(len(points)/9999)])circle(d=line,$fn=6);
}
if(gcode) echo(GCODE);
for(i=[0:ceil(len(points)/10000):len(points)-1]){
if(points[i][0]<0||points[i][1]<0)Echo(str("Point ",i," ",points[i],"negative!"));
if(points[i][0]>printBed[0]||points[i][1]>printBed[1])Echo(str("Point ",i," ",points[i],"out of PrintBed"),color="orange");}
● NEWS ● #JeffGeerling ☞ How to Export a 2D illustration of a 3D model in #OpenSCAD https://www.jeffgeerling.com/blog/2021/how-export-2d-illustration-3d-model-openscad
One person like that
2 Likes
One person like that