Results 1 to 3 of 3
Thread: OpenSCAD making complex parts
-
10-01-2021, 08:45 AM #1
- Join Date
- May 2021
- Location
- Pacific NorthWet
- Posts
- 14
OpenSCAD making complex parts
I need to make a whole bunch of complex parts that involve complex curves and have been using the hull() command to make them, for an arch, for example I need to use about 50 short hull() segments, otherwise the hull() command fills in the area inside the arch. I need that area not filled in. Anyone have a good idea on doing that? Thinking maybe a module that divides the arch into 50 segments each of identical lengths, but one of you may have a smarter idea
Thanks in advance.
-
10-01-2021, 02:15 PM #2
The simplest way to make an arch is to use the rotate extrude command to create a 180 degree curve and then resize it to get that upward arch.
resize([20,50,3])rotate_extrude(angle=180,convexity = 10) translate([20, 0, 0]) circle(d = 1);
Adjust the roundness of the shape by changing '$fn='
So a simple parametric arch script looks like this:
// CA's simple arch generator
$fn=80; // change to adjust roundness of arch ie: numbers between 4&20 make some interesting shapes
ah=30; // arch height
aw=40; // arch width
at=3; //arch thickness
bt=5; //beam thickness
bw=50; // adjusts beam width - larger numbers make narrower beams
resize([aw,ah,at])rotate_extrude(angle=180,convexity = 10) translate([bw, 0, 0]) circle(d = bt);
Although you can also do that by adjusting beam thickness and arch thickness.
But basically that's a pretty versatile one line arch generator :-)
what other shapes do you need ?Last edited by curious aardvark; 10-01-2021 at 02:27 PM.
-
10-01-2021, 02:37 PM #3
Throw in an angle adjuster and you can make any curve:-)
// CA's simple curve and arch generator
$fn=50; // change to adjust roundness of arch NB: numbers between 4&20 make some interesting shapes
ca=90; // angle of curve - 180 makes an arch
ah=30; // arch height
aw=40; // arch width
at=3; //arch thickness
bt=5; //beam thickness
bw=50; // adjusts beam width - larger numbers make narrower beams
resize([aw,ah,at])rotate_extrude(angle=ca,convexity = 10) translate([bw, 0,0]) circle(d = bt);
The applications are almost endless.
Rotate the 90 degree curves around the centre and you'd get a sort of pergola effect.
I've also rotated the whole thing to sit flat on the usual plane:
// CA's simple arch and curve generator
$fn=8; // change to adjust roundness of arch NB: numbers between 4&20 make some interesting shapes
ca=90; // angle of curve
ch=0; // curve height adjuster
ah=60; // arch height
aw=40; // arch width
at=3; //arch thickness
bt=5; //beam thickness
bw=50; // adjusts beam width - larger numbers make narrower beam
module curve(){
resize([aw,ah,at])rotate_extrude(angle=ca,convexity = 10) translate([bw, 0,0]) circle(d = bt);
} // end mod curve
nps=10; //number of pergola segments
module pergola(){
rotate([90,0,0])for (i = [1:nps]) rotate([0,(360/nps)*i,0]) curve();
} // end mod pergola
pergola();
Add enough pergola sections and you can make interesting 'buildings'.
Basically it's now a fairly useful little script.
I know I'll be using it again ;-)
Oh yeah, a 2 segment pergola is an arch :-)
So no need to use the curve module.
Also using 180 curve with the pergola module makes a whole bunch of different shape arches.Last edited by curious aardvark; 10-01-2021 at 03:03 PM.
New member with print issue
06-11-2024, 08:57 AM in Tips, Tricks and Tech Help