Files
modeling-app/docs/kcl/startSketchOn.md
Jess Frazelle e50de134b1 renames sketch group/extrude group (#4016)
* renames

Signed-off-by: Jess Frazelle <github@jessfraz.com>

updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

fixups

Signed-off-by: Jess Frazelle <github@jessfraz.com>

updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

udpates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

fix parse

Signed-off-by: Jess Frazelle <github@jessfraz.com>

fix typos

Signed-off-by: Jess Frazelle <github@jessfraz.com>

docs

Signed-off-by: Jess Frazelle <github@jessfraz.com>

update tests

Signed-off-by: Jess Frazelle <github@jessfraz.com>

empty

* fix;

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* new

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* add the types pages

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* Look at this (photo)Graph *in the voice of Nickelback*

* empty

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-27 15:44:44 -07:00

377 KiB

title, excerpt, layout
title excerpt layout
startSketchOn Start a new 2-dimensional sketch on a specific plane or face. manual

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

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

Arguments

Name Type Description Required
data SketchData Data for start sketch on. You can start a sketch on a plane or an solid. Yes
tag FaceTag A tag for a face. No

Returns

SketchSurface - A sketch type.

Examples

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

const example = extrude(5, exampleSketch)

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

const example002 = extrude(5, exampleSketch002)

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

const example003 = extrude(5, exampleSketch003)

Rendered example of startSketchOn 0

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

const example = extrude(10, exampleSketch)

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

const example002 = extrude(10, exampleSketch002)

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

const example003 = extrude(5, exampleSketch003)

Rendered example of startSketchOn 1

const 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(%)

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

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

const example002 = extrude(5, exampleSketch002)

Rendered example of startSketchOn 2

const 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