Files
modeling-app/rust/kcl-lib/tests/plane_of/input.kcl
Adam Chalmers fbcbb341e2 KCL: Add planeOf function to stdlib (#7643)
Gets the plane a face lies on, if any.

Closes #7642
2025-07-01 17:42:12 +00:00

14 lines
363 B
Plaintext

@settings(defaultLengthUnit = yd)
tri = startSketchOn(XY)
|> polygon(radius = 3, numSides = 3, center = [0, 0])
|> extrude(length = 2)
// Get the plane which `tri` ends on.
p0 = planeOf(tri, face = END)
// Offset that plane by 2, then draw a square on it.
startSketchOn(offsetPlane(p0, offset = 2))
|> polygon(radius = 2, numSides = 4, center = [0, 0])