Files
modeling-app/docs/kcl/hole.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

188 KiB

title, excerpt, layout
title excerpt layout
hole Use a 2-dimensional sketch to cut a hole in another 2-dimensional sketch. manual

Use a 2-dimensional sketch to cut a hole in another 2-dimensional sketch.

hole(hole_sketch: SketchSet, sketch: Sketch) -> Sketch

Arguments

Name Type Description Required
hole_sketch SketchSet A sketch or a group of sketches. Yes
sketch Sketch A sketch is a collection of paths. Yes

Returns

Sketch - A sketch is a collection of paths.

Examples

const exampleSketch = startSketchOn('XY')
  |> startProfileAt([0, 0], %)
  |> line([0, 5], %)
  |> line([5, 0], %)
  |> line([0, -5], %)
  |> close(%)
  |> hole(circle({ center: [1, 1], radius: .25 }, %), %)
  |> hole(circle({ center: [1, 4], radius: .25 }, %), %)

const example = extrude(1, exampleSketch)

Rendered example of hole 0

fn squareHoleSketch = () => {
  const squareSketch = startSketchOn('-XZ')
    |> startProfileAt([-1, -1], %)
    |> line([2, 0], %)
    |> line([0, 2], %)
    |> line([-2, 0], %)
    |> close(%)
  return squareSketch
}

const exampleSketch = startSketchOn('-XZ')
  |> circle({ center: [0, 0], radius: 3 }, %)
  |> hole(squareHoleSketch(), %)
const example = extrude(1, exampleSketch)

Rendered example of hole 1