kcl-std → functions → translate

translateFunction in std::transform

Move a solid or a sketch.

This is really useful for assembling parts together. You can create a part and then move it to the correct location.

Translate is really useful for sketches if you want to move a sketch and then rotate it using the rotate function to create a loft.

Arguments

NameTypeDescriptionRequired
objects[Solid; 1+] or [Sketch; 1+] or ImportedGeometryThe solid, sketch, or set of solids or sketches to move.Yes
xnumber(Length)The amount to move the solid or sketch along the x axis.No
ynumber(Length)The amount to move the solid or sketch along the y axis.No
znumber(Length)The amount to move the solid or sketch along the z axis.No
globalboolIf true, the transform is applied in global space. The origin of the model will move. By default, the transform is applied in local sketch axis, therefore the origin will not move.No
xyz[number(Length); 3]If given, interpret this point as 3 distances, along each of [X, Y, Z] and translate by each of them.No

Returns

[Solid; 1+] or [Sketch; 1+] or ImportedGeometry

Examples

Found a typo?