kcl library referencestdsketchstartProfile

startProfileFunction in std::sketch

Start a new profile at a given point.

startProfile(
  @sketchSurface: Plane | Face,
  at: Point2d,
  tag?: TagDeclarator,
): Sketch

Arguments

NameTypeDescriptionRequired
sketchSurfacePlane or FaceWhat to start the profile onYes
atPoint2dWhere to start the profile. An absolute point.Yes
tagTagDeclaratorTag this first starting pointNo

Returns

Sketch - A sketch is a collection of paths.

Examples

exampleSketch = startSketchOn(XZ)
  |> startProfile(at = [0, 0])
  |> line(end = [10, 0])
  |> line(end = [0, 10])
  |> line(end = [-10, 0])
  |> close()

example = extrude(exampleSketch, length = 5)

Rendered example of startProfile 0

exampleSketch = startSketchOn(-XZ)
  |> startProfile(at = [10, 10])
  |> line(end = [10, 0])
  |> line(end = [0, 10])
  |> line(end = [-10, 0])
  |> close()

example = extrude(exampleSketch, length = 5)

Rendered example of startProfile 1

exampleSketch = startSketchOn(-XZ)
  |> startProfile(at = [-10, 23])
  |> line(end = [10, 0])
  |> line(end = [0, 10])
  |> line(end = [-10, 0])
  |> close()

example = extrude(exampleSketch, length = 5)

Rendered example of startProfile 2