Translates (moves) the component along the specified vector.
Example of use:
Component myCube = Cube::create(10,20,30); myCube.translate(5,0,-2);Translates the cube 5 mm along the X axis and -2 mm along the Z axis.
Rotates the component child a degrees about the origin of the coordinate system. When a rotation is specified for multiple axes the the rotation is applied in the following order: x, y, z.
Example of use:
Component myCube = Cube::create(10,20,30); myCube.rotate(0,0,45);
Rotates the cube 45º around the z axis.
Component myCube = Cube::create(10,20,30); myCube.rotate(30,0,45);
Rotates the cube first 30º around x axis, and then 45º around the (original) z axis.
Rotates the component child about the origin of the coordinate system. The rotation is specified by the angles ZX'Z' ': z degrees around z axis, then xp degrees around the new x' axis, and finally zpp degrees around the new z' ' axis.
Example of use:
Component myCube = Cube::create(10,20,30); myCube.rotateEulerZXZ(90,15,45);
Rotates the cube 90 degrees around z axis, then 15 degrees around the new x' axis, and then 30 degrees around the new z' ' axis.
Rotates the component child about the origin of the coordinate system. The rotation is specified by the angles ZY'Z' ': z degrees around z axis, then xp degrees around the new y' axis, and finally zpp degrees around the new z' ' axis.
Example of use:
Component myCube = Cube::create(10,20,30); myCube.rotateEulerZYZ(90,15,45);
Rotates the cube 90 degrees around z axis, then 15 degrees around the new y' axis, and then 30 degrees around the new z' ' axis.
Mirrors the child element on a plane through the origin.
Example of use:
Component myCylinder = Cylinder::create(3,5); myCylinder.rotate(45,0,0).translate(6,0,0); Component myCylinder_mirrored = myCylinder.mirroredCopy(0,1,0);
Scales its child elements using the specified vector.
Example of use:
Component myCylinder = Cylinder(3,5); myCylinder.scale(30/20, 10/20, 1);
Creates a union of all its child nodes. This is the sum of all children. Example of use:
Component myCylinder1 = Cylinder(3,10); Component myCylinder2 = Cylinder(3,10).rotate(90,0,0); Component cross = myCylinder1 + myCylinder2;
Computes the convex hull of child nodes. Example of use:
Component cube = Cube(5, 15, 3); Component cylinder1 = Cylinder(5,3).translate(-10,0,0); Component cylinder2 = Cylinder(5,3).translate(10,0,0); Component cylinder3 = Cylinder(5,3).translate(0,10,0); Component hull = cube & cylinder1 & cylinder2 & cylinder3;
| |
Subtracts the 2nd (and all further) child nodes from the first one.
Example of use:
Component body = Cylinder(3,10); Component drill = Cylinder(1,10.1); Component spacer = body - drill;
Creates the intersection of all child nodes. This keeps the overlapping portion.
Linear Extrusion is a modeling operation that takes a 2D polygon as input and extends it in the third dimension. This way a 3D shape is created.
A rotational extrusion is a Linear Extrusion with a twist, literally. Unfortunately, it can not be used to produce a helix for screw threads as the 2D outline must be normal to the axis of rotation.