kcl

startSketchOn

Start a new 2-dimensional sketch on a specific plane or face.

startSketchOn(data: SketchData, tag?: FaceTag) -> SketchSurface

Arguments

NameTypeDescriptionRequired
dataSketchDataData for start sketch on. You can start a sketch on a plane or an solid.Yes
tagFaceTagA tag for a face.No

Returns

SketchSurface - A sketch type.

Examples

exampleSketch = startSketchOn("XY")
  |> startProfileAt([0, 0], %)
  |> line([10, 0], %)
  |> line([0, 10], %)
  |> line([-10, 0], %)
  |> close(%)

example = extrude(5, exampleSketch)

exampleSketch002 = startSketchOn(example, 'end')
  |> startProfileAt([1, 1], %)
  |> line([8, 0], %)
  |> line([0, 8], %)
  |> line([-8, 0], %)
  |> close(%)

example002 = extrude(5, exampleSketch002)

exampleSketch003 = startSketchOn(example002, 'end')
  |> startProfileAt([2, 2], %)
  |> line([6, 0], %)
  |> line([0, 6], %)
  |> line([-6, 0], %)
  |> close(%)

example003 = extrude(5, exampleSketch003)

Rendered example of startSketchOn 0

exampleSketch = startSketchOn("XY")
  |> startProfileAt([0, 0], %)
  |> line([10, 0], %)
  |> line([0, 10], %, $sketchingFace)
  |> line([-10, 0], %)
  |> close(%)

example = extrude(10, exampleSketch)

exampleSketch002 = startSketchOn(example, sketchingFace)
  |> startProfileAt([1, 1], %)
  |> line([8, 0], %)
  |> line([0, 8], %)
  |> line([-8, 0], %)
  |> close(%, $sketchingFace002)

example002 = extrude(10, exampleSketch002)

exampleSketch003 = startSketchOn(example002, sketchingFace002)
  |> startProfileAt([-8, 12], %)
  |> line([0, 6], %)
  |> line([6, 0], %)
  |> line([0, -6], %)
  |> close(%)

example003 = extrude(5, exampleSketch003)

Rendered example of startSketchOn 1

exampleSketch = startSketchOn('XY')
  |> startProfileAt([4, 12], %)
  |> line([2, 0], %)
  |> line([0, -6], %)
  |> line([4, -6], %)
  |> line([0, -6], %)
  |> line([-3.75, -4.5], %)
  |> line([0, -5.5], %)
  |> line([-2, 0], %)
  |> close(%)

example = revolve({ axis = 'y', angle = 180 }, exampleSketch)

exampleSketch002 = startSketchOn(example, 'end')
  |> startProfileAt([4.5, -5], %)
  |> line([0, 5], %)
  |> line([5, 0], %)
  |> line([0, -5], %)
  |> close(%)

example002 = extrude(5, exampleSketch002)

Rendered example of startSketchOn 2

a1 = startSketchOn({
       plane = {
         origin = { x = 0, y = 0, z = 0 },
         xAxis = { x = 1, y = 0, z = 0 },
         yAxis = { x = 0, y = 1, z = 0 },
         zAxis = { x = 0, y = 0, z = 1 }
       }
     })
  |> startProfileAt([0, 0], %)
  |> line([100.0, 0], %)
  |> yLine(-100.0, %)
  |> xLine(-100.0, %)
  |> yLine(100.0, %)
  |> close(%)
  |> extrude(3.14, %)

Rendered example of startSketchOn 3