kcl

extrude

Extend a 2-dimensional sketch through a third dimension in order to

create new 3-dimensional volume, or if extruded into an existing volume, cut into an existing solid.

extrude(length: number, sketch_set: SketchSet) -> SolidSet

Arguments

NameTypeDescriptionRequired
lengthnumberYes
sketch_setSketchSetA sketch or a group of sketches.Yes

Returns

SolidSet - A solid or a group of solids.

Examples

example = startSketchOn('XZ')
  |> startProfileAt([0, 0], %)
  |> line([10, 0], %)
  |> arc({
       angleStart: 120,
       angleEnd: 0,
       radius: 5
     }, %)
  |> line([5, 0], %)
  |> line([0, 10], %)
  |> bezierCurve({
       control1: [-10, 0],
       control2: [2, 10],
       to: [-5, 10]
     }, %)
  |> line([-5, -2], %)
  |> close(%)
  |> extrude(10, %)

Rendered example of extrude 0

exampleSketch = startSketchOn('XZ')
  |> startProfileAt([-10, 0], %)
  |> arc({
       angleStart: 120,
       angleEnd: -60,
       radius: 5
     }, %)
  |> line([10, 0], %)
  |> line([5, 0], %)
  |> bezierCurve({
       control1: [-3, 0],
       control2: [2, 10],
       to: [-5, 10]
     }, %)
  |> line([-4, 10], %)
  |> line([-5, -2], %)
  |> close(%)

example = extrude(10, exampleSketch)

Rendered example of extrude 1