Rotates its child a number of degrees about the axis of the coordinate system.
rotate ([90,0,0])
//rotate a cylinder 90 degrees on the x-axisrotate ([90,0,0]) cylinder (h = 4, r=0.9, center = true, $fn=100);
Point your right thumb along the positive axis, your fingers rotate in the direction of the rotation.
Translates moves its child elements along the specified vector. The argument name is optional. translate([x, y, z])
//translate a cube 3 millimeters to the right on the x-axiscube([2,3,4]);
translate([3,0,0]) {
cube([2,3,4]);
}
Creates a union of all its child nodes. This is the sum of all children (logical or). May be used with either 2D or 3D objects, but don't mix them.
union() {
cylinder (h = 4, r=1, center = true, $fn=100);
rotate ([90,0,0]) cylinder (h = 4, r=0.9, center = true, $fn=100);
}
mirror([x, y, z])
mirror([1,0,0])cube([2,3,4]);
This transformation creates a minimal linear bounding container. In complicated terms, the convex hull of a geometric object (such as a point set or a polygon) is the smallest convex set containing that object. The best and simplest explanation I have heard of is “gift wrapping two objects.
hull() {
cylinder(h=2,r=40);
translate([0,0,40]) sphere(40);
}