[OpenSCAD] Newbie question
lar3ry
lar3ry at sasktel.net
Thu May 23 10:38:43 EDT 2019
One thing that baffles me is that with your code, I get the following error:
WARNING: variable central not specified as parameter
If I change central to center, all is well. I am running 2019.05
I got curious about the internals of the object, and did a little
investigating. I often use difference() to cut away part of an object to see
if I have the internals right. In case you are not familiar with this
technique, here's my modification to allow you to see exactly what's inside.
I would be interested to know if this inside view is what you expected.
$fn=100;
eps=0.01;
// Skimmer_Inlet_Cone1
// cylinder 1
sic11h=30;
sic11r1=25;
sic11r2=16;
sic111h=sic11h;
sic111r1=sic11r1-2;
sic111r2=sic11r2-2;
// cylinder 2
sic12h=20;
sic12r=5;
sic122h=sic12h;
sic122r=sic12r-1;
// Skimmer_Inlet_Cone2
sic22h=30;
sic22r1=25;
sic22r2=12;
sic222h=sic22h;
sic222r1=sic22r1-1;
sic222r2=sic22r2-1;
// Skimmer_Large_Pipe
slph=105;
slphr1=16;
slphr2=14;
//put a ! at the beginning of Skimmer(); to render normally
Skimmer();
//put a ! at the beginning of difference to see inside
!difference() {
Skimmer();
translate([0,-30,-30])
cube([60,70,150]);
}
// Skimmer_Inlet_Cone1
module Skimmer() {
difference() {
union() {
translate([0,37,15]) rotate([90,0,0]) cylinder(h=sic12h,r=sic12r);
cylinder(h=sic11h,r1=sic11r1,r2=sic11r2);
}
union() {
translate([0,37+eps,15]) rotate([90,0,0])
cylinder(h=sic122h+eps*2,r=sic122r);
translate([0,0,-eps])
cylinder(h=sic111h+2*eps,r1=sic111r1,r2=sic111r2);
}
}
//difference() {
// union() {
// translate([0,37,15]) rotate([90,0,0]) cylinder(h=20,r=5);
// cylinder(h=30,r1=25,r2=16,center=true);
//}
// translate([0,37,15]) rotate([90,0,0]) cylinder(h=20,r=4);
// cylinder(h=30,r1=23,r2=14,center=true);
//}
// Skimmer_Inlet_Cone2
difference() {
cylinder(h=sic22h,r1=sic22r1,r2=sic22r2,center=true);
cylinder(h=sic222h,r1=sic222r1,r2=sic222r2,center=true);
}
// Skimmer_Large_Pipe
difference() {
translate([0,0,30]) cylinder(h=slph+2*eps,r=slphr1,center=true);
translate([0,0,30]) cylinder(h=slph+2*eps,r=slphr2,center=true);
}
}
--
Sent from: http://forum.openscad.org/
More information about the Discuss
mailing list