Kwargs: startProfileAt (#6424)

Previous:

```
startProfileAt([x, y], %)
startProfileAt([x, y], sketch001)
```

New:
```
startProfile(%, at = [x, y])
startProfile(sketch001, at = [x, y])
```
This commit is contained in:
Adam Chalmers
2025-04-25 16:01:35 -05:00
committed by GitHub
parent 9547e95e9d
commit ffbe20b586
573 changed files with 19805 additions and 16552 deletions

View File

@ -8,7 +8,7 @@ const FEATURE_TREE_EXAMPLE_CODE = `export fn timesFive(x) {
}
export fn triangle() {
return startSketchOn(XZ)
|> startProfileAt([0, 0], %)
|> startProfile(at = [0, 0])
|> xLine(length = 10)
|> line(end = [-10, -5])
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
@ -17,7 +17,7 @@ export fn triangle() {
length001 = timesFive(1) * 5
sketch001 = startSketchOn(XZ)
|> startProfileAt([20, 10], %)
|> startProfile(at = [20, 10])
|> line(end = [10, 10])
|> angledLine(angle = -45, length = length001)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
@ -27,7 +27,7 @@ triangle()
|> extrude(length = 30)
plane001 = offsetPlane(XY, offset = 10)
sketch002 = startSketchOn(plane001)
|> startProfileAt([-20, 0], %)
|> startProfile(at = [-20, 0])
|> line(end = [5, -15])
|> xLine(length = -10)
|> line(endAbsolute = [-40, 0])
@ -37,7 +37,7 @@ extrude001 = extrude(sketch002, length = 10)
`
const FEATURE_TREE_SKETCH_CODE = `sketch001 = startSketchOn(XZ)
|> startProfileAt([0, 0], %)
|> startProfile(at = [0, 0])
|> angledLine(angle = 0, length = 4, tag = $rectangleSegmentA001)
|> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 2, tag = $rectangleSegmentB001)
|> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $rectangleSegmentC001)
@ -397,9 +397,9 @@ test.describe('Feature Tree pane', () => {
const beforeKclCode = `plane001 = offsetPlane(XY, offset = 5)
sketch001 = startSketchOn(plane001)
profile001 = circle(sketch001, center = [0, 20], radius = 12)
profile002 = startProfileAt([0, 7.25], sketch001)
profile002 = startProfile(sketch001, at = [0, 7.25])
|> xLine(length = 13.3)
profile003 = startProfileAt([0, -4.93], sketch001)
profile003 = startProfile(sketch001, at = [0, -4.93])
|> line(endAbsolute = [-5.56, 0])`
await context.folderSetupFn(async (dir) => {
const testProject = join(dir, 'test-sample')