|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
How could I create a hollow cylinder but with thicker walls?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
tiocfaidh schrieb:
> How could I create a hollow cylinder but with thicker walls?
You need to cut a hole into a solid cylinder using CSG:
difference {
#local Dir = vnormalize(B-A);
cylinder { A,B,Radius }
cylinder { A+Dir*Thickness,B-Dir*Thickness,Radius-Thickness }
}
where A and B are center coordinates of the top and bottom,
respectively, and Radius and Thickness are the outer cylinder radius and
the thickness of the cylinder, respectively.
This will create an airtight hollow cylinder. To have open ends, instead
use:
difference {
#local Dir = vnormalize(B-A);
cylinder { A,B,Radius }
cylinder { A-Dir*0.01,B+Dir*0.01,Radius-Thickness }
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
could you show me a small example, im trying to play around with the variables
but its not working, get a huge shape
difference {
#local Dir = vnormalize(1-2);
cylinder { 2,1,3 }
cylinder { 2-Dir*0.01,1+Dir*0.01,3-1 }
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
tiocfaidh schrieb:
> could you show me a small example, im trying to play around with the variables
> but its not working, get a huge shape
Make sure to use vectors for A and B.
For instance:
#local A = <0,0,0>;
#local B = <0,2,0>;
#local Radius = 0.8;
#local Thickness = 0.2;
difference {
#local Dir = vnormalize(B-A);
cylinder { A,B,Radius }
cylinder { A-Dir*0.01,B+Dir*0.01,Radius-Thickness }
}
or, with all the math already worked out and hard-coded:
difference {
cylinder { <0,0,0>, <0,2,0>, 0.8 }
cylinder { <0,-0.02,0>, <0,2.02,0>, 0.6 }
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> How could I create a hollow cylinder but with thicker walls?
#macro Pipe(P1, P2, r1, r2)
#local _P3 = P1 - 0.1*(P2-P1); // V1 - 0.1*V2
#local _P4 = P1 + 1.1*(P2-P1); // V1 + 1.1*V2
difference {
cylinder {P1,P2,r1}
cylinder {_P3,_P4,r2}
}
#end
// example
Pipe(<0,0,0>,<0,1,0>,0.5,0.45)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|