How To Position & Rotate
In DynaMaker position and rotation are described by vectors in the 2D or 3D space.
Position
-
A position in 2D is defined as:
const position2D = new SKYMATH.Vector2D(15, 7)An example of use in the 2D space could be placing sketches in layouts (2D containers), as:
const layout = new SKYCAD.Layout()const logoSketch = GEOM2D.getLogoSketch()layout.addSketch(logoSketch, {position: new SKYMATH.Vector2D(15, 7),}) -
A position in 3D is defined as:
const position3D = new SKYMATH.Vector3D(15, 7, 20)An example of use in the 3D space could be placing models in geometry groups (3D containers), as:
const geometryGroup = new SKYCAD.GeometryGroup()const logoModel = GEOM3D.getLogoModel()geometryGroup.addSketch(logoModel, {position: new SKYMATH.Vector3D(15, 7, 20),})
Here is an interactive app that represents how 3D position affects the placement of the model: