Files
modeling-app/docs/kcl/extrude.md
Nick Cameron 66f6b741c4 Support = in record initialisation (#4519)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2024-11-24 20:21:55 +00:00

157 KiB

title, excerpt, layout
title excerpt layout
extrude Extend a 2-dimensional sketch through a third dimension in order to manual

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

Name Type Description Required
length number Yes
sketch_set SketchSet A 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