Files
modeling-app/rust/kcl-lib/tests/plane_of/unparsed.snap
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

17 lines
456 B
Plaintext

---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing plane_of.kcl
---
@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])