Import geometry work w transforms (#5757)

* make work with imported geometry

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

* updates

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

* iupdates

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

* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)

* update known issues

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>
This commit is contained in:
Jess Frazelle
2025-03-11 18:23:21 -07:00
committed by GitHub
parent e5c05e1980
commit f31c2c6f81
24 changed files with 5732521 additions and 453 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,6 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Artifact graph flowchart import_transform.kcl
extension: md
snapshot_kind: binary
---

View File

@ -0,0 +1,3 @@
```mermaid
flowchart LR
```

View File

@ -0,0 +1,287 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of parsing import_transform.kcl
---
{
"Ok": {
"body": [
{
"end": 43,
"path": {
"type": "Foreign",
"path": "2-5-long-m8-chc-screw.stl"
},
"selector": {
"type": "None",
"alias": {
"end": 43,
"name": "screw",
"start": 38,
"type": "Identifier"
}
},
"start": 0,
"type": "ImportStatement",
"type": "ImportStatement"
},
{
"end": 232,
"expression": {
"body": [
{
"end": 50,
"name": "screw",
"start": 45,
"type": "Identifier",
"type": "Identifier"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 85,
"name": "roll",
"start": 81,
"type": "Identifier"
},
"arg": {
"end": 92,
"raw": "3.14",
"start": 88,
"type": "Literal",
"type": "Literal",
"value": {
"value": 3.14,
"suffix": "None"
}
}
},
{
"type": "LabeledArg",
"label": {
"end": 106,
"name": "pitch",
"start": 101,
"type": "Identifier"
},
"arg": {
"end": 113,
"raw": "3.14",
"start": 109,
"type": "Literal",
"type": "Literal",
"value": {
"value": 3.14,
"suffix": "None"
}
}
},
{
"type": "LabeledArg",
"label": {
"end": 125,
"name": "yaw",
"start": 122,
"type": "Identifier"
},
"arg": {
"end": 132,
"raw": "3.14",
"start": 128,
"type": "Literal",
"type": "Literal",
"value": {
"value": 3.14,
"suffix": "None"
}
}
}
],
"callee": {
"end": 62,
"name": "rotate",
"start": 56,
"type": "Identifier"
},
"end": 140,
"start": 56,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": {
"end": 72,
"start": 71,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 168,
"name": "translate",
"start": 159,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 176,
"raw": "3.14",
"start": 172,
"type": "Literal",
"type": "Literal",
"value": {
"value": 3.14,
"suffix": "None"
}
},
{
"end": 182,
"raw": "3.14",
"start": 178,
"type": "Literal",
"type": "Literal",
"value": {
"value": 3.14,
"suffix": "None"
}
},
{
"end": 188,
"raw": "3.14",
"start": 184,
"type": "Literal",
"type": "Literal",
"value": {
"value": 3.14,
"suffix": "None"
}
}
],
"end": 189,
"start": 171,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"end": 155,
"name": "translate",
"start": 146,
"type": "Identifier"
},
"end": 190,
"start": 146,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": {
"end": 157,
"start": 156,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"end": 210,
"name": "scale",
"start": 205,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 218,
"raw": "3.14",
"start": 214,
"type": "Literal",
"type": "Literal",
"value": {
"value": 3.14,
"suffix": "None"
}
},
{
"end": 224,
"raw": "3.14",
"start": 220,
"type": "Literal",
"type": "Literal",
"value": {
"value": 3.14,
"suffix": "None"
}
},
{
"end": 230,
"raw": "3.14",
"start": 226,
"type": "Literal",
"type": "Literal",
"value": {
"value": 3.14,
"suffix": "None"
}
}
],
"end": 231,
"start": 213,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"end": 201,
"name": "scale",
"start": 196,
"type": "Identifier"
},
"end": 232,
"start": 196,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": {
"end": 203,
"start": 202,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
}
],
"end": 232,
"start": 45,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 45,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
}
],
"end": 233,
"nonCodeMeta": {
"nonCodeNodes": {
"0": [
{
"end": 45,
"start": 43,
"type": "NonCodeNode",
"value": {
"type": "newLine"
}
}
]
},
"startNodes": []
},
"start": 0
}
}

View File

@ -0,0 +1,11 @@
import "2-5-long-m8-chc-screw.stl" as screw
screw
|> rotate(
%,
roll = 3.14,
pitch = 3.14,
yaw = 3.14,
)
|> translate(%, translate = [3.14, 3.14, 3.14])
|> scale(%, scale = [3.14, 3.14, 3.14])

View File

@ -0,0 +1,5 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Operations executed import_transform.kcl
---
[]

View File

@ -0,0 +1,19 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Variables in memory after executing import_transform.kcl
---
{
"screw": {
"type": "Module",
"value": 3,
"__meta": [
{
"sourceRange": [
0,
43,
0
]
}
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB