- Demonstrate how to use the OpenSCAD code below to create cross-sections. Explain how to use the Customizer to adjust the rotation and translate variables.
- Provide students OpenSCAD code. Students may also illustrate on paper or with digital ink.
- Students will construct cross-sections and create pages in a shared PowerPoint presentation which contain snips of their visualizations.
SCAD Code for 3D Cross-sections
//Uncomment the primitive prisms below to see how cross-sections are affected. Adjust the variables below to rotate and translate the slices.
//Rotate with values up to 90 (degrees)
rotation = 0;
//Translate with values up to 20
translation=0;
intersection(){
rotate([rotation,0,0])translate([0,0,translation-25])color([1,1,1,.1]) cube([50,50,50],center=true);
#
//cylinder
cylinder(h=20, r=10, center=true);
//cone
//cylinder(h=15, r1=10, r2=0, center=true,$fn=100);
//sphere
//sphere( r=10 ,$fn=100);
//pyramid
//rotate([0,0,45]) cylinder(20,20,00,center=true,$fn=4);
}
rotate([rotation,0,0])translate([0,0,translation])color([1,.7,.7,.1]) cube([50,50,.01],center=true);