Skip to main content

How To Extrude

As any other CAD software, in DynaMaker a CAD extrusion can be performed given the shape, which plane of origin of the extrusion and how long it should be.

Syntax​

In DynaMaker, an extrusion can be created as follows:

const model = new SKYCAD.ParametricModel()

const sketch = SKYCAD.generateCircleSketch(0, 0, 50) // circle sketch at 0,0 with diameter = 50
const plane = new SKYCAD.Plane(1, 0, 0)
const extrusionLength = 150

model.addExtrude(sketch, plane, extrusionLength)

where:

  • model as SKYCAD.ParametricModel.
  • sketch as the shape of the extrusion.
  • plane as plane of origin and direction of the extrusion.
  • extrusionLength as the length of the extrusion.

Visualization​

In order to visualize your extrusion, you need to add it into a function in your editor, GEOM3D is the recommended place. The example below generates a cube with 3 inputs that affect the size of the extrusion:

GEOM3D
export function generateCuboidModel(width: number, depth: number, height: number) {
const model = new SKYCAD.ParametricModel()

const sketch = SKYCAD.generateRectangleSketch(0, 0, width, depth)
const plane = new SKYCAD.Plane(0, 0, 1)

model.addExtrude(sketch, plane, height)

return model
}
tip

Check the guide how to use functions to understand its logic like inputs and output.

Example from Template​

Use the quick tools of the code editor to start with a simple extrusion that can be modified later:

  • at the top of the code editor, go to Geometry 3D > Extrude > Template > Rectangle or Circle.
tip

In the library SKYCAD, you can learn more details about:

  • sketches to create your own custom shapes.
  • planes to customize the direction and placement of your extrusions.
  • other CAD features besides the extrusion.

Example from DXF​

Reuse your 2D files as base sketch for your extrusions like:

  • at the top of the code editor, go to Geometry 3D > Extrude > Upload (.dxf).