Add units to geometry structs (#5075)

* Make all geometry KclValue variants into struct variants

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* Add units to geometry types

Signed-off-by: Nick Cameron <nrc@ncameron.org>

---------

Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
Nick Cameron
2025-01-22 09:42:09 +13:00
committed by GitHub
parent 965cb18059
commit 2692f2b73a
75 changed files with 83685 additions and 65672 deletions

File diff suppressed because it is too large Load Diff

28
docs/kcl/types/Face.md Normal file
View File

@ -0,0 +1,28 @@
---
title: "Face"
excerpt: "A face."
layout: manual
---
A face.
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `id` |`string`| The id of the face. | No |
| `value` |`string`| The tag of the face. | No |
| `xAxis` |[`Point3d`](/docs/kcl/types/Point3d)| What should the faces X axis be? | No |
| `yAxis` |[`Point3d`](/docs/kcl/types/Point3d)| What should the faces Y axis be? | No |
| `zAxis` |[`Point3d`](/docs/kcl/types/Point3d)| The z-axis (normal). | No |
| `solid` |[`Solid`](/docs/kcl/types/Solid)| The solid the face is on. | No |
| `units` |[`UnitLen`](/docs/kcl/types/UnitLen)| A face. | No |
| `__meta` |`[` [`Metadata`](/docs/kcl/types/Metadata) `]`| | No |

View File

@ -20,6 +20,7 @@ A helix.
| `revolutions` |`number`| Number of revolutions. | No | | `revolutions` |`number`| Number of revolutions. | No |
| `angleStart` |`number`| Start angle (in degrees). | No | | `angleStart` |`number`| Start angle (in degrees). | No |
| `ccw` |`boolean`| Is the helix rotation counter clockwise? | No | | `ccw` |`boolean`| Is the helix rotation counter clockwise? | No |
| `units` |[`UnitLen`](/docs/kcl/types/UnitLen)| A helix. | No |
| `__meta` |`[` [`Metadata`](/docs/kcl/types/Metadata) `]`| | No | | `__meta` |`[` [`Metadata`](/docs/kcl/types/Metadata) `]`| | No |

View File

@ -20,6 +20,7 @@ A helix.
| `revolutions` |`number`| Number of revolutions. | No | | `revolutions` |`number`| Number of revolutions. | No |
| `angleStart` |`number`| Start angle (in degrees). | No | | `angleStart` |`number`| Start angle (in degrees). | No |
| `ccw` |`boolean`| Is the helix rotation counter clockwise? | No | | `ccw` |`boolean`| Is the helix rotation counter clockwise? | No |
| `units` |[`UnitLen`](/docs/kcl/types/UnitLen)| A helix. | No |
| `__meta` |`[` [`Metadata`](/docs/kcl/types/Metadata) `]`| | No | | `__meta` |`[` [`Metadata`](/docs/kcl/types/Metadata) `]`| | No |

View File

@ -168,7 +168,6 @@ Any KCL value.
---- ----
A plane.
**Type:** `object` **Type:** `object`
@ -181,17 +180,10 @@ A plane.
| Property | Type | Description | Required | | Property | Type | Description | Required |
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `type` |enum: [`Plane`](/docs/kcl/types/Plane)| | No | | `type` |enum: [`Plane`](/docs/kcl/types/Plane)| | No |
| `id` |`string`| The id of the plane. | No | | `value` |[`Plane`](/docs/kcl/types/Plane)| Any KCL value. | No |
| `value` |[`PlaneType`](/docs/kcl/types/PlaneType)| Any KCL value. | No |
| `origin` |[`Point3d`](/docs/kcl/types/Point3d)| Origin of the plane. | No |
| `xAxis` |[`Point3d`](/docs/kcl/types/Point3d)| What should the planes X axis be? | No |
| `yAxis` |[`Point3d`](/docs/kcl/types/Point3d)| What should the planes Y axis be? | No |
| `zAxis` |[`Point3d`](/docs/kcl/types/Point3d)| The z-axis (normal). | No |
| `__meta` |`[` [`Metadata`](/docs/kcl/types/Metadata) `]`| | No |
---- ----
A face.
**Type:** `object` **Type:** `object`
@ -203,14 +195,8 @@ A face.
| Property | Type | Description | Required | | Property | Type | Description | Required |
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `type` |enum: `Face`| | No | | `type` |enum: [`Face`](/docs/kcl/types/Face)| | No |
| `id` |`string`| The id of the face. | No | | `value` |[`Face`](/docs/kcl/types/Face)| Any KCL value. | No |
| `value` |`string`| The tag of the face. | No |
| `xAxis` |[`Point3d`](/docs/kcl/types/Point3d)| What should the faces X axis be? | No |
| `yAxis` |[`Point3d`](/docs/kcl/types/Point3d)| What should the faces Y axis be? | No |
| `zAxis` |[`Point3d`](/docs/kcl/types/Point3d)| The z-axis (normal). | No |
| `solid` |[`Solid`](/docs/kcl/types/Solid)| The solid the face is on. | No |
| `__meta` |`[` [`Metadata`](/docs/kcl/types/Metadata) `]`| | No |
---- ----
@ -246,7 +232,6 @@ A face.
---- ----
An solid is a collection of extrude surfaces.
**Type:** `object` **Type:** `object`
@ -259,14 +244,7 @@ An solid is a collection of extrude surfaces.
| Property | Type | Description | Required | | Property | Type | Description | Required |
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `type` |enum: [`Solid`](/docs/kcl/types/Solid)| | No | | `type` |enum: [`Solid`](/docs/kcl/types/Solid)| | No |
| `id` |`string`| The id of the solid. | No | | `value` |[`Solid`](/docs/kcl/types/Solid)| Any KCL value. | No |
| `value` |`[` [`ExtrudeSurface`](/docs/kcl/types/ExtrudeSurface) `]`| The extrude surfaces. | No |
| `sketch` |[`Sketch`](/docs/kcl/types/Sketch)| The sketch. | No |
| `height` |`number`| The height of the solid. | No |
| `startCapId` |`string`| The id of the extrusion start cap | No |
| `endCapId` |`string`| The id of the extrusion end cap | No |
| `edgeCuts` |`[` [`EdgeCut`](/docs/kcl/types/EdgeCut) `]`| Chamfers or fillets on this solid. | No |
| `__meta` |`[` [`Metadata`](/docs/kcl/types/Metadata) `]`| Metadata. | No |
---- ----
@ -286,7 +264,6 @@ An solid is a collection of extrude surfaces.
---- ----
A helix.
**Type:** `object` **Type:** `object`
@ -299,11 +276,7 @@ A helix.
| Property | Type | Description | Required | | Property | Type | Description | Required |
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `type` |enum: [`Helix`](/docs/kcl/types/Helix)| | No | | `type` |enum: [`Helix`](/docs/kcl/types/Helix)| | No |
| `value` |`string`| The id of the helix. | No | | `value` |[`Helix`](/docs/kcl/types/Helix)| Any KCL value. | No |
| `revolutions` |`number`| Number of revolutions. | No |
| `angleStart` |`number`| Start angle (in degrees). | No |
| `ccw` |`boolean`| Is the helix rotation counter clockwise? | No |
| `__meta` |`[` [`Metadata`](/docs/kcl/types/Metadata) `]`| | No |
---- ----

View File

@ -22,6 +22,7 @@ A plane.
| `xAxis` |[`Point3d`](/docs/kcl/types/Point3d)| What should the planes X axis be? | No | | `xAxis` |[`Point3d`](/docs/kcl/types/Point3d)| What should the planes X axis be? | No |
| `yAxis` |[`Point3d`](/docs/kcl/types/Point3d)| What should the planes Y axis be? | No | | `yAxis` |[`Point3d`](/docs/kcl/types/Point3d)| What should the planes Y axis be? | No |
| `zAxis` |[`Point3d`](/docs/kcl/types/Point3d)| The z-axis (normal). | No | | `zAxis` |[`Point3d`](/docs/kcl/types/Point3d)| The z-axis (normal). | No |
| `units` |[`UnitLen`](/docs/kcl/types/UnitLen)| A plane. | No |
| `__meta` |`[` [`Metadata`](/docs/kcl/types/Metadata) `]`| | No | | `__meta` |`[` [`Metadata`](/docs/kcl/types/Metadata) `]`| | No |

View File

@ -21,6 +21,7 @@ A sketch is a collection of paths.
| `on` |[`SketchSurface`](/docs/kcl/types/SketchSurface)| What the sketch is on (can be a plane or a face). | No | | `on` |[`SketchSurface`](/docs/kcl/types/SketchSurface)| What the sketch is on (can be a plane or a face). | No |
| `start` |[`BasePath`](/docs/kcl/types/BasePath)| The starting path. | No | | `start` |[`BasePath`](/docs/kcl/types/BasePath)| The starting path. | No |
| `tags` |`object`| Tag identifiers that have been declared in this sketch. | No | | `tags` |`object`| Tag identifiers that have been declared in this sketch. | No |
| `units` |[`UnitLen`](/docs/kcl/types/UnitLen)| A sketch is a collection of paths. | No |
| `__meta` |`[` [`Metadata`](/docs/kcl/types/Metadata) `]`| Metadata. | No | | `__meta` |`[` [`Metadata`](/docs/kcl/types/Metadata) `]`| Metadata. | No |

View File

@ -30,6 +30,7 @@ A sketch is a collection of paths.
| `on` |[`SketchSurface`](/docs/kcl/types/SketchSurface)| What the sketch is on (can be a plane or a face). | No | | `on` |[`SketchSurface`](/docs/kcl/types/SketchSurface)| What the sketch is on (can be a plane or a face). | No |
| `start` |[`BasePath`](/docs/kcl/types/BasePath)| The starting path. | No | | `start` |[`BasePath`](/docs/kcl/types/BasePath)| The starting path. | No |
| `tags` |`object`| Tag identifiers that have been declared in this sketch. | No | | `tags` |`object`| Tag identifiers that have been declared in this sketch. | No |
| `units` |[`UnitLen`](/docs/kcl/types/UnitLen)| A sketch or a group of sketches. | No |
| `__meta` |`[` [`Metadata`](/docs/kcl/types/Metadata) `]`| Metadata. | No | | `__meta` |`[` [`Metadata`](/docs/kcl/types/Metadata) `]`| Metadata. | No |

View File

@ -31,6 +31,7 @@ A plane.
| `xAxis` |[`Point3d`](/docs/kcl/types/Point3d)| What should the planes X axis be? | No | | `xAxis` |[`Point3d`](/docs/kcl/types/Point3d)| What should the planes X axis be? | No |
| `yAxis` |[`Point3d`](/docs/kcl/types/Point3d)| What should the planes Y axis be? | No | | `yAxis` |[`Point3d`](/docs/kcl/types/Point3d)| What should the planes Y axis be? | No |
| `zAxis` |[`Point3d`](/docs/kcl/types/Point3d)| The z-axis (normal). | No | | `zAxis` |[`Point3d`](/docs/kcl/types/Point3d)| The z-axis (normal). | No |
| `units` |[`UnitLen`](/docs/kcl/types/UnitLen)| A sketch type. | No |
| `__meta` |`[` [`Metadata`](/docs/kcl/types/Metadata) `]`| | No | | `__meta` |`[` [`Metadata`](/docs/kcl/types/Metadata) `]`| | No |
@ -54,6 +55,7 @@ A face.
| `yAxis` |[`Point3d`](/docs/kcl/types/Point3d)| What should the faces Y axis be? | No | | `yAxis` |[`Point3d`](/docs/kcl/types/Point3d)| What should the faces Y axis be? | No |
| `zAxis` |[`Point3d`](/docs/kcl/types/Point3d)| The z-axis (normal). | No | | `zAxis` |[`Point3d`](/docs/kcl/types/Point3d)| The z-axis (normal). | No |
| `solid` |[`Solid`](/docs/kcl/types/Solid)| The solid the face is on. | No | | `solid` |[`Solid`](/docs/kcl/types/Solid)| The solid the face is on. | No |
| `units` |[`UnitLen`](/docs/kcl/types/UnitLen)| A sketch type. | No |
| `__meta` |`[` [`Metadata`](/docs/kcl/types/Metadata) `]`| | No | | `__meta` |`[` [`Metadata`](/docs/kcl/types/Metadata) `]`| | No |

View File

@ -23,6 +23,7 @@ An solid is a collection of extrude surfaces.
| `startCapId` |`string`| The id of the extrusion start cap | No | | `startCapId` |`string`| The id of the extrusion start cap | No |
| `endCapId` |`string`| The id of the extrusion end cap | No | | `endCapId` |`string`| The id of the extrusion end cap | No |
| `edgeCuts` |`[` [`EdgeCut`](/docs/kcl/types/EdgeCut) `]`| Chamfers or fillets on this solid. | No | | `edgeCuts` |`[` [`EdgeCut`](/docs/kcl/types/EdgeCut) `]`| Chamfers or fillets on this solid. | No |
| `units` |[`UnitLen`](/docs/kcl/types/UnitLen)| An solid is a collection of extrude surfaces. | No |
| `__meta` |`[` [`Metadata`](/docs/kcl/types/Metadata) `]`| Metadata. | No | | `__meta` |`[` [`Metadata`](/docs/kcl/types/Metadata) `]`| Metadata. | No |

View File

@ -32,6 +32,7 @@ An solid is a collection of extrude surfaces.
| `startCapId` |`string`| The id of the extrusion start cap | No | | `startCapId` |`string`| The id of the extrusion start cap | No |
| `endCapId` |`string`| The id of the extrusion end cap | No | | `endCapId` |`string`| The id of the extrusion end cap | No |
| `edgeCuts` |`[` [`EdgeCut`](/docs/kcl/types/EdgeCut) `]`| Chamfers or fillets on this solid. | No | | `edgeCuts` |`[` [`EdgeCut`](/docs/kcl/types/EdgeCut) `]`| Chamfers or fillets on this solid. | No |
| `units` |[`UnitLen`](/docs/kcl/types/UnitLen)| A solid or a group of solids. | No |
| `__meta` |`[` [`Metadata`](/docs/kcl/types/Metadata) `]`| Metadata. | No | | `__meta` |`[` [`Metadata`](/docs/kcl/types/Metadata) `]`| Metadata. | No |

107
docs/kcl/types/UnitLen.md Normal file
View File

@ -0,0 +1,107 @@
---
title: "UnitLen"
excerpt: ""
layout: manual
---
**This schema accepts exactly one of the following:**
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `type` |enum: `Mm`| | No |
----
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `type` |enum: `Cm`| | No |
----
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `type` |enum: `M`| | No |
----
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `type` |enum: `Inches`| | No |
----
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `type` |enum: `Feet`| | No |
----
**Type:** `object`
## Properties
| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `type` |enum: `Yards`| | No |
----

View File

@ -2051,8 +2051,8 @@ export class SceneEntities {
) )
if (!(sk instanceof Reason)) { if (!(sk instanceof Reason)) {
sketch = sk sketch = sk
} else if ((maybeSketch as Solid).sketch) { } else if (maybeSketch && (maybeSketch.value as Solid)?.sketch) {
sketch = (maybeSketch as Solid).sketch sketch = (maybeSketch.value as Solid).sketch
} }
if (!sketch) return if (!sketch) return
@ -2541,7 +2541,7 @@ export function sketchFromPathToNode({
const varDec = _varDec.node const varDec = _varDec.node
const result = programMemory.get(varDec?.id?.name || '') const result = programMemory.get(varDec?.id?.name || '')
if (result?.type === 'Solid') { if (result?.type === 'Solid') {
return result.sketch return result.value.sketch
} }
const sg = sketchFromKclValue(result, varDec?.id?.name) const sg = sketchFromKclValue(result, varDec?.id?.name)
if (err(sg)) { if (err(sg)) {

View File

@ -95,9 +95,11 @@ export const processMemory = (programMemory: ProgramMemory) => {
) { ) {
const sk = sketchFromKclValueOptional(val, key) const sk = sketchFromKclValueOptional(val, key)
if (val.type === 'Solid') { if (val.type === 'Solid') {
processedMemory[key] = val.value.map(({ ...rest }: ExtrudeSurface) => { processedMemory[key] = val.value.value.map(
return rest ({ ...rest }: ExtrudeSurface) => {
}) return rest
}
)
} else if (!(sk instanceof Reason)) { } else if (!(sk instanceof Reason)) {
processedMemory[key] = sk.paths.map(({ __geoMeta, ...rest }: Path) => { processedMemory[key] = sk.paths.map(({ __geoMeta, ...rest }: Path) => {
return rest return rest

View File

@ -54,6 +54,9 @@ const mySketch001 = startSketchOn('XY')
}, },
], ],
id: expect.any(String), id: expect.any(String),
units: {
type: 'Mm',
},
__meta: [{ sourceRange: [46, 71, 0] }], __meta: [{ sourceRange: [46, 71, 0] }],
}, },
}) })
@ -72,56 +75,65 @@ const mySketch001 = startSketchOn('XY')
const sketch001 = execState.memory.get('mySketch001') const sketch001 = execState.memory.get('mySketch001')
expect(sketch001).toEqual({ expect(sketch001).toEqual({
type: 'Solid', type: 'Solid',
id: expect.any(String), value: {
value: [ type: 'Solid',
{
type: 'extrudePlane',
faceId: expect.any(String),
tag: null,
id: expect.any(String),
sourceRange: [77, 102, 0],
},
{
type: 'extrudePlane',
faceId: expect.any(String),
tag: null,
id: expect.any(String),
sourceRange: [108, 132, 0],
},
],
sketch: {
id: expect.any(String), id: expect.any(String),
__meta: expect.any(Array), value: [
on: expect.any(Object),
start: expect.any(Object),
type: 'Sketch',
paths: [
{ {
type: 'ToPoint', type: 'extrudePlane',
from: [0, 0], faceId: expect.any(String),
to: [-1.59, -1.54],
tag: null, tag: null,
__geoMeta: { id: expect.any(String),
id: expect.any(String), sourceRange: [77, 102, 0],
sourceRange: [77, 102, 0],
},
}, },
{ {
type: 'ToPoint', type: 'extrudePlane',
from: [-1.59, -1.54], faceId: expect.any(String),
to: [0.46, -5.82],
tag: null, tag: null,
__geoMeta: { id: expect.any(String),
id: expect.any(String), sourceRange: [108, 132, 0],
sourceRange: [108, 132, 0],
},
}, },
], ],
sketch: {
id: expect.any(String),
units: {
type: 'Mm',
},
__meta: expect.any(Array),
on: expect.any(Object),
start: expect.any(Object),
type: 'Sketch',
paths: [
{
type: 'ToPoint',
from: [0, 0],
to: [-1.59, -1.54],
tag: null,
__geoMeta: {
id: expect.any(String),
sourceRange: [77, 102, 0],
},
},
{
type: 'ToPoint',
from: [-1.59, -1.54],
to: [0.46, -5.82],
tag: null,
__geoMeta: {
id: expect.any(String),
sourceRange: [108, 132, 0],
},
},
],
},
height: 2,
startCapId: expect.any(String),
endCapId: expect.any(String),
units: {
type: 'Mm',
},
__meta: [{ sourceRange: [46, 71, 0] }],
}, },
height: 2,
startCapId: expect.any(String),
endCapId: expect.any(String),
__meta: [{ sourceRange: [46, 71, 0] }],
}) })
}) })
test('sketch extrude and sketch on one of the faces', async () => { test('sketch extrude and sketch on one of the faces', async () => {
@ -154,187 +166,205 @@ const sk2 = startSketchOn('XY')
expect(geos).toEqual([ expect(geos).toEqual([
{ {
type: 'Solid', type: 'Solid',
id: expect.any(String), value: {
value: [ type: 'Solid',
{
type: 'extrudePlane',
faceId: expect.any(String),
tag: null,
id: expect.any(String),
sourceRange: [69, 89, 0],
},
{
type: 'extrudePlane',
faceId: expect.any(String),
tag: {
end: 116,
start: 114,
type: 'TagDeclarator',
value: 'p',
},
id: expect.any(String),
sourceRange: [95, 117, 0],
},
{
type: 'extrudePlane',
faceId: expect.any(String),
tag: null,
id: expect.any(String),
sourceRange: [123, 142, 0],
},
],
sketch: {
id: expect.any(String), id: expect.any(String),
__meta: expect.any(Array), value: [
on: expect.any(Object),
start: expect.any(Object),
type: 'Sketch',
tags: {
p: {
__meta: [
{
sourceRange: [114, 116, 0],
},
],
type: 'TagIdentifier',
value: 'p',
info: expect.any(Object),
},
},
paths: [
{ {
type: 'ToPoint', type: 'extrudePlane',
from: [0, 0], faceId: expect.any(String),
to: [-2.5, 0],
tag: null, tag: null,
__geoMeta: { id: expect.any(String),
id: expect.any(String), sourceRange: [69, 89, 0],
sourceRange: [69, 89, 0],
},
}, },
{ {
type: 'ToPoint', type: 'extrudePlane',
from: [-2.5, 0], faceId: expect.any(String),
to: [0, 10],
tag: { tag: {
end: 116, end: 116,
start: 114, start: 114,
type: 'TagDeclarator', type: 'TagDeclarator',
value: 'p', value: 'p',
}, },
__geoMeta: { id: expect.any(String),
id: expect.any(String), sourceRange: [95, 117, 0],
sourceRange: [95, 117, 0],
},
}, },
{ {
type: 'ToPoint', type: 'extrudePlane',
from: [0, 10], faceId: expect.any(String),
to: [2.5, 0],
tag: null, tag: null,
__geoMeta: { id: expect.any(String),
id: expect.any(String), sourceRange: [123, 142, 0],
sourceRange: [123, 142, 0],
},
}, },
], ],
sketch: {
id: expect.any(String),
__meta: expect.any(Array),
on: expect.any(Object),
start: expect.any(Object),
type: 'Sketch',
units: {
type: 'Mm',
},
tags: {
p: {
__meta: [
{
sourceRange: [114, 116, 0],
},
],
type: 'TagIdentifier',
value: 'p',
info: expect.any(Object),
},
},
paths: [
{
type: 'ToPoint',
from: [0, 0],
to: [-2.5, 0],
tag: null,
__geoMeta: {
id: expect.any(String),
sourceRange: [69, 89, 0],
},
},
{
type: 'ToPoint',
from: [-2.5, 0],
to: [0, 10],
tag: {
end: 116,
start: 114,
type: 'TagDeclarator',
value: 'p',
},
__geoMeta: {
id: expect.any(String),
sourceRange: [95, 117, 0],
},
},
{
type: 'ToPoint',
from: [0, 10],
to: [2.5, 0],
tag: null,
__geoMeta: {
id: expect.any(String),
sourceRange: [123, 142, 0],
},
},
],
},
height: 2,
startCapId: expect.any(String),
endCapId: expect.any(String),
units: {
type: 'Mm',
},
__meta: [{ sourceRange: [38, 63, 0] }],
}, },
height: 2,
startCapId: expect.any(String),
endCapId: expect.any(String),
__meta: [{ sourceRange: [38, 63, 0] }],
}, },
{ {
type: 'Solid', type: 'Solid',
id: expect.any(String), value: {
value: [ type: 'Solid',
{
type: 'extrudePlane',
faceId: expect.any(String),
tag: null,
id: expect.any(String),
sourceRange: [373, 393, 0],
},
{
type: 'extrudePlane',
faceId: expect.any(String),
tag: {
end: 419,
start: 417,
type: 'TagDeclarator',
value: 'o',
},
id: expect.any(String),
sourceRange: [399, 420, 0],
},
{
type: 'extrudePlane',
faceId: expect.any(String),
tag: null,
id: expect.any(String),
sourceRange: [426, 445, 0],
},
],
sketch: {
id: expect.any(String), id: expect.any(String),
__meta: expect.any(Array), value: [
on: expect.any(Object),
start: expect.any(Object),
type: 'Sketch',
tags: {
o: {
__meta: [
{
sourceRange: [417, 419, 0],
},
],
type: 'TagIdentifier',
value: 'o',
info: expect.any(Object),
},
},
paths: [
{ {
type: 'ToPoint', type: 'extrudePlane',
from: [0, 0], faceId: expect.any(String),
to: [-2.5, 0],
tag: null, tag: null,
__geoMeta: { id: expect.any(String),
id: expect.any(String), sourceRange: [373, 393, 0],
sourceRange: [373, 393, 0],
},
}, },
{ {
type: 'ToPoint', type: 'extrudePlane',
from: [-2.5, 0], faceId: expect.any(String),
to: [0, 3],
tag: { tag: {
end: 419, end: 419,
start: 417, start: 417,
type: 'TagDeclarator', type: 'TagDeclarator',
value: 'o', value: 'o',
}, },
__geoMeta: { id: expect.any(String),
id: expect.any(String), sourceRange: [399, 420, 0],
sourceRange: [399, 420, 0],
},
}, },
{ {
type: 'ToPoint', type: 'extrudePlane',
from: [0, 3], faceId: expect.any(String),
to: [2.5, 0],
tag: null, tag: null,
__geoMeta: { id: expect.any(String),
id: expect.any(String), sourceRange: [426, 445, 0],
sourceRange: [426, 445, 0],
},
}, },
], ],
sketch: {
id: expect.any(String),
units: {
type: 'Mm',
},
__meta: expect.any(Array),
on: expect.any(Object),
start: expect.any(Object),
type: 'Sketch',
tags: {
o: {
__meta: [
{
sourceRange: [417, 419, 0],
},
],
type: 'TagIdentifier',
value: 'o',
info: expect.any(Object),
},
},
paths: [
{
type: 'ToPoint',
from: [0, 0],
to: [-2.5, 0],
tag: null,
__geoMeta: {
id: expect.any(String),
sourceRange: [373, 393, 0],
},
},
{
type: 'ToPoint',
from: [-2.5, 0],
to: [0, 3],
tag: {
end: 419,
start: 417,
type: 'TagDeclarator',
value: 'o',
},
__geoMeta: {
id: expect.any(String),
sourceRange: [399, 420, 0],
},
},
{
type: 'ToPoint',
from: [0, 3],
to: [2.5, 0],
tag: null,
__geoMeta: {
id: expect.any(String),
sourceRange: [426, 445, 0],
},
},
],
},
height: 2,
startCapId: expect.any(String),
endCapId: expect.any(String),
__meta: [{ sourceRange: [342, 367, 0] }],
units: {
type: 'Mm',
},
}, },
height: 2,
startCapId: expect.any(String),
endCapId: expect.any(String),
__meta: [{ sourceRange: [342, 367, 0] }],
}, },
]) ])
}) })

View File

@ -221,6 +221,9 @@ const newVar = myVar + 1`
}, },
], ],
id: expect.any(String), id: expect.any(String),
units: {
type: 'Mm',
},
__meta: [{ sourceRange: [39, 63, 0] }], __meta: [{ sourceRange: [39, 63, 0] }],
}, },
}) })

View File

@ -1729,7 +1729,7 @@ export function transformAstSketchLines({
let kclVal = programMemory.get(varName) let kclVal = programMemory.get(varName)
let sketch let sketch
if (kclVal?.type === 'Solid') { if (kclVal?.type === 'Solid') {
sketch = kclVal.sketch sketch = kclVal.value.sketch
} else { } else {
sketch = sketchFromKclValue(kclVal, varName) sketch = sketchFromKclValue(kclVal, varName)
if (err(sketch)) { if (err(sketch)) {

View File

@ -539,7 +539,8 @@ export function sketchFromKclValueOptional(
): Sketch | Reason { ): Sketch | Reason {
if (obj?.value?.type === 'Sketch') return obj.value if (obj?.value?.type === 'Sketch') return obj.value
if (obj?.value?.type === 'Solid') return obj.value.sketch if (obj?.value?.type === 'Solid') return obj.value.sketch
if (obj?.type === 'Solid') return obj.sketch if (obj?.type === 'Sketch') return obj.value
if (obj?.type === 'Solid') return obj.value.sketch
if (!varName) { if (!varName) {
varName = 'a KCL value' varName = 'a KCL value'
} }

View File

@ -195,7 +195,7 @@ export async function submitAndAwaitTextToKcl({
.toLowerCase()}${FILE_EXT}` .toLowerCase()}${FILE_EXT}`
if (isDesktop()) { if (isDesktop()) {
// We have to pre-emptively run our unique file name logic, // We have to preemptively run our unique file name logic,
// so that we can pass the unique file name to the toast, // so that we can pass the unique file name to the toast,
// and by extension the file-deletion-on-reject logic. // and by extension the file-deletion-on-reject logic.
newFileName = getNextFileName({ newFileName = getNextFileName({

View File

@ -121,8 +121,8 @@ impl Node<MemberExpression> {
source_ranges: vec![self.clone().into()], source_ranges: vec![self.clone().into()],
})) }))
} }
(KclValue::Solid(solid), Property::String(prop)) if prop == "sketch" => Ok(KclValue::Sketch { (KclValue::Solid { value }, Property::String(prop)) if prop == "sketch" => Ok(KclValue::Sketch {
value: Box::new(solid.sketch), value: Box::new(value.sketch),
}), }),
(KclValue::Sketch { value: sk }, Property::String(prop)) if prop == "tags" => Ok(KclValue::Object { (KclValue::Sketch { value: sk }, Property::String(prop)) if prop == "tags" => Ok(KclValue::Object {
meta: vec![Metadata { meta: vec![Metadata {
@ -662,11 +662,11 @@ fn update_memory_for_tags_of_geometry(result: &mut KclValue, exec_state: &mut Ex
exec_state.mut_memory().update_tag(&tag.value, tag.clone())?; exec_state.mut_memory().update_tag(&tag.value, tag.clone())?;
} }
} }
KclValue::Solid(ref mut solid) => { KclValue::Solid { ref mut value } => {
for value in &solid.value { for v in &value.value {
if let Some(tag) = value.get_tag() { if let Some(tag) = v.get_tag() {
// Get the past tag and update it. // Get the past tag and update it.
let mut t = if let Some(t) = solid.sketch.tags.get(&tag.name) { let mut t = if let Some(t) = value.sketch.tags.get(&tag.name) {
t.clone() t.clone()
} else { } else {
// It's probably a fillet or a chamfer. // It's probably a fillet or a chamfer.
@ -674,10 +674,10 @@ fn update_memory_for_tags_of_geometry(result: &mut KclValue, exec_state: &mut Ex
TagIdentifier { TagIdentifier {
value: tag.name.clone(), value: tag.name.clone(),
info: Some(TagEngineInfo { info: Some(TagEngineInfo {
id: value.get_id(), id: v.get_id(),
surface: Some(value.clone()), surface: Some(v.clone()),
path: None, path: None,
sketch: solid.id, sketch: value.id,
}), }),
meta: vec![Metadata { meta: vec![Metadata {
source_range: tag.clone().into(), source_range: tag.clone().into(),
@ -693,21 +693,21 @@ fn update_memory_for_tags_of_geometry(result: &mut KclValue, exec_state: &mut Ex
}; };
let mut info = info.clone(); let mut info = info.clone();
info.surface = Some(value.clone()); info.surface = Some(v.clone());
info.sketch = solid.id; info.sketch = value.id;
t.info = Some(info); t.info = Some(info);
exec_state.mut_memory().update_tag(&tag.name, t.clone())?; exec_state.mut_memory().update_tag(&tag.name, t.clone())?;
// update the sketch tags. // update the sketch tags.
solid.sketch.tags.insert(tag.name.clone(), t); value.sketch.tags.insert(tag.name.clone(), t);
} }
} }
// Find the stale sketch in memory and update it. // Find the stale sketch in memory and update it.
let cur_env_index = exec_state.memory().current_env.index(); let cur_env_index = exec_state.memory().current_env.index();
if let Some(current_env) = exec_state.mut_memory().environments.get_mut(cur_env_index) { if let Some(current_env) = exec_state.mut_memory().environments.get_mut(cur_env_index) {
current_env.update_sketch_tags(&solid.sketch); current_env.update_sketch_tags(&value.sketch);
} }
} }
_ => {} _ => {}

View File

@ -62,19 +62,27 @@ pub enum KclValue {
}, },
TagIdentifier(Box<TagIdentifier>), TagIdentifier(Box<TagIdentifier>),
TagDeclarator(crate::parsing::ast::types::BoxNode<TagDeclarator>), TagDeclarator(crate::parsing::ast::types::BoxNode<TagDeclarator>),
Plane(Box<Plane>), Plane {
Face(Box<Face>), value: Box<Plane>,
},
Face {
value: Box<Face>,
},
Sketch { Sketch {
value: Box<Sketch>, value: Box<Sketch>,
}, },
Sketches { Sketches {
value: Vec<Box<Sketch>>, value: Vec<Box<Sketch>>,
}, },
Solid(Box<Solid>), Solid {
value: Box<Solid>,
},
Solids { Solids {
value: Vec<Box<Solid>>, value: Vec<Box<Solid>>,
}, },
Helix(Box<Helix>), Helix {
value: Box<Helix>,
},
ImportedGeometry(ImportedGeometry), ImportedGeometry(ImportedGeometry),
#[ts(skip)] #[ts(skip)]
Function { Function {
@ -120,7 +128,7 @@ impl From<Vec<Box<Sketch>>> for KclValue {
impl From<SolidSet> for KclValue { impl From<SolidSet> for KclValue {
fn from(eg: SolidSet) -> Self { fn from(eg: SolidSet) -> Self {
match eg { match eg {
SolidSet::Solid(eg) => KclValue::Solid(eg), SolidSet::Solid(eg) => KclValue::Solid { value: eg },
SolidSet::Solids(egs) => KclValue::Solids { value: egs }, SolidSet::Solids(egs) => KclValue::Solids { value: egs },
} }
} }
@ -129,7 +137,7 @@ impl From<SolidSet> for KclValue {
impl From<Vec<Box<Solid>>> for KclValue { impl From<Vec<Box<Solid>>> for KclValue {
fn from(eg: Vec<Box<Solid>>) -> Self { fn from(eg: Vec<Box<Solid>>) -> Self {
if eg.len() == 1 { if eg.len() == 1 {
KclValue::Solid(eg[0].clone()) KclValue::Solid { value: eg[0].clone() }
} else { } else {
KclValue::Solids { value: eg } KclValue::Solids { value: eg }
} }
@ -140,15 +148,15 @@ impl From<KclValue> for Vec<SourceRange> {
match item { match item {
KclValue::TagDeclarator(t) => vec![SourceRange::new(t.start, t.end, t.module_id)], KclValue::TagDeclarator(t) => vec![SourceRange::new(t.start, t.end, t.module_id)],
KclValue::TagIdentifier(t) => to_vec_sr(&t.meta), KclValue::TagIdentifier(t) => to_vec_sr(&t.meta),
KclValue::Solid(e) => to_vec_sr(&e.meta), KclValue::Solid { value } => to_vec_sr(&value.meta),
KclValue::Solids { value } => value.iter().flat_map(|eg| to_vec_sr(&eg.meta)).collect(), KclValue::Solids { value } => value.iter().flat_map(|eg| to_vec_sr(&eg.meta)).collect(),
KclValue::Sketch { value } => to_vec_sr(&value.meta), KclValue::Sketch { value } => to_vec_sr(&value.meta),
KclValue::Sketches { value } => value.iter().flat_map(|eg| to_vec_sr(&eg.meta)).collect(), KclValue::Sketches { value } => value.iter().flat_map(|eg| to_vec_sr(&eg.meta)).collect(),
KclValue::Helix(e) => to_vec_sr(&e.meta), KclValue::Helix { value } => to_vec_sr(&value.meta),
KclValue::ImportedGeometry(i) => to_vec_sr(&i.meta), KclValue::ImportedGeometry(i) => to_vec_sr(&i.meta),
KclValue::Function { meta, .. } => to_vec_sr(&meta), KclValue::Function { meta, .. } => to_vec_sr(&meta),
KclValue::Plane(p) => to_vec_sr(&p.meta), KclValue::Plane { value } => to_vec_sr(&value.meta),
KclValue::Face(f) => to_vec_sr(&f.meta), KclValue::Face { value } => to_vec_sr(&value.meta),
KclValue::Bool { meta, .. } => to_vec_sr(&meta), KclValue::Bool { meta, .. } => to_vec_sr(&meta),
KclValue::Number { meta, .. } => to_vec_sr(&meta), KclValue::Number { meta, .. } => to_vec_sr(&meta),
KclValue::Int { meta, .. } => to_vec_sr(&meta), KclValue::Int { meta, .. } => to_vec_sr(&meta),
@ -171,15 +179,15 @@ impl From<&KclValue> for Vec<SourceRange> {
match item { match item {
KclValue::TagDeclarator(t) => vec![SourceRange::new(t.start, t.end, t.module_id)], KclValue::TagDeclarator(t) => vec![SourceRange::new(t.start, t.end, t.module_id)],
KclValue::TagIdentifier(t) => to_vec_sr(&t.meta), KclValue::TagIdentifier(t) => to_vec_sr(&t.meta),
KclValue::Solid(e) => to_vec_sr(&e.meta), KclValue::Solid { value } => to_vec_sr(&value.meta),
KclValue::Solids { value } => value.iter().flat_map(|eg| to_vec_sr(&eg.meta)).collect(), KclValue::Solids { value } => value.iter().flat_map(|eg| to_vec_sr(&eg.meta)).collect(),
KclValue::Sketch { value } => to_vec_sr(&value.meta), KclValue::Sketch { value } => to_vec_sr(&value.meta),
KclValue::Sketches { value } => value.iter().flat_map(|eg| to_vec_sr(&eg.meta)).collect(), KclValue::Sketches { value } => value.iter().flat_map(|eg| to_vec_sr(&eg.meta)).collect(),
KclValue::Helix(x) => to_vec_sr(&x.meta), KclValue::Helix { value } => to_vec_sr(&value.meta),
KclValue::ImportedGeometry(i) => to_vec_sr(&i.meta), KclValue::ImportedGeometry(i) => to_vec_sr(&i.meta),
KclValue::Function { meta, .. } => to_vec_sr(meta), KclValue::Function { meta, .. } => to_vec_sr(meta),
KclValue::Plane(p) => to_vec_sr(&p.meta), KclValue::Plane { value } => to_vec_sr(&value.meta),
KclValue::Face(f) => to_vec_sr(&f.meta), KclValue::Face { value } => to_vec_sr(&value.meta),
KclValue::Bool { meta, .. } => to_vec_sr(meta), KclValue::Bool { meta, .. } => to_vec_sr(meta),
KclValue::Number { meta, .. } => to_vec_sr(meta), KclValue::Number { meta, .. } => to_vec_sr(meta),
KclValue::Int { meta, .. } => to_vec_sr(meta), KclValue::Int { meta, .. } => to_vec_sr(meta),
@ -205,13 +213,13 @@ impl KclValue {
KclValue::Object { value: _, meta } => meta.clone(), KclValue::Object { value: _, meta } => meta.clone(),
KclValue::TagIdentifier(x) => x.meta.clone(), KclValue::TagIdentifier(x) => x.meta.clone(),
KclValue::TagDeclarator(x) => vec![x.metadata()], KclValue::TagDeclarator(x) => vec![x.metadata()],
KclValue::Plane(x) => x.meta.clone(), KclValue::Plane { value } => value.meta.clone(),
KclValue::Face(x) => x.meta.clone(), KclValue::Face { value } => value.meta.clone(),
KclValue::Sketch { value } => value.meta.clone(), KclValue::Sketch { value } => value.meta.clone(),
KclValue::Sketches { value } => value.iter().flat_map(|sketch| &sketch.meta).copied().collect(), KclValue::Sketches { value } => value.iter().flat_map(|sketch| &sketch.meta).copied().collect(),
KclValue::Solid(x) => x.meta.clone(), KclValue::Solid { value } => value.meta.clone(),
KclValue::Solids { value } => value.iter().flat_map(|sketch| &sketch.meta).copied().collect(), KclValue::Solids { value } => value.iter().flat_map(|sketch| &sketch.meta).copied().collect(),
KclValue::Helix(x) => x.meta.clone(), KclValue::Helix { value } => value.meta.clone(),
KclValue::ImportedGeometry(x) => x.meta.clone(), KclValue::ImportedGeometry(x) => x.meta.clone(),
KclValue::Function { meta, .. } => meta.clone(), KclValue::Function { meta, .. } => meta.clone(),
KclValue::Module { meta, .. } => meta.clone(), KclValue::Module { meta, .. } => meta.clone(),
@ -230,7 +238,7 @@ impl KclValue {
pub(crate) fn get_solid_set(&self) -> Result<SolidSet> { pub(crate) fn get_solid_set(&self) -> Result<SolidSet> {
match self { match self {
KclValue::Solid(e) => Ok(SolidSet::Solid(e.clone())), KclValue::Solid { value } => Ok(SolidSet::Solid(value.clone())),
KclValue::Solids { value } => Ok(SolidSet::Solids(value.clone())), KclValue::Solids { value } => Ok(SolidSet::Solids(value.clone())),
KclValue::Array { value, .. } => { KclValue::Array { value, .. } => {
let solids: Vec<_> = value let solids: Vec<_> = value
@ -266,15 +274,15 @@ impl KclValue {
KclValue::Uuid { .. } => "Unique ID (uuid)", KclValue::Uuid { .. } => "Unique ID (uuid)",
KclValue::TagDeclarator(_) => "TagDeclarator", KclValue::TagDeclarator(_) => "TagDeclarator",
KclValue::TagIdentifier(_) => "TagIdentifier", KclValue::TagIdentifier(_) => "TagIdentifier",
KclValue::Solid(_) => "Solid", KclValue::Solid { .. } => "Solid",
KclValue::Solids { .. } => "Solids", KclValue::Solids { .. } => "Solids",
KclValue::Sketch { .. } => "Sketch", KclValue::Sketch { .. } => "Sketch",
KclValue::Sketches { .. } => "Sketches", KclValue::Sketches { .. } => "Sketches",
KclValue::Helix(_) => "Helix", KclValue::Helix { .. } => "Helix",
KclValue::ImportedGeometry(_) => "ImportedGeometry", KclValue::ImportedGeometry(_) => "ImportedGeometry",
KclValue::Function { .. } => "Function", KclValue::Function { .. } => "Function",
KclValue::Plane(_) => "Plane", KclValue::Plane { .. } => "Plane",
KclValue::Face(_) => "Face", KclValue::Face { .. } => "Face",
KclValue::Bool { .. } => "boolean (true/false value)", KclValue::Bool { .. } => "boolean (true/false value)",
KclValue::Number { .. } => "number", KclValue::Number { .. } => "number",
KclValue::Int { .. } => "integer", KclValue::Int { .. } => "integer",
@ -383,7 +391,7 @@ impl KclValue {
} }
pub fn as_plane(&self) -> Option<&Plane> { pub fn as_plane(&self) -> Option<&Plane> {
if let KclValue::Plane(value) = &self { if let KclValue::Plane { value } = &self {
Some(value) Some(value)
} else { } else {
None None
@ -391,7 +399,7 @@ impl KclValue {
} }
pub fn as_solid(&self) -> Option<&Solid> { pub fn as_solid(&self) -> Option<&Solid> {
if let KclValue::Solid(value) = &self { if let KclValue::Solid { value } = &self {
Some(value) Some(value)
} else { } else {
None None

View File

@ -391,7 +391,7 @@ impl ProgramMemory {
env.bindings env.bindings
.values() .values()
.filter_map(|item| match item { .filter_map(|item| match item {
KclValue::Solid(eg) if eg.sketch.id == sketch_id => Some(eg.clone()), KclValue::Solid { value } if value.sketch.id == sketch_id => Some(value.clone()),
_ => None, _ => None,
}) })
.collect::<Vec<_>>() .collect::<Vec<_>>()
@ -505,8 +505,8 @@ impl DynamicState {
fn append(&mut self, memory: &ProgramMemory) { fn append(&mut self, memory: &ProgramMemory) {
for env in &memory.environments { for env in &memory.environments {
for item in env.bindings.values() { for item in env.bindings.values() {
if let KclValue::Solid(eg) = item { if let KclValue::Solid { value } = item {
self.solid_ids.push(SolidLazyIds::from(eg.as_ref())); self.solid_ids.push(SolidLazyIds::from(value.as_ref()));
} }
} }
} }
@ -759,6 +759,7 @@ pub struct Helix {
pub angle_start: f64, pub angle_start: f64,
/// Is the helix rotation counter clockwise? /// Is the helix rotation counter clockwise?
pub ccw: bool, pub ccw: bool,
pub units: UnitLen,
#[serde(rename = "__meta")] #[serde(rename = "__meta")]
pub meta: Vec<Metadata>, pub meta: Vec<Metadata>,
} }
@ -780,6 +781,7 @@ pub struct Plane {
pub y_axis: Point3d, pub y_axis: Point3d,
/// The z-axis (normal). /// The z-axis (normal).
pub z_axis: Point3d, pub z_axis: Point3d,
pub units: UnitLen,
#[serde(rename = "__meta")] #[serde(rename = "__meta")]
pub meta: Vec<Metadata>, pub meta: Vec<Metadata>,
} }
@ -795,6 +797,7 @@ impl Plane {
y_axis: Point3d::new(0.0, 1.0, 0.0), y_axis: Point3d::new(0.0, 1.0, 0.0),
z_axis: Point3d::new(0.0, 0.0, 1.0), z_axis: Point3d::new(0.0, 0.0, 1.0),
value: PlaneType::XY, value: PlaneType::XY,
units: exec_state.length_unit(),
meta: vec![], meta: vec![],
}, },
crate::std::sketch::PlaneData::NegXY => Plane { crate::std::sketch::PlaneData::NegXY => Plane {
@ -804,6 +807,7 @@ impl Plane {
y_axis: Point3d::new(0.0, 1.0, 0.0), y_axis: Point3d::new(0.0, 1.0, 0.0),
z_axis: Point3d::new(0.0, 0.0, -1.0), z_axis: Point3d::new(0.0, 0.0, -1.0),
value: PlaneType::XY, value: PlaneType::XY,
units: exec_state.length_unit(),
meta: vec![], meta: vec![],
}, },
crate::std::sketch::PlaneData::XZ => Plane { crate::std::sketch::PlaneData::XZ => Plane {
@ -813,6 +817,7 @@ impl Plane {
y_axis: Point3d::new(0.0, 0.0, 1.0), y_axis: Point3d::new(0.0, 0.0, 1.0),
z_axis: Point3d::new(0.0, -1.0, 0.0), z_axis: Point3d::new(0.0, -1.0, 0.0),
value: PlaneType::XZ, value: PlaneType::XZ,
units: exec_state.length_unit(),
meta: vec![], meta: vec![],
}, },
crate::std::sketch::PlaneData::NegXZ => Plane { crate::std::sketch::PlaneData::NegXZ => Plane {
@ -822,6 +827,7 @@ impl Plane {
y_axis: Point3d::new(0.0, 0.0, 1.0), y_axis: Point3d::new(0.0, 0.0, 1.0),
z_axis: Point3d::new(0.0, 1.0, 0.0), z_axis: Point3d::new(0.0, 1.0, 0.0),
value: PlaneType::XZ, value: PlaneType::XZ,
units: exec_state.length_unit(),
meta: vec![], meta: vec![],
}, },
crate::std::sketch::PlaneData::YZ => Plane { crate::std::sketch::PlaneData::YZ => Plane {
@ -831,6 +837,7 @@ impl Plane {
y_axis: Point3d::new(0.0, 0.0, 1.0), y_axis: Point3d::new(0.0, 0.0, 1.0),
z_axis: Point3d::new(1.0, 0.0, 0.0), z_axis: Point3d::new(1.0, 0.0, 0.0),
value: PlaneType::YZ, value: PlaneType::YZ,
units: exec_state.length_unit(),
meta: vec![], meta: vec![],
}, },
crate::std::sketch::PlaneData::NegYZ => Plane { crate::std::sketch::PlaneData::NegYZ => Plane {
@ -840,6 +847,7 @@ impl Plane {
y_axis: Point3d::new(0.0, 0.0, 1.0), y_axis: Point3d::new(0.0, 0.0, 1.0),
z_axis: Point3d::new(-1.0, 0.0, 0.0), z_axis: Point3d::new(-1.0, 0.0, 0.0),
value: PlaneType::YZ, value: PlaneType::YZ,
units: exec_state.length_unit(),
meta: vec![], meta: vec![],
}, },
crate::std::sketch::PlaneData::Plane { crate::std::sketch::PlaneData::Plane {
@ -854,6 +862,7 @@ impl Plane {
y_axis: *y_axis, y_axis: *y_axis,
z_axis: *z_axis, z_axis: *z_axis,
value: PlaneType::Custom, value: PlaneType::Custom,
units: exec_state.length_unit(),
meta: vec![], meta: vec![],
}, },
} }
@ -900,6 +909,7 @@ pub struct Face {
pub z_axis: Point3d, pub z_axis: Point3d,
/// The solid the face is on. /// The solid the face is on.
pub solid: Box<Solid>, pub solid: Box<Solid>,
pub units: UnitLen,
#[serde(rename = "__meta")] #[serde(rename = "__meta")]
pub meta: Vec<Metadata>, pub meta: Vec<Metadata>,
} }
@ -1018,6 +1028,7 @@ pub struct Sketch {
/// is sketched on face etc. /// is sketched on face etc.
#[serde(skip)] #[serde(skip)]
pub original_id: uuid::Uuid, pub original_id: uuid::Uuid,
pub units: UnitLen,
/// Metadata. /// Metadata.
#[serde(rename = "__meta")] #[serde(rename = "__meta")]
pub meta: Vec<Metadata>, pub meta: Vec<Metadata>,
@ -1141,6 +1152,7 @@ pub struct Solid {
/// Chamfers or fillets on this solid. /// Chamfers or fillets on this solid.
#[serde(default, skip_serializing_if = "Vec::is_empty")] #[serde(default, skip_serializing_if = "Vec::is_empty")]
pub edge_cuts: Vec<EdgeCut>, pub edge_cuts: Vec<EdgeCut>,
pub units: UnitLen,
/// Metadata. /// Metadata.
#[serde(rename = "__meta")] #[serde(rename = "__meta")]
pub meta: Vec<Metadata>, pub meta: Vec<Metadata>,

View File

@ -863,27 +863,7 @@ impl<'a> FromKclValue<'a> for crate::std::planes::StandardPlane {
impl<'a> FromKclValue<'a> for crate::execution::Plane { impl<'a> FromKclValue<'a> for crate::execution::Plane {
fn from_kcl_val(arg: &'a KclValue) -> Option<Self> { fn from_kcl_val(arg: &'a KclValue) -> Option<Self> {
if let Some(plane) = arg.as_plane() { arg.as_plane().cloned()
return Some(plane.clone());
}
let obj = arg.as_object()?;
let_field_of!(obj, id);
let_field_of!(obj, value);
let_field_of!(obj, origin);
let_field_of!(obj, x_axis "xAxis");
let_field_of!(obj, y_axis "yAxis");
let_field_of!(obj, z_axis "zAxis");
let_field_of!(obj, meta "__meta");
Some(Self {
id,
value,
origin,
x_axis,
y_axis,
z_axis,
meta,
})
} }
} }
@ -1238,12 +1218,12 @@ impl<'a> FromKclValue<'a> for crate::execution::Point3d {
impl<'a> FromKclValue<'a> for super::sketch::PlaneData { impl<'a> FromKclValue<'a> for super::sketch::PlaneData {
fn from_kcl_val(arg: &'a KclValue) -> Option<Self> { fn from_kcl_val(arg: &'a KclValue) -> Option<Self> {
// Case 0: actual plane // Case 0: actual plane
if let KclValue::Plane(p) = arg { if let KclValue::Plane { value } = arg {
return Some(Self::Plane { return Some(Self::Plane {
origin: Box::new(p.origin), origin: Box::new(value.origin),
x_axis: Box::new(p.x_axis), x_axis: Box::new(value.x_axis),
y_axis: Box::new(p.y_axis), y_axis: Box::new(value.y_axis),
z_axis: Box::new(p.z_axis), z_axis: Box::new(value.z_axis),
}); });
} }
// Case 1: predefined plane // Case 1: predefined plane
@ -1612,7 +1592,7 @@ impl<'a> FromKclValue<'a> for Sketch {
impl<'a> FromKclValue<'a> for Helix { impl<'a> FromKclValue<'a> for Helix {
fn from_kcl_val(arg: &'a KclValue) -> Option<Self> { fn from_kcl_val(arg: &'a KclValue) -> Option<Self> {
let KclValue::Helix(value) = arg else { let KclValue::Helix { value } = arg else {
return None; return None;
}; };
Some(value.as_ref().to_owned()) Some(value.as_ref().to_owned())
@ -1668,10 +1648,10 @@ impl<'a> FromKclValue<'a> for SketchSet {
impl<'a> FromKclValue<'a> for Box<Solid> { impl<'a> FromKclValue<'a> for Box<Solid> {
fn from_kcl_val(arg: &'a KclValue) -> Option<Self> { fn from_kcl_val(arg: &'a KclValue) -> Option<Self> {
let KclValue::Solid(s) = arg else { let KclValue::Solid { value } = arg else {
return None; return None;
}; };
Some(s.to_owned()) Some(value.to_owned())
} }
} }
@ -1691,8 +1671,8 @@ impl<'a> FromKclValue<'a> for SketchOrSurface {
fn from_kcl_val(arg: &'a KclValue) -> Option<Self> { fn from_kcl_val(arg: &'a KclValue) -> Option<Self> {
match arg { match arg {
KclValue::Sketch { value: sg } => Some(Self::Sketch(sg.to_owned())), KclValue::Sketch { value: sg } => Some(Self::Sketch(sg.to_owned())),
KclValue::Plane(sg) => Some(Self::SketchSurface(SketchSurface::Plane(sg.clone()))), KclValue::Plane { value } => Some(Self::SketchSurface(SketchSurface::Plane(value.clone()))),
KclValue::Face(sg) => Some(Self::SketchSurface(SketchSurface::Face(sg.clone()))), KclValue::Face { value } => Some(Self::SketchSurface(SketchSurface::Face(value.clone()))),
_ => None, _ => None,
} }
} }
@ -1700,8 +1680,8 @@ impl<'a> FromKclValue<'a> for SketchOrSurface {
impl<'a> FromKclValue<'a> for SketchSurface { impl<'a> FromKclValue<'a> for SketchSurface {
fn from_kcl_val(arg: &'a KclValue) -> Option<Self> { fn from_kcl_val(arg: &'a KclValue) -> Option<Self> {
match arg { match arg {
KclValue::Plane(sg) => Some(Self::Plane(sg.clone())), KclValue::Plane { value } => Some(Self::Plane(value.clone())),
KclValue::Face(sg) => Some(Self::Face(sg.clone())), KclValue::Face { value } => Some(Self::Face(value.clone())),
_ => None, _ => None,
} }
} }

View File

@ -31,8 +31,8 @@ pub struct ChamferData {
pub async fn chamfer(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> { pub async fn chamfer(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
let (data, solid, tag): (ChamferData, Box<Solid>, Option<TagNode>) = args.get_data_and_solid_and_tag()?; let (data, solid, tag): (ChamferData, Box<Solid>, Option<TagNode>) = args.get_data_and_solid_and_tag()?;
let solid = inner_chamfer(data, solid, tag, exec_state, args).await?; let value = inner_chamfer(data, solid, tag, exec_state, args).await?;
Ok(KclValue::Solid(solid)) Ok(KclValue::Solid { value })
} }
/// Cut a straight transitional edge along a tagged path. /// Cut a straight transitional edge along a tagged path.

View File

@ -280,6 +280,7 @@ pub(crate) async fn do_post_extrude(
id: sketch.id, id: sketch.id,
value: new_value, value: new_value,
meta: sketch.meta.clone(), meta: sketch.meta.clone(),
units: sketch.units,
sketch, sketch,
height: length, height: length,
start_cap_id, start_cap_id,

View File

@ -57,8 +57,8 @@ impl EdgeReference {
pub async fn fillet(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> { pub async fn fillet(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
let (data, solid, tag): (FilletData, Box<Solid>, Option<TagNode>) = args.get_data_and_solid_and_tag()?; let (data, solid, tag): (FilletData, Box<Solid>, Option<TagNode>) = args.get_data_and_solid_and_tag()?;
let solid = inner_fillet(data, solid, tag, exec_state, args).await?; let value = inner_fillet(data, solid, tag, exec_state, args).await?;
Ok(KclValue::Solid(solid)) Ok(KclValue::Solid { value })
} }
/// Blend a transitional edge along a tagged path, smoothing the sharp edge. /// Blend a transitional edge along a tagged path, smoothing the sharp edge.

View File

@ -39,8 +39,8 @@ pub struct HelixData {
pub async fn helix(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> { pub async fn helix(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
let data: HelixData = args.get_data()?; let data: HelixData = args.get_data()?;
let helix = inner_helix(data, exec_state, args).await?; let value = inner_helix(data, exec_state, args).await?;
Ok(KclValue::Helix(helix)) Ok(KclValue::Helix { value })
} }
/// Create a helix. /// Create a helix.
@ -117,6 +117,7 @@ async fn inner_helix(data: HelixData, exec_state: &mut ExecState, args: Args) ->
revolutions: data.revolutions, revolutions: data.revolutions,
angle_start: data.angle_start, angle_start: data.angle_start,
ccw: data.ccw, ccw: data.ccw,
units: exec_state.length_unit(),
meta: vec![args.source_range.into()], meta: vec![args.source_range.into()],
}); });
@ -193,8 +194,8 @@ pub struct HelixRevolutionsData {
pub async fn helix_revolutions(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> { pub async fn helix_revolutions(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
let (data, solid): (HelixRevolutionsData, Box<Solid>) = args.get_data_and_solid()?; let (data, solid): (HelixRevolutionsData, Box<Solid>) = args.get_data_and_solid()?;
let solid = inner_helix_revolutions(data, solid, exec_state, args).await?; let value = inner_helix_revolutions(data, solid, exec_state, args).await?;
Ok(KclValue::Solid(solid)) Ok(KclValue::Solid { value })
} }
/// Create a helix on a cylinder. /// Create a helix on a cylinder.

View File

@ -30,7 +30,7 @@ pub async fn loft(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
// Tolerance for the loft operation. // Tolerance for the loft operation.
let tolerance: Option<f64> = args.get_kw_arg_opt("tolerance"); let tolerance: Option<f64> = args.get_kw_arg_opt("tolerance");
let solid = inner_loft( let value = inner_loft(
sketches, sketches,
v_degree, v_degree,
bez_approximate_rational, bez_approximate_rational,
@ -40,7 +40,7 @@ pub async fn loft(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
args, args,
) )
.await?; .await?;
Ok(KclValue::Solid(solid)) Ok(KclValue::Solid { value })
} }
/// Create a 3D surface or solid by interpolating between two or more sketches. /// Create a 3D surface or solid by interpolating between two or more sketches.

View File

@ -55,7 +55,7 @@ pub async fn offset_plane(exec_state: &mut ExecState, args: Args) -> Result<KclV
let (std_plane, offset): (StandardPlane, f64) = args.get_data_and_float()?; let (std_plane, offset): (StandardPlane, f64) = args.get_data_and_float()?;
let plane = inner_offset_plane(std_plane, offset, exec_state).await?; let plane = inner_offset_plane(std_plane, offset, exec_state).await?;
make_offset_plane_in_engine(&plane, exec_state, &args).await?; make_offset_plane_in_engine(&plane, exec_state, &args).await?;
Ok(KclValue::Plane(Box::new(plane))) Ok(KclValue::Plane { value: Box::new(plane) })
} }
/// Offset a plane by a distance along its normal. /// Offset a plane by a distance along its normal.

View File

@ -32,8 +32,8 @@ pub struct RevolveData {
pub async fn revolve(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> { pub async fn revolve(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
let (data, sketch): (RevolveData, Sketch) = args.get_data_and_sketch()?; let (data, sketch): (RevolveData, Sketch) = args.get_data_and_sketch()?;
let solid = inner_revolve(data, sketch, exec_state, args).await?; let value = inner_revolve(data, sketch, exec_state, args).await?;
Ok(KclValue::Solid(solid)) Ok(KclValue::Solid { value })
} }
/// Rotate a sketch around some provided axis, creating a solid from its extent. /// Rotate a sketch around some provided axis, creating a solid from its extent.

View File

@ -247,8 +247,8 @@ async fn inner_shell(
pub async fn hollow(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> { pub async fn hollow(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
let (thickness, solid): (f64, Box<Solid>) = args.get_data_and_solid()?; let (thickness, solid): (f64, Box<Solid>) = args.get_data_and_solid()?;
let solid = inner_hollow(thickness, solid, exec_state, args).await?; let value = inner_hollow(thickness, solid, exec_state, args).await?;
Ok(KclValue::Solid(solid)) Ok(KclValue::Solid { value })
} }
/// Make the inside of a 3D object hollow. /// Make the inside of a 3D object hollow.

View File

@ -955,8 +955,8 @@ pub async fn start_sketch_on(exec_state: &mut ExecState, args: Args) -> Result<K
let (data, tag): (SketchData, Option<FaceTag>) = args.get_data_and_optional_tag()?; let (data, tag): (SketchData, Option<FaceTag>) = args.get_data_and_optional_tag()?;
match inner_start_sketch_on(data, tag, exec_state, &args).await? { match inner_start_sketch_on(data, tag, exec_state, &args).await? {
SketchSurface::Plane(plane) => Ok(KclValue::Plane(plane)), SketchSurface::Plane(value) => Ok(KclValue::Plane { value }),
SketchSurface::Face(face) => Ok(KclValue::Face(face)), SketchSurface::Face(value) => Ok(KclValue::Face { value }),
} }
} }
@ -1124,6 +1124,7 @@ async fn start_sketch_on_face(
x_axis: solid.sketch.on.x_axis(), x_axis: solid.sketch.on.x_axis(),
y_axis: solid.sketch.on.y_axis(), y_axis: solid.sketch.on.y_axis(),
z_axis: solid.sketch.on.z_axis(), z_axis: solid.sketch.on.z_axis(),
units: solid.units,
solid, solid,
meta: vec![args.source_range.into()], meta: vec![args.source_range.into()],
})) }))
@ -1262,6 +1263,11 @@ pub(crate) async fn inner_start_profile_at(
_ => {} _ => {}
} }
let units = match &sketch_surface {
SketchSurface::Face(face) => face.units,
SketchSurface::Plane(_) => exec_state.length_unit(),
};
// Enter sketch mode on the surface. // Enter sketch mode on the surface.
// We call this here so you can reuse the sketch surface for multiple sketches. // We call this here so you can reuse the sketch surface for multiple sketches.
let id = exec_state.next_uuid(); let id = exec_state.next_uuid();
@ -1311,6 +1317,7 @@ pub(crate) async fn inner_start_profile_at(
original_id: path_id, original_id: path_id,
on: sketch_surface.clone(), on: sketch_surface.clone(),
paths: vec![], paths: vec![],
units,
meta: vec![args.source_range.into()], meta: vec![args.source_range.into()],
tags: if let Some(tag) = &tag { tags: if let Some(tag) = &tag {
let mut tag_identifier: TagIdentifier = tag.into(); let mut tag_identifier: TagIdentifier = tag.into();

View File

@ -39,8 +39,8 @@ pub struct SweepData {
pub async fn sweep(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> { pub async fn sweep(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
let (data, sketch): (SweepData, Sketch) = args.get_data_and_sketch()?; let (data, sketch): (SweepData, Sketch) = args.get_data_and_sketch()?;
let solid = inner_sweep(data, sketch, exec_state, args).await?; let value = inner_sweep(data, sketch, exec_state, args).await?;
Ok(KclValue::Solid(solid)) Ok(KclValue::Solid { value })
} }
/// Extrude a sketch along a path. /// Extrude a sketch along a path.

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing angled_line.kcl description: Program memory after executing angled_line.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [
@ -29,117 +28,28 @@ snapshot_kind: text
}, },
"part001": { "part001": {
"type": "Solid", "type": "Solid",
"type": "Solid", "value": {
"id": "[uuid]", "type": "Solid",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
73,
94,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
100,
130,
0
],
"tag": {
"end": 129,
"start": 123,
"type": "TagDeclarator",
"value": "seg01"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
136,
159,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
165,
202,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
208,
232,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
238,
246,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]", "id": "[uuid]",
"paths": [ "value": [
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
73, 73,
94, 94,
0 0
]
},
"from": [
4.83,
12.56
], ],
"tag": null, "tag": null,
"to": [ "type": "extrudePlane"
19.93,
15.04
],
"type": "ToPoint"
}, },
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
100, 100,
130, 130,
0 0
]
},
"from": [
19.93,
15.04
], ],
"tag": { "tag": {
"end": 129, "end": 129,
@ -147,198 +57,310 @@ snapshot_kind: text
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "seg01" "value": "seg01"
}, },
"to": [ "type": "extrudePlane"
23.08,
5.19
],
"type": "ToPoint"
}, },
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
136,
159,
0
]
},
"from": [
23.08,
5.19
],
"tag": null,
"to": [
7.91,
1.09
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
165,
202,
0
]
},
"from": [
7.91,
1.09
],
"tag": null,
"to": [
11.6718,
-10.6731
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
208,
232,
0
]
},
"from": [
11.6718,
-10.6731
],
"tag": null,
"to": [
-1.3482,
-0.6431
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
238,
246,
0
]
},
"from": [
-1.3482,
-0.6431
],
"tag": null,
"to": [
4.83,
12.56
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"__meta": []
},
"start": {
"from": [
4.83,
12.56
],
"to": [
4.83,
12.56
],
"tag": null,
"__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
35, 136,
67, 159,
0 0
] ],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
165,
202,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
208,
232,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
238,
246,
0
],
"tag": null,
"type": "extrudePlane"
} }
}, ],
"tags": { "sketch": {
"seg01": { "type": "Sketch",
"type": "TagIdentifier", "id": "[uuid]",
"value": "seg01", "paths": [
"info": { {
"type": "TagEngineInfo", "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sketch": "[uuid]", "sourceRange": [
"path": { 73,
"__geoMeta": { 94,
"id": "[uuid]", 0
"sourceRange": [ ]
100,
130,
0
]
},
"from": [
19.93,
15.040000000000001
],
"tag": {
"end": 129,
"start": 123,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
23.08,
5.190000000000001
],
"type": "ToPoint"
}, },
"surface": { "from": [
"faceId": "[uuid]", 4.83,
12.56
],
"tag": null,
"to": [
19.93,
15.04
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
100, 100,
130, 130,
0 0
], ]
"tag": { },
"end": 129, "from": [
"start": 123, 19.93,
"type": "TagDeclarator", 15.04
"value": "seg01" ],
}, "tag": {
"type": "extrudePlane" "end": 129,
} "start": 123,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
23.08,
5.19
],
"type": "ToPoint"
}, },
"__meta": [ {
{ "__geoMeta": {
"id": "[uuid]",
"sourceRange": [ "sourceRange": [
123, 136,
129, 159,
0 0
] ]
} },
] "from": [
} 23.08,
5.19
],
"tag": null,
"to": [
7.91,
1.09
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
165,
202,
0
]
},
"from": [
7.91,
1.09
],
"tag": null,
"to": [
11.6718,
-10.6731
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
208,
232,
0
]
},
"from": [
11.6718,
-10.6731
],
"tag": null,
"to": [
-1.3482,
-0.6431
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
238,
246,
0
]
},
"from": [
-1.3482,
-0.6431
],
"tag": null,
"to": [
4.83,
12.56
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
4.83,
12.56
],
"to": [
4.83,
12.56
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
35,
67,
0
]
}
},
"tags": {
"seg01": {
"type": "TagIdentifier",
"value": "seg01",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
100,
130,
0
]
},
"from": [
19.93,
15.040000000000001
],
"tag": {
"end": 129,
"start": 123,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
23.08,
5.190000000000001
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
100,
130,
0
],
"tag": {
"end": 129,
"start": 123,
"type": "TagDeclarator",
"value": "seg01"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
123,
129,
0
]
}
]
}
},
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
67,
0
]
}
]
},
"height": 4.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
}, },
"__meta": [ "__meta": [
{ {
@ -349,19 +371,7 @@ snapshot_kind: text
] ]
} }
] ]
}, }
"height": 4.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"__meta": [
{
"sourceRange": [
35,
67,
0
]
}
]
}, },
"seg01": { "seg01": {
"type": "TagIdentifier", "type": "TagIdentifier",

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing artifact_graph_example_code_no_3d.kcl description: Program memory after executing artifact_graph_example_code_no_3d.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [
@ -308,6 +307,9 @@ snapshot_kind: text
"y": 0.0, "y": 0.0,
"z": 0.0 "z": 0.0
}, },
"units": {
"type": "Mm"
},
"__meta": [] "__meta": []
}, },
"start": { "start": {
@ -463,6 +465,9 @@ snapshot_kind: text
] ]
} }
}, },
"units": {
"type": "Mm"
},
"__meta": [ "__meta": [
{ {
"sourceRange": [ "sourceRange": [
@ -575,6 +580,9 @@ snapshot_kind: text
"y": 1.0, "y": 1.0,
"z": 0.0 "z": 0.0
}, },
"units": {
"type": "Mm"
},
"__meta": [] "__meta": []
}, },
"start": { "start": {
@ -596,6 +604,9 @@ snapshot_kind: text
] ]
} }
}, },
"units": {
"type": "Mm"
},
"__meta": [ "__meta": [
{ {
"sourceRange": [ "sourceRange": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing artifact_graph_example_code_offset_planes.kcl description: Program memory after executing artifact_graph_example_code_offset_planes.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [
@ -29,81 +28,96 @@ snapshot_kind: text
}, },
"offsetPlane001": { "offsetPlane001": {
"type": "Plane", "type": "Plane",
"id": "[uuid]", "value": {
"value": "Custom", "id": "[uuid]",
"origin": { "value": "Custom",
"x": 0.0, "origin": {
"y": 0.0, "x": 0.0,
"z": 20.0 "y": 0.0,
}, "z": 20.0
"xAxis": { },
"x": 1.0, "xAxis": {
"y": 0.0, "x": 1.0,
"z": 0.0 "y": 0.0,
}, "z": 0.0
"yAxis": { },
"x": 0.0, "yAxis": {
"y": 1.0, "x": 0.0,
"z": 0.0 "y": 1.0,
}, "z": 0.0
"zAxis": { },
"x": 0.0, "zAxis": {
"y": 0.0, "x": 0.0,
"z": 1.0 "y": 0.0,
}, "z": 1.0
"__meta": [] },
"units": {
"type": "Mm"
},
"__meta": []
}
}, },
"offsetPlane002": { "offsetPlane002": {
"type": "Plane", "type": "Plane",
"id": "[uuid]", "value": {
"value": "Custom", "id": "[uuid]",
"origin": { "value": "Custom",
"x": 0.0, "origin": {
"y": 50.0, "x": 0.0,
"z": 0.0 "y": 50.0,
}, "z": 0.0
"xAxis": { },
"x": 1.0, "xAxis": {
"y": 0.0, "x": 1.0,
"z": 0.0 "y": 0.0,
}, "z": 0.0
"yAxis": { },
"x": 0.0, "yAxis": {
"y": 0.0, "x": 0.0,
"z": 1.0 "y": 0.0,
}, "z": 1.0
"zAxis": { },
"x": 0.0, "zAxis": {
"y": -1.0, "x": 0.0,
"z": 0.0 "y": -1.0,
}, "z": 0.0
"__meta": [] },
"units": {
"type": "Mm"
},
"__meta": []
}
}, },
"offsetPlane003": { "offsetPlane003": {
"type": "Plane", "type": "Plane",
"id": "[uuid]", "value": {
"value": "Custom", "id": "[uuid]",
"origin": { "value": "Custom",
"x": 10.0, "origin": {
"y": 0.0, "x": 10.0,
"z": 0.0 "y": 0.0,
}, "z": 0.0
"xAxis": { },
"x": 0.0, "xAxis": {
"y": 1.0, "x": 0.0,
"z": 0.0 "y": 1.0,
}, "z": 0.0
"yAxis": { },
"x": 0.0, "yAxis": {
"y": 0.0, "x": 0.0,
"z": 1.0 "y": 0.0,
}, "z": 1.0
"zAxis": { },
"x": 1.0, "zAxis": {
"y": 0.0, "x": 1.0,
"z": 0.0 "y": 0.0,
}, "z": 0.0
"__meta": [] },
"units": {
"type": "Mm"
},
"__meta": []
}
}, },
"sketch002": { "sketch002": {
"type": "Sketch", "type": "Sketch",
@ -156,6 +170,9 @@ snapshot_kind: text
"y": 0.0, "y": 0.0,
"z": 1.0 "z": 1.0
}, },
"units": {
"type": "Mm"
},
"__meta": [] "__meta": []
}, },
"start": { "start": {
@ -177,6 +194,9 @@ snapshot_kind: text
] ]
} }
}, },
"units": {
"type": "Mm"
},
"__meta": [ "__meta": [
{ {
"sourceRange": [ "sourceRange": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing basic_fillet_cube_close_opposite.kcl description: Program memory after executing basic_fillet_cube_close_opposite.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [
@ -29,85 +28,17 @@ snapshot_kind: text
}, },
"part001": { "part001": {
"type": "Solid", "type": "Solid",
"type": "Solid", "value": {
"id": "[uuid]", "type": "Solid",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
90,
0
],
"tag": {
"end": 89,
"start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
96,
112,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
118,
144,
0
],
"tag": {
"end": 143,
"start": 136,
"type": "TagDeclarator",
"value": "thing2"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
150,
167,
0
],
"tag": {
"end": 166,
"start": 159,
"type": "TagDeclarator",
"value": "thing3"
},
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]", "id": "[uuid]",
"paths": [ "value": [
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
66, 66,
90, 90,
0 0
]
},
"from": [
0.0,
0.0
], ],
"tag": { "tag": {
"end": 89, "end": 89,
@ -115,44 +46,26 @@ snapshot_kind: text
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing" "value": "thing"
}, },
"to": [ "type": "extrudePlane"
0.0,
10.0
],
"type": "ToPoint"
}, },
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
96, 96,
112, 112,
0 0
]
},
"from": [
0.0,
10.0
], ],
"tag": null, "tag": null,
"to": [ "type": "extrudePlane"
10.0,
10.0
],
"type": "ToPoint"
}, },
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
118, 118,
144, 144,
0 0
]
},
"from": [
10.0,
10.0
], ],
"tag": { "tag": {
"end": 143, "end": 143,
@ -160,24 +73,15 @@ snapshot_kind: text
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing2" "value": "thing2"
}, },
"to": [ "type": "extrudePlane"
10.0,
0.0
],
"type": "ToPoint"
}, },
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
150, 150,
167, 167,
0 0
]
},
"from": [
10.0,
0.0
], ],
"tag": { "tag": {
"end": 166, "end": 166,
@ -185,236 +89,370 @@ snapshot_kind: text
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing3" "value": "thing3"
}, },
"to": [ "type": "extrudePlane"
0.0,
0.0
],
"type": "ToPoint"
} }
], ],
"on": { "sketch": {
"type": "plane", "type": "Sketch",
"id": "[uuid]", "id": "[uuid]",
"value": "XY", "paths": [
"origin": { {
"x": 0.0, "__geoMeta": {
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
35,
60,
0
]
}
},
"tags": {
"thing": {
"type": "TagIdentifier",
"value": "thing",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
90,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 89,
"start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
66, 66,
90, 90,
0 0
], ]
"tag": { },
"end": 89, "from": [
"start": 83, 0.0,
"type": "TagDeclarator", 0.0
"value": "thing" ],
}, "tag": {
"type": "extrudePlane" "end": 89,
} "start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
}, },
"__meta": [ {
{ "__geoMeta": {
"id": "[uuid]",
"sourceRange": [ "sourceRange": [
83, 96,
89, 112,
0 0
] ]
}
]
},
"thing2": {
"type": "TagIdentifier",
"value": "thing2",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
118,
144,
0
]
},
"from": [
10.0,
10.0
],
"tag": {
"end": 143,
"start": 136,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
}, },
"surface": { "from": [
"faceId": "[uuid]", 0.0,
10.0
],
"tag": null,
"to": [
10.0,
10.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
118, 118,
144, 144,
0 0
],
"tag": {
"end": 143,
"start": 136,
"type": "TagDeclarator",
"value": "thing2"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
136,
143,
0
] ]
}
]
},
"thing3": {
"type": "TagIdentifier",
"value": "thing3",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
150,
167,
0
]
},
"from": [
10.0,
0.0
],
"tag": {
"end": 166,
"start": 159,
"type": "TagDeclarator",
"value": "thing3"
},
"to": [
0.0,
0.0
],
"type": "ToPoint"
}, },
"surface": { "from": [
"faceId": "[uuid]", 10.0,
10.0
],
"tag": {
"end": 143,
"start": 136,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
150, 150,
167, 167,
0 0
],
"tag": {
"end": 166,
"start": 159,
"type": "TagDeclarator",
"value": "thing3"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
159,
166,
0
] ]
} },
] "from": [
10.0,
0.0
],
"tag": {
"end": 166,
"start": 159,
"type": "TagDeclarator",
"value": "thing3"
},
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
35,
60,
0
]
}
},
"tags": {
"thing": {
"type": "TagIdentifier",
"value": "thing",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
90,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 89,
"start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
90,
0
],
"tag": {
"end": 89,
"start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
83,
89,
0
]
}
]
},
"thing2": {
"type": "TagIdentifier",
"value": "thing2",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
118,
144,
0
]
},
"from": [
10.0,
10.0
],
"tag": {
"end": 143,
"start": 136,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
118,
144,
0
],
"tag": {
"end": 143,
"start": 136,
"type": "TagDeclarator",
"value": "thing2"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
136,
143,
0
]
}
]
},
"thing3": {
"type": "TagIdentifier",
"value": "thing3",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
150,
167,
0
]
},
"from": [
10.0,
0.0
],
"tag": {
"end": 166,
"start": 159,
"type": "TagDeclarator",
"value": "thing3"
},
"to": [
0.0,
0.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
150,
167,
0
],
"tag": {
"end": 166,
"start": 159,
"type": "TagDeclarator",
"value": "thing3"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
159,
166,
0
]
}
]
}
},
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
]
},
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"edgeCuts": [
{
"type": "fillet",
"id": "[uuid]",
"radius": 2.0,
"edgeId": "[uuid]",
"tag": null
},
{
"type": "fillet",
"id": "[uuid]",
"radius": 2.0,
"edgeId": "[uuid]",
"tag": null
} }
],
"units": {
"type": "Mm"
}, },
"__meta": [ "__meta": [
{ {
@ -425,35 +463,7 @@ snapshot_kind: text
] ]
} }
] ]
}, }
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"edgeCuts": [
{
"type": "fillet",
"id": "[uuid]",
"radius": 2.0,
"edgeId": "[uuid]",
"tag": null
},
{
"type": "fillet",
"id": "[uuid]",
"radius": 2.0,
"edgeId": "[uuid]",
"tag": null
}
],
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
]
}, },
"thing": { "thing": {
"type": "TagIdentifier", "type": "TagIdentifier",

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing basic_fillet_cube_end.kcl description: Program memory after executing basic_fillet_cube_end.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [
@ -29,80 +28,17 @@ snapshot_kind: text
}, },
"part001": { "part001": {
"type": "Solid", "type": "Solid",
"type": "Solid", "value": {
"id": "[uuid]", "type": "Solid",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
90,
0
],
"tag": {
"end": 89,
"start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
96,
112,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
118,
144,
0
],
"tag": {
"end": 143,
"start": 136,
"type": "TagDeclarator",
"value": "thing2"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
150,
158,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]", "id": "[uuid]",
"paths": [ "value": [
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
66, 66,
90, 90,
0 0
]
},
"from": [
0.0,
0.0
], ],
"tag": { "tag": {
"end": 89, "end": 89,
@ -110,44 +46,26 @@ snapshot_kind: text
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing" "value": "thing"
}, },
"to": [ "type": "extrudePlane"
0.0,
10.0
],
"type": "ToPoint"
}, },
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
96, 96,
112, 112,
0 0
]
},
"from": [
0.0,
10.0
], ],
"tag": null, "tag": null,
"to": [ "type": "extrudePlane"
10.0,
10.0
],
"type": "ToPoint"
}, },
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
118, 118,
144, 144,
0 0
]
},
"from": [
10.0,
10.0
], ],
"tag": { "tag": {
"end": 143, "end": 143,
@ -155,197 +73,317 @@ snapshot_kind: text
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing2" "value": "thing2"
}, },
"to": [ "type": "extrudePlane"
10.0,
0.0
],
"type": "ToPoint"
}, },
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
150,
158,
0
]
},
"from": [
10.0,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
35, 150,
60, 158,
0 0
] ],
"tag": null,
"type": "extrudePlane"
} }
}, ],
"tags": { "sketch": {
"thing": { "type": "Sketch",
"type": "TagIdentifier", "id": "[uuid]",
"value": "thing", "paths": [
"info": { {
"type": "TagEngineInfo", "__geoMeta": {
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
90,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 89,
"start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
66, 66,
90, 90,
0 0
], ]
"tag": { },
"end": 89, "from": [
"start": 83, 0.0,
"type": "TagDeclarator", 0.0
"value": "thing" ],
}, "tag": {
"type": "extrudePlane" "end": 89,
} "start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
}, },
"__meta": [ {
{ "__geoMeta": {
"id": "[uuid]",
"sourceRange": [ "sourceRange": [
83, 96,
89, 112,
0 0
] ]
}
]
},
"thing2": {
"type": "TagIdentifier",
"value": "thing2",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
118,
144,
0
]
},
"from": [
10.0,
10.0
],
"tag": {
"end": 143,
"start": 136,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
}, },
"surface": { "from": [
"faceId": "[uuid]", 0.0,
10.0
],
"tag": null,
"to": [
10.0,
10.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
118, 118,
144, 144,
0 0
], ]
"tag": { },
"end": 143, "from": [
"start": 136, 10.0,
"type": "TagDeclarator", 10.0
"value": "thing2" ],
}, "tag": {
"type": "extrudePlane" "end": 143,
} "start": 136,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
}, },
"__meta": [ {
{ "__geoMeta": {
"id": "[uuid]",
"sourceRange": [ "sourceRange": [
136, 150,
143, 158,
0 0
] ]
} },
] "from": [
10.0,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
35,
60,
0
]
}
},
"tags": {
"thing": {
"type": "TagIdentifier",
"value": "thing",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
90,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 89,
"start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
90,
0
],
"tag": {
"end": 89,
"start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
83,
89,
0
]
}
]
},
"thing2": {
"type": "TagIdentifier",
"value": "thing2",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
118,
144,
0
]
},
"from": [
10.0,
10.0
],
"tag": {
"end": 143,
"start": 136,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
118,
144,
0
],
"tag": {
"end": 143,
"start": 136,
"type": "TagDeclarator",
"value": "thing2"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
136,
143,
0
]
}
]
}
},
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
]
},
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"edgeCuts": [
{
"type": "fillet",
"id": "[uuid]",
"radius": 2.0,
"edgeId": "[uuid]",
"tag": null
},
{
"type": "fillet",
"id": "[uuid]",
"radius": 2.0,
"edgeId": "[uuid]",
"tag": null
} }
],
"units": {
"type": "Mm"
}, },
"__meta": [ "__meta": [
{ {
@ -356,35 +394,7 @@ snapshot_kind: text
] ]
} }
] ]
}, }
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"edgeCuts": [
{
"type": "fillet",
"id": "[uuid]",
"radius": 2.0,
"edgeId": "[uuid]",
"tag": null
},
{
"type": "fillet",
"id": "[uuid]",
"radius": 2.0,
"edgeId": "[uuid]",
"tag": null
}
],
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
]
}, },
"thing": { "thing": {
"type": "TagIdentifier", "type": "TagIdentifier",

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing basic_fillet_cube_next_adjacent.kcl description: Program memory after executing basic_fillet_cube_next_adjacent.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [
@ -29,90 +28,17 @@ snapshot_kind: text
}, },
"part001": { "part001": {
"type": "Solid", "type": "Solid",
"type": "Solid", "value": {
"id": "[uuid]", "type": "Solid",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
90,
0
],
"tag": {
"end": 89,
"start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
96,
121,
0
],
"tag": {
"end": 120,
"start": 113,
"type": "TagDeclarator",
"value": "thing1"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
127,
153,
0
],
"tag": {
"end": 152,
"start": 145,
"type": "TagDeclarator",
"value": "thing2"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
159,
176,
0
],
"tag": {
"end": 175,
"start": 168,
"type": "TagDeclarator",
"value": "thing3"
},
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]", "id": "[uuid]",
"paths": [ "value": [
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
66, 66,
90, 90,
0 0
]
},
"from": [
0.0,
0.0
], ],
"tag": { "tag": {
"end": 89, "end": 89,
@ -120,24 +46,15 @@ snapshot_kind: text
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing" "value": "thing"
}, },
"to": [ "type": "extrudePlane"
0.0,
10.0
],
"type": "ToPoint"
}, },
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
96, 96,
121, 121,
0 0
]
},
"from": [
0.0,
10.0
], ],
"tag": { "tag": {
"end": 120, "end": 120,
@ -145,24 +62,15 @@ snapshot_kind: text
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing1" "value": "thing1"
}, },
"to": [ "type": "extrudePlane"
10.0,
10.0
],
"type": "ToPoint"
}, },
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
127, 127,
153, 153,
0 0
]
},
"from": [
10.0,
10.0
], ],
"tag": { "tag": {
"end": 152, "end": 152,
@ -170,24 +78,15 @@ snapshot_kind: text
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing2" "value": "thing2"
}, },
"to": [ "type": "extrudePlane"
10.0,
0.0
],
"type": "ToPoint"
}, },
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
159, 159,
176, 176,
0 0
]
},
"from": [
10.0,
0.0
], ],
"tag": { "tag": {
"end": 175, "end": 175,
@ -195,295 +94,427 @@ snapshot_kind: text
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing3" "value": "thing3"
}, },
"to": [ "type": "extrudePlane"
0.0,
0.0
],
"type": "ToPoint"
} }
], ],
"on": { "sketch": {
"type": "plane", "type": "Sketch",
"id": "[uuid]", "id": "[uuid]",
"value": "XY", "paths": [
"origin": { {
"x": 0.0, "__geoMeta": {
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
35,
60,
0
]
}
},
"tags": {
"thing": {
"type": "TagIdentifier",
"value": "thing",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
90,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 89,
"start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
66, 66,
90, 90,
0 0
],
"tag": {
"end": 89,
"start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
83,
89,
0
] ]
}
]
},
"thing1": {
"type": "TagIdentifier",
"value": "thing1",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
96,
121,
0
]
},
"from": [
0.0,
10.0
],
"tag": {
"end": 120,
"start": 113,
"type": "TagDeclarator",
"value": "thing1"
},
"to": [
10.0,
10.0
],
"type": "ToPoint"
}, },
"surface": { "from": [
"faceId": "[uuid]", 0.0,
0.0
],
"tag": {
"end": 89,
"start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
96, 96,
121, 121,
0 0
],
"tag": {
"end": 120,
"start": 113,
"type": "TagDeclarator",
"value": "thing1"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
113,
120,
0
] ]
}
]
},
"thing2": {
"type": "TagIdentifier",
"value": "thing2",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
127,
153,
0
]
},
"from": [
10.0,
10.0
],
"tag": {
"end": 152,
"start": 145,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
}, },
"surface": { "from": [
"faceId": "[uuid]", 0.0,
10.0
],
"tag": {
"end": 120,
"start": 113,
"type": "TagDeclarator",
"value": "thing1"
},
"to": [
10.0,
10.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
127, 127,
153, 153,
0 0
],
"tag": {
"end": 152,
"start": 145,
"type": "TagDeclarator",
"value": "thing2"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
145,
152,
0
] ]
}
]
},
"thing3": {
"type": "TagIdentifier",
"value": "thing3",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
159,
176,
0
]
},
"from": [
10.0,
0.0
],
"tag": {
"end": 175,
"start": 168,
"type": "TagDeclarator",
"value": "thing3"
},
"to": [
0.0,
0.0
],
"type": "ToPoint"
}, },
"surface": { "from": [
"faceId": "[uuid]", 10.0,
10.0
],
"tag": {
"end": 152,
"start": 145,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
159, 159,
176, 176,
0 0
],
"tag": {
"end": 175,
"start": 168,
"type": "TagDeclarator",
"value": "thing3"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
168,
175,
0
] ]
} },
] "from": [
10.0,
0.0
],
"tag": {
"end": 175,
"start": 168,
"type": "TagDeclarator",
"value": "thing3"
},
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
35,
60,
0
]
}
},
"tags": {
"thing": {
"type": "TagIdentifier",
"value": "thing",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
90,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 89,
"start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
90,
0
],
"tag": {
"end": 89,
"start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
83,
89,
0
]
}
]
},
"thing1": {
"type": "TagIdentifier",
"value": "thing1",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
96,
121,
0
]
},
"from": [
0.0,
10.0
],
"tag": {
"end": 120,
"start": 113,
"type": "TagDeclarator",
"value": "thing1"
},
"to": [
10.0,
10.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
96,
121,
0
],
"tag": {
"end": 120,
"start": 113,
"type": "TagDeclarator",
"value": "thing1"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
113,
120,
0
]
}
]
},
"thing2": {
"type": "TagIdentifier",
"value": "thing2",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
127,
153,
0
]
},
"from": [
10.0,
10.0
],
"tag": {
"end": 152,
"start": 145,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
127,
153,
0
],
"tag": {
"end": 152,
"start": 145,
"type": "TagDeclarator",
"value": "thing2"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
145,
152,
0
]
}
]
},
"thing3": {
"type": "TagIdentifier",
"value": "thing3",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
159,
176,
0
]
},
"from": [
10.0,
0.0
],
"tag": {
"end": 175,
"start": 168,
"type": "TagDeclarator",
"value": "thing3"
},
"to": [
0.0,
0.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
159,
176,
0
],
"tag": {
"end": 175,
"start": 168,
"type": "TagDeclarator",
"value": "thing3"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
168,
175,
0
]
}
]
}
},
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
]
},
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"edgeCuts": [
{
"type": "fillet",
"id": "[uuid]",
"radius": 2.0,
"edgeId": "[uuid]",
"tag": null
} }
],
"units": {
"type": "Mm"
}, },
"__meta": [ "__meta": [
{ {
@ -494,28 +525,7 @@ snapshot_kind: text
] ]
} }
] ]
}, }
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"edgeCuts": [
{
"type": "fillet",
"id": "[uuid]",
"radius": 2.0,
"edgeId": "[uuid]",
"tag": null
}
],
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
]
}, },
"thing": { "thing": {
"type": "TagIdentifier", "type": "TagIdentifier",

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing basic_fillet_cube_previous_adjacent.kcl description: Program memory after executing basic_fillet_cube_previous_adjacent.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [
@ -29,90 +28,17 @@ snapshot_kind: text
}, },
"part001": { "part001": {
"type": "Solid", "type": "Solid",
"type": "Solid", "value": {
"id": "[uuid]", "type": "Solid",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
90,
0
],
"tag": {
"end": 89,
"start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
96,
121,
0
],
"tag": {
"end": 120,
"start": 113,
"type": "TagDeclarator",
"value": "thing1"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
127,
153,
0
],
"tag": {
"end": 152,
"start": 145,
"type": "TagDeclarator",
"value": "thing2"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
159,
176,
0
],
"tag": {
"end": 175,
"start": 168,
"type": "TagDeclarator",
"value": "thing3"
},
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]", "id": "[uuid]",
"paths": [ "value": [
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
66, 66,
90, 90,
0 0
]
},
"from": [
0.0,
0.0
], ],
"tag": { "tag": {
"end": 89, "end": 89,
@ -120,24 +46,15 @@ snapshot_kind: text
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing" "value": "thing"
}, },
"to": [ "type": "extrudePlane"
0.0,
10.0
],
"type": "ToPoint"
}, },
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
96, 96,
121, 121,
0 0
]
},
"from": [
0.0,
10.0
], ],
"tag": { "tag": {
"end": 120, "end": 120,
@ -145,24 +62,15 @@ snapshot_kind: text
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing1" "value": "thing1"
}, },
"to": [ "type": "extrudePlane"
10.0,
10.0
],
"type": "ToPoint"
}, },
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
127, 127,
153, 153,
0 0
]
},
"from": [
10.0,
10.0
], ],
"tag": { "tag": {
"end": 152, "end": 152,
@ -170,24 +78,15 @@ snapshot_kind: text
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing2" "value": "thing2"
}, },
"to": [ "type": "extrudePlane"
10.0,
0.0
],
"type": "ToPoint"
}, },
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
159, 159,
176, 176,
0 0
]
},
"from": [
10.0,
0.0
], ],
"tag": { "tag": {
"end": 175, "end": 175,
@ -195,295 +94,427 @@ snapshot_kind: text
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing3" "value": "thing3"
}, },
"to": [ "type": "extrudePlane"
0.0,
0.0
],
"type": "ToPoint"
} }
], ],
"on": { "sketch": {
"type": "plane", "type": "Sketch",
"id": "[uuid]", "id": "[uuid]",
"value": "XY", "paths": [
"origin": { {
"x": 0.0, "__geoMeta": {
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
35,
60,
0
]
}
},
"tags": {
"thing": {
"type": "TagIdentifier",
"value": "thing",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
90,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 89,
"start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
66, 66,
90, 90,
0 0
],
"tag": {
"end": 89,
"start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
83,
89,
0
] ]
}
]
},
"thing1": {
"type": "TagIdentifier",
"value": "thing1",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
96,
121,
0
]
},
"from": [
0.0,
10.0
],
"tag": {
"end": 120,
"start": 113,
"type": "TagDeclarator",
"value": "thing1"
},
"to": [
10.0,
10.0
],
"type": "ToPoint"
}, },
"surface": { "from": [
"faceId": "[uuid]", 0.0,
0.0
],
"tag": {
"end": 89,
"start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
96, 96,
121, 121,
0 0
],
"tag": {
"end": 120,
"start": 113,
"type": "TagDeclarator",
"value": "thing1"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
113,
120,
0
] ]
}
]
},
"thing2": {
"type": "TagIdentifier",
"value": "thing2",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
127,
153,
0
]
},
"from": [
10.0,
10.0
],
"tag": {
"end": 152,
"start": 145,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
}, },
"surface": { "from": [
"faceId": "[uuid]", 0.0,
10.0
],
"tag": {
"end": 120,
"start": 113,
"type": "TagDeclarator",
"value": "thing1"
},
"to": [
10.0,
10.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
127, 127,
153, 153,
0 0
],
"tag": {
"end": 152,
"start": 145,
"type": "TagDeclarator",
"value": "thing2"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
145,
152,
0
] ]
}
]
},
"thing3": {
"type": "TagIdentifier",
"value": "thing3",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
159,
176,
0
]
},
"from": [
10.0,
0.0
],
"tag": {
"end": 175,
"start": 168,
"type": "TagDeclarator",
"value": "thing3"
},
"to": [
0.0,
0.0
],
"type": "ToPoint"
}, },
"surface": { "from": [
"faceId": "[uuid]", 10.0,
10.0
],
"tag": {
"end": 152,
"start": 145,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
159, 159,
176, 176,
0 0
],
"tag": {
"end": 175,
"start": 168,
"type": "TagDeclarator",
"value": "thing3"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
168,
175,
0
] ]
} },
] "from": [
10.0,
0.0
],
"tag": {
"end": 175,
"start": 168,
"type": "TagDeclarator",
"value": "thing3"
},
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
35,
60,
0
]
}
},
"tags": {
"thing": {
"type": "TagIdentifier",
"value": "thing",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
90,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 89,
"start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
90,
0
],
"tag": {
"end": 89,
"start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
83,
89,
0
]
}
]
},
"thing1": {
"type": "TagIdentifier",
"value": "thing1",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
96,
121,
0
]
},
"from": [
0.0,
10.0
],
"tag": {
"end": 120,
"start": 113,
"type": "TagDeclarator",
"value": "thing1"
},
"to": [
10.0,
10.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
96,
121,
0
],
"tag": {
"end": 120,
"start": 113,
"type": "TagDeclarator",
"value": "thing1"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
113,
120,
0
]
}
]
},
"thing2": {
"type": "TagIdentifier",
"value": "thing2",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
127,
153,
0
]
},
"from": [
10.0,
10.0
],
"tag": {
"end": 152,
"start": 145,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
127,
153,
0
],
"tag": {
"end": 152,
"start": 145,
"type": "TagDeclarator",
"value": "thing2"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
145,
152,
0
]
}
]
},
"thing3": {
"type": "TagIdentifier",
"value": "thing3",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
159,
176,
0
]
},
"from": [
10.0,
0.0
],
"tag": {
"end": 175,
"start": 168,
"type": "TagDeclarator",
"value": "thing3"
},
"to": [
0.0,
0.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
159,
176,
0
],
"tag": {
"end": 175,
"start": 168,
"type": "TagDeclarator",
"value": "thing3"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
168,
175,
0
]
}
]
}
},
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
]
},
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"edgeCuts": [
{
"type": "fillet",
"id": "[uuid]",
"radius": 2.0,
"edgeId": "[uuid]",
"tag": null
} }
],
"units": {
"type": "Mm"
}, },
"__meta": [ "__meta": [
{ {
@ -494,28 +525,7 @@ snapshot_kind: text
] ]
} }
] ]
}, }
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"edgeCuts": [
{
"type": "fillet",
"id": "[uuid]",
"radius": 2.0,
"edgeId": "[uuid]",
"tag": null
}
],
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
]
}, },
"thing": { "thing": {
"type": "TagIdentifier", "type": "TagIdentifier",

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing basic_fillet_cube_start.kcl description: Program memory after executing basic_fillet_cube_start.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [
@ -29,80 +28,17 @@ snapshot_kind: text
}, },
"part001": { "part001": {
"type": "Solid", "type": "Solid",
"type": "Solid", "value": {
"id": "[uuid]", "type": "Solid",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
90,
0
],
"tag": {
"end": 89,
"start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
96,
112,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
118,
144,
0
],
"tag": {
"end": 143,
"start": 136,
"type": "TagDeclarator",
"value": "thing2"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
150,
158,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]", "id": "[uuid]",
"paths": [ "value": [
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
66, 66,
90, 90,
0 0
]
},
"from": [
0.0,
0.0
], ],
"tag": { "tag": {
"end": 89, "end": 89,
@ -110,44 +46,26 @@ snapshot_kind: text
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing" "value": "thing"
}, },
"to": [ "type": "extrudePlane"
0.0,
10.0
],
"type": "ToPoint"
}, },
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
96, 96,
112, 112,
0 0
]
},
"from": [
0.0,
10.0
], ],
"tag": null, "tag": null,
"to": [ "type": "extrudePlane"
10.0,
10.0
],
"type": "ToPoint"
}, },
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
118, 118,
144, 144,
0 0
]
},
"from": [
10.0,
10.0
], ],
"tag": { "tag": {
"end": 143, "end": 143,
@ -155,197 +73,317 @@ snapshot_kind: text
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "thing2" "value": "thing2"
}, },
"to": [ "type": "extrudePlane"
10.0,
0.0
],
"type": "ToPoint"
}, },
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
150,
158,
0
]
},
"from": [
10.0,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
35, 150,
60, 158,
0 0
] ],
"tag": null,
"type": "extrudePlane"
} }
}, ],
"tags": { "sketch": {
"thing": { "type": "Sketch",
"type": "TagIdentifier", "id": "[uuid]",
"value": "thing", "paths": [
"info": { {
"type": "TagEngineInfo", "__geoMeta": {
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
90,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 89,
"start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
66, 66,
90, 90,
0 0
], ]
"tag": { },
"end": 89, "from": [
"start": 83, 0.0,
"type": "TagDeclarator", 0.0
"value": "thing" ],
}, "tag": {
"type": "extrudePlane" "end": 89,
} "start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
}, },
"__meta": [ {
{ "__geoMeta": {
"id": "[uuid]",
"sourceRange": [ "sourceRange": [
83, 96,
89, 112,
0 0
] ]
}
]
},
"thing2": {
"type": "TagIdentifier",
"value": "thing2",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
118,
144,
0
]
},
"from": [
10.0,
10.0
],
"tag": {
"end": 143,
"start": 136,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
}, },
"surface": { "from": [
"faceId": "[uuid]", 0.0,
10.0
],
"tag": null,
"to": [
10.0,
10.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
118, 118,
144, 144,
0 0
], ]
"tag": { },
"end": 143, "from": [
"start": 136, 10.0,
"type": "TagDeclarator", 10.0
"value": "thing2" ],
}, "tag": {
"type": "extrudePlane" "end": 143,
} "start": 136,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
}, },
"__meta": [ {
{ "__geoMeta": {
"id": "[uuid]",
"sourceRange": [ "sourceRange": [
136, 150,
143, 158,
0 0
] ]
} },
] "from": [
10.0,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
35,
60,
0
]
}
},
"tags": {
"thing": {
"type": "TagIdentifier",
"value": "thing",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
90,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 89,
"start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
90,
0
],
"tag": {
"end": 89,
"start": 83,
"type": "TagDeclarator",
"value": "thing"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
83,
89,
0
]
}
]
},
"thing2": {
"type": "TagIdentifier",
"value": "thing2",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
118,
144,
0
]
},
"from": [
10.0,
10.0
],
"tag": {
"end": 143,
"start": 136,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
118,
144,
0
],
"tag": {
"end": 143,
"start": 136,
"type": "TagDeclarator",
"value": "thing2"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
136,
143,
0
]
}
]
}
},
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
]
},
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"edgeCuts": [
{
"type": "fillet",
"id": "[uuid]",
"radius": 2.0,
"edgeId": "[uuid]",
"tag": null
},
{
"type": "fillet",
"id": "[uuid]",
"radius": 2.0,
"edgeId": "[uuid]",
"tag": null
} }
],
"units": {
"type": "Mm"
}, },
"__meta": [ "__meta": [
{ {
@ -356,35 +394,7 @@ snapshot_kind: text
] ]
} }
] ]
}, }
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"edgeCuts": [
{
"type": "fillet",
"id": "[uuid]",
"radius": 2.0,
"edgeId": "[uuid]",
"tag": null
},
{
"type": "fillet",
"id": "[uuid]",
"radius": 2.0,
"edgeId": "[uuid]",
"tag": null
}
],
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
]
}, },
"thing": { "thing": {
"type": "TagIdentifier", "type": "TagIdentifier",

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing big_number_angle_to_match_length_x.kcl description: Program memory after executing big_number_angle_to_match_length_x.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [
@ -29,64 +28,17 @@ snapshot_kind: text
}, },
"part001": { "part001": {
"type": "Solid", "type": "Solid",
"type": "Solid", "value": {
"id": "[uuid]", "type": "Solid",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
92,
0
],
"tag": {
"end": 91,
"start": 85,
"type": "TagDeclarator",
"value": "seg01"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
98,
154,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
160,
168,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]", "id": "[uuid]",
"paths": [ "value": [
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
66, 66,
92, 92,
0 0
]
},
"from": [
0.0,
0.0
], ],
"tag": { "tag": {
"end": 91, "end": 91,
@ -94,158 +46,228 @@ snapshot_kind: text
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "seg01" "value": "seg01"
}, },
"to": [ "type": "extrudePlane"
1.0,
3.82
],
"type": "ToPoint"
}, },
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
98,
154,
0
]
},
"from": [
1.0,
3.82
],
"tag": null,
"to": [
3.0,
0.4152
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
160,
168,
0
]
},
"from": [
3.0,
0.4152
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
35, 98,
60, 154,
0 0
] ],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
160,
168,
0
],
"tag": null,
"type": "extrudePlane"
} }
}, ],
"tags": { "sketch": {
"seg01": { "type": "Sketch",
"type": "TagIdentifier", "id": "[uuid]",
"value": "seg01", "paths": [
"info": { {
"type": "TagEngineInfo", "__geoMeta": {
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
92,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 91,
"start": 85,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
1.0,
3.82
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
66, 66,
92, 92,
0 0
], ]
"tag": { },
"end": 91, "from": [
"start": 85, 0.0,
"type": "TagDeclarator", 0.0
"value": "seg01" ],
}, "tag": {
"type": "extrudePlane" "end": 91,
} "start": 85,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
1.0,
3.82
],
"type": "ToPoint"
}, },
"__meta": [ {
{ "__geoMeta": {
"id": "[uuid]",
"sourceRange": [ "sourceRange": [
85, 98,
91, 154,
0 0
] ]
} },
] "from": [
} 1.0,
3.82
],
"tag": null,
"to": [
3.0,
0.4152
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
160,
168,
0
]
},
"from": [
3.0,
0.4152
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
35,
60,
0
]
}
},
"tags": {
"seg01": {
"type": "TagIdentifier",
"value": "seg01",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
92,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 91,
"start": 85,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
1.0,
3.82
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
92,
0
],
"tag": {
"end": 91,
"start": 85,
"type": "TagDeclarator",
"value": "seg01"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
85,
91,
0
]
}
]
}
},
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
]
},
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
}, },
"__meta": [ "__meta": [
{ {
@ -256,19 +278,7 @@ snapshot_kind: text
] ]
} }
] ]
}, }
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
]
}, },
"seg01": { "seg01": {
"type": "TagIdentifier", "type": "TagIdentifier",

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing big_number_angle_to_match_length_y.kcl description: Program memory after executing big_number_angle_to_match_length_y.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [
@ -29,64 +28,17 @@ snapshot_kind: text
}, },
"part001": { "part001": {
"type": "Solid", "type": "Solid",
"type": "Solid", "value": {
"id": "[uuid]", "type": "Solid",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
92,
0
],
"tag": {
"end": 91,
"start": 85,
"type": "TagDeclarator",
"value": "seg01"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
98,
154,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
160,
168,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]", "id": "[uuid]",
"paths": [ "value": [
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
66, 66,
92, 92,
0 0
]
},
"from": [
0.0,
0.0
], ],
"tag": { "tag": {
"end": 91, "end": 91,
@ -94,158 +46,228 @@ snapshot_kind: text
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "seg01" "value": "seg01"
}, },
"to": [ "type": "extrudePlane"
1.0,
3.82
],
"type": "ToPoint"
}, },
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
98,
154,
0
]
},
"from": [
1.0,
3.82
],
"tag": null,
"to": [
3.0,
3.3954
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
160,
168,
0
]
},
"from": [
3.0,
3.3954
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
35, 98,
60, 154,
0 0
] ],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
160,
168,
0
],
"tag": null,
"type": "extrudePlane"
} }
}, ],
"tags": { "sketch": {
"seg01": { "type": "Sketch",
"type": "TagIdentifier", "id": "[uuid]",
"value": "seg01", "paths": [
"info": { {
"type": "TagEngineInfo", "__geoMeta": {
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
92,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 91,
"start": 85,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
1.0,
3.82
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
66, 66,
92, 92,
0 0
], ]
"tag": { },
"end": 91, "from": [
"start": 85, 0.0,
"type": "TagDeclarator", 0.0
"value": "seg01" ],
}, "tag": {
"type": "extrudePlane" "end": 91,
} "start": 85,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
1.0,
3.82
],
"type": "ToPoint"
}, },
"__meta": [ {
{ "__geoMeta": {
"id": "[uuid]",
"sourceRange": [ "sourceRange": [
85, 98,
91, 154,
0 0
] ]
} },
] "from": [
} 1.0,
3.82
],
"tag": null,
"to": [
3.0,
3.3954
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
160,
168,
0
]
},
"from": [
3.0,
3.3954
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
35,
60,
0
]
}
},
"tags": {
"seg01": {
"type": "TagIdentifier",
"value": "seg01",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
92,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 91,
"start": 85,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
1.0,
3.82
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
92,
0
],
"tag": {
"end": 91,
"start": 85,
"type": "TagDeclarator",
"value": "seg01"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
85,
91,
0
]
}
]
}
},
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
]
},
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
}, },
"__meta": [ "__meta": [
{ {
@ -256,19 +278,7 @@ snapshot_kind: text
] ]
} }
] ]
}, }
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
]
}, },
"seg01": { "seg01": {
"type": "TagIdentifier", "type": "TagIdentifier",

View File

@ -1,8 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
assertion_line: 99
description: Program memory after executing circle_three_point.kcl description: Program memory after executing circle_three_point.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [
@ -30,26 +28,92 @@ snapshot_kind: text
}, },
"example": { "example": {
"type": "Solid", "type": "Solid",
"type": "Solid", "value": {
"id": "[uuid]", "type": "Solid",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
37,
98,
0
],
"tag": null,
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]", "id": "[uuid]",
"paths": [ "value": [
{ {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
37,
98,
0
],
"tag": null,
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
37,
98,
0
]
},
"ccw": true,
"center": [
24.749999999999996,
19.749999999999996
],
"from": [
30.0059,
19.75
],
"radius": 5.255949010407163,
"tag": null,
"to": [
30.0059,
19.75
],
"type": "Circle"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
30.00594901040716,
19.749999999999996
],
"to": [
30.00594901040716,
19.749999999999996
],
"tag": null,
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
@ -57,69 +121,26 @@ snapshot_kind: text
98, 98,
0 0
] ]
}, }
"ccw": true,
"center": [
24.749999999999996,
19.749999999999996
],
"from": [
30.0059,
19.75
],
"radius": 5.255949010407163,
"tag": null,
"to": [
30.0059,
19.75
],
"type": "Circle"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
}, },
"xAxis": { "units": {
"x": 1.0, "type": "Mm"
"y": 0.0,
"z": 0.0
}, },
"yAxis": { "__meta": [
"x": 0.0, {
"y": 1.0, "sourceRange": [
"z": 0.0 37,
}, 98,
"zAxis": { 0
"x": 0.0, ]
"y": 0.0, }
"z": 1.0 ]
},
"__meta": []
}, },
"start": { "height": 10.0,
"from": [ "startCapId": "[uuid]",
30.00594901040716, "endCapId": "[uuid]",
19.749999999999996 "units": {
], "type": "Mm"
"to": [
30.00594901040716,
19.749999999999996
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
37,
98,
0
]
}
}, },
"__meta": [ "__meta": [
{ {
@ -130,19 +151,7 @@ snapshot_kind: text
] ]
} }
] ]
}, }
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"__meta": [
{
"sourceRange": [
37,
98,
0
]
}
]
}, },
"sketch001": { "sketch001": {
"type": "Sketch", "type": "Sketch",
@ -201,6 +210,9 @@ snapshot_kind: text
"y": 0.0, "y": 0.0,
"z": 1.0 "z": 1.0
}, },
"units": {
"type": "Mm"
},
"__meta": [] "__meta": []
}, },
"start": { "start": {
@ -222,6 +234,9 @@ snapshot_kind: text
] ]
} }
}, },
"units": {
"type": "Mm"
},
"__meta": [ "__meta": [
{ {
"sourceRange": [ "sourceRange": [

View File

@ -736,203 +736,226 @@ description: Program memory after executing cube.kcl
}, },
"myCube": { "myCube": {
"type": "Solid", "type": "Solid",
"type": "Solid", "value": {
"id": "[uuid]", "type": "Solid",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
202,
215,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
223,
236,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
244,
257,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
265,
278,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]", "id": "[uuid]",
"paths": [ "value": [
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
202,
215,
0
]
},
"from": [
-20.0,
-20.0
],
"tag": null,
"to": [
-20.0,
20.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
223,
236,
0
]
},
"from": [
-20.0,
20.0
],
"tag": null,
"to": [
20.0,
20.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
244,
257,
0
]
},
"from": [
20.0,
20.0
],
"tag": null,
"to": [
20.0,
-20.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
265,
278,
0
]
},
"from": [
20.0,
-20.0
],
"tag": null,
"to": [
-20.0,
-20.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
286,
294,
0
]
},
"from": [
-20.0,
-20.0
],
"tag": null,
"to": [
-20.0,
-20.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"__meta": []
},
"start": {
"from": [
-20.0,
-20.0
],
"to": [
-20.0,
-20.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
177, 202,
194, 215,
0 0
] ],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
223,
236,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
244,
257,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
265,
278,
0
],
"tag": null,
"type": "extrudePlane"
} }
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
202,
215,
0
]
},
"from": [
-20.0,
-20.0
],
"tag": null,
"to": [
-20.0,
20.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
223,
236,
0
]
},
"from": [
-20.0,
20.0
],
"tag": null,
"to": [
20.0,
20.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
244,
257,
0
]
},
"from": [
20.0,
20.0
],
"tag": null,
"to": [
20.0,
-20.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
265,
278,
0
]
},
"from": [
20.0,
-20.0
],
"tag": null,
"to": [
-20.0,
-20.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
286,
294,
0
]
},
"from": [
-20.0,
-20.0
],
"tag": null,
"to": [
-20.0,
-20.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
-20.0,
-20.0
],
"to": [
-20.0,
-20.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
177,
194,
0
]
}
},
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
177,
194,
0
]
}
]
},
"height": 40.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
}, },
"__meta": [ "__meta": [
{ {
@ -943,19 +966,7 @@ description: Program memory after executing cube.kcl
] ]
} }
] ]
}, }
"height": 40.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"__meta": [
{
"sourceRange": [
177,
194,
0
]
}
]
} }
}, },
"parent": null "parent": null

File diff suppressed because it is too large Load Diff

View File

@ -429,183 +429,206 @@ description: Program memory after executing function_sketch.kcl
}, },
"fnBox": { "fnBox": {
"type": "Solid", "type": "Solid",
"type": "Solid", "value": {
"id": "[uuid]", "type": "Solid",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
88,
103,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
111,
126,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
134,
150,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
158,
166,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]", "id": "[uuid]",
"paths": [ "value": [
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
88,
103,
0
]
},
"from": [
0.0,
0.0
],
"tag": null,
"to": [
0.0,
6.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
111,
126,
0
]
},
"from": [
0.0,
6.0
],
"tag": null,
"to": [
10.0,
6.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
134,
150,
0
]
},
"from": [
10.0,
6.0
],
"tag": null,
"to": [
10.0,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
158,
166,
0
]
},
"from": [
10.0,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
55, 88,
80, 103,
0 0
] ],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
111,
126,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
134,
150,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
158,
166,
0
],
"tag": null,
"type": "extrudePlane"
} }
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
88,
103,
0
]
},
"from": [
0.0,
0.0
],
"tag": null,
"to": [
0.0,
6.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
111,
126,
0
]
},
"from": [
0.0,
6.0
],
"tag": null,
"to": [
10.0,
6.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
134,
150,
0
]
},
"from": [
10.0,
6.0
],
"tag": null,
"to": [
10.0,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
158,
166,
0
]
},
"from": [
10.0,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
55,
80,
0
]
}
},
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
55,
80,
0
]
}
]
},
"height": 3.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
}, },
"__meta": [ "__meta": [
{ {
@ -616,19 +639,7 @@ description: Program memory after executing function_sketch.kcl
] ]
} }
] ]
}, }
"height": 3.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"__meta": [
{
"sourceRange": [
55,
80,
0
]
}
]
} }
}, },
"parent": null "parent": null

View File

@ -415,183 +415,206 @@ description: Program memory after executing function_sketch_with_position.kcl
}, },
"thing": { "thing": {
"type": "Solid", "type": "Solid",
"type": "Solid", "value": {
"id": "[uuid]", "type": "Solid",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
86,
101,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
109,
124,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
132,
148,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
156,
164,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]", "id": "[uuid]",
"paths": [ "value": [
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
86,
101,
0
]
},
"from": [
0.0,
0.0
],
"tag": null,
"to": [
0.0,
6.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
109,
124,
0
]
},
"from": [
0.0,
6.0
],
"tag": null,
"to": [
10.0,
6.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
132,
148,
0
]
},
"from": [
10.0,
6.0
],
"tag": null,
"to": [
10.0,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
156,
164,
0
]
},
"from": [
10.0,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
58, 86,
78, 101,
0 0
] ],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
109,
124,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
132,
148,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
156,
164,
0
],
"tag": null,
"type": "extrudePlane"
} }
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
86,
101,
0
]
},
"from": [
0.0,
0.0
],
"tag": null,
"to": [
0.0,
6.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
109,
124,
0
]
},
"from": [
0.0,
6.0
],
"tag": null,
"to": [
10.0,
6.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
132,
148,
0
]
},
"from": [
10.0,
6.0
],
"tag": null,
"to": [
10.0,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
156,
164,
0
]
},
"from": [
10.0,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
58,
78,
0
]
}
},
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
58,
78,
0
]
}
]
},
"height": 3.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
}, },
"__meta": [ "__meta": [
{ {
@ -602,19 +625,7 @@ description: Program memory after executing function_sketch_with_position.kcl
] ]
} }
] ]
}, }
"height": 3.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"__meta": [
{
"sourceRange": [
58,
78,
0
]
}
]
} }
}, },
"parent": null "parent": null

View File

@ -1,8 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
assertion_line: 105
description: Program memory after executing helix_ccw.kcl description: Program memory after executing helix_ccw.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [
@ -30,26 +28,92 @@ snapshot_kind: text
}, },
"part001": { "part001": {
"type": "Solid", "type": "Solid",
"type": "Solid", "value": {
"id": "[uuid]", "type": "Solid",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
35,
78,
0
],
"tag": null,
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]", "id": "[uuid]",
"paths": [ "value": [
{ {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
35,
78,
0
],
"tag": null,
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
35,
78,
0
]
},
"ccw": true,
"center": [
5.0,
5.0
],
"from": [
15.0,
5.0
],
"radius": 10.0,
"tag": null,
"to": [
15.0,
5.0
],
"type": "Circle"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
15.0,
5.0
],
"to": [
15.0,
5.0
],
"tag": null,
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
@ -57,69 +121,26 @@ snapshot_kind: text
78, 78,
0 0
] ]
}, }
"ccw": true,
"center": [
5.0,
5.0
],
"from": [
15.0,
5.0
],
"radius": 10.0,
"tag": null,
"to": [
15.0,
5.0
],
"type": "Circle"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
}, },
"xAxis": { "units": {
"x": 1.0, "type": "Mm"
"y": 0.0,
"z": 0.0
}, },
"yAxis": { "__meta": [
"x": 0.0, {
"y": 1.0, "sourceRange": [
"z": 0.0 35,
}, 78,
"zAxis": { 0
"x": 0.0, ]
"y": 0.0, }
"z": 1.0 ]
},
"__meta": []
}, },
"start": { "height": 10.0,
"from": [ "startCapId": "[uuid]",
15.0, "endCapId": "[uuid]",
5.0 "units": {
], "type": "Mm"
"to": [
15.0,
5.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
35,
78,
0
]
}
}, },
"__meta": [ "__meta": [
{ {
@ -130,19 +151,7 @@ snapshot_kind: text
] ]
} }
] ]
}, }
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"__meta": [
{
"sourceRange": [
35,
78,
0
]
}
]
} }
}, },
"parent": null "parent": null

File diff suppressed because it is too large Load Diff

View File

@ -28,26 +28,92 @@ description: Program memory after executing import_whole.kcl
}, },
"bar": { "bar": {
"type": "Solid", "type": "Solid",
"type": "Solid", "value": {
"id": "[uuid]", "type": "Solid",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
25,
68,
1
],
"tag": null,
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]", "id": "[uuid]",
"paths": [ "value": [
{ {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
25,
68,
1
],
"tag": null,
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
25,
68,
1
]
},
"ccw": true,
"center": [
5.0,
5.0
],
"from": [
15.0,
5.0
],
"radius": 10.0,
"tag": null,
"to": [
15.0,
5.0
],
"type": "Circle"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
15.0,
5.0
],
"to": [
15.0,
5.0
],
"tag": null,
"__geoMeta": { "__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
@ -55,69 +121,26 @@ description: Program memory after executing import_whole.kcl
68, 68,
1 1
] ]
}, }
"ccw": true,
"center": [
5.0,
5.0
],
"from": [
15.0,
5.0
],
"radius": 10.0,
"tag": null,
"to": [
15.0,
5.0
],
"type": "Circle"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
}, },
"xAxis": { "units": {
"x": 1.0, "type": "Mm"
"y": 0.0,
"z": 0.0
}, },
"yAxis": { "__meta": [
"x": 0.0, {
"y": 1.0, "sourceRange": [
"z": 0.0 25,
}, 68,
"zAxis": { 1
"x": 0.0, ]
"y": 0.0, }
"z": 1.0 ]
},
"__meta": []
}, },
"start": { "height": 10.0,
"from": [ "startCapId": "[uuid]",
15.0, "endCapId": "[uuid]",
5.0 "units": {
], "type": "Mm"
"to": [
15.0,
5.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
25,
68,
1
]
}
}, },
"__meta": [ "__meta": [
{ {
@ -128,19 +151,7 @@ description: Program memory after executing import_whole.kcl
] ]
} }
] ]
}, }
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"__meta": [
{
"sourceRange": [
25,
68,
1
]
}
]
}, },
"foo": { "foo": {
"type": "Module", "type": "Module",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing neg_xz_plane.kcl description: Program memory after executing neg_xz_plane.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [
@ -29,152 +28,175 @@ snapshot_kind: text
}, },
"part001": { "part001": {
"type": "Solid", "type": "Solid",
"type": "Solid", "value": {
"id": "[uuid]", "type": "Solid",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
67,
88,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
94,
113,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
119,
127,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]", "id": "[uuid]",
"paths": [ "value": [
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
67,
88,
0
]
},
"from": [
0.0,
0.0
],
"tag": null,
"to": [
100.0,
100.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
94,
113,
0
]
},
"from": [
100.0,
100.0
],
"tag": null,
"to": [
100.0,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
119,
127,
0
]
},
"from": [
100.0,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XZ",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": -1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"zAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
36, 67,
61, 88,
0 0
] ],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
94,
113,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
119,
127,
0
],
"tag": null,
"type": "extrudePlane"
} }
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
67,
88,
0
]
},
"from": [
0.0,
0.0
],
"tag": null,
"to": [
100.0,
100.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
94,
113,
0
]
},
"from": [
100.0,
100.0
],
"tag": null,
"to": [
100.0,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
119,
127,
0
]
},
"from": [
100.0,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XZ",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": -1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"zAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
36,
61,
0
]
}
},
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
36,
61,
0
]
}
]
},
"height": 12.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
}, },
"__meta": [ "__meta": [
{ {
@ -185,19 +207,7 @@ snapshot_kind: text
] ]
} }
] ]
}, }
"height": 12.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"__meta": [
{
"sourceRange": [
36,
61,
0
]
}
]
} }
}, },
"parent": null "parent": null

View File

@ -1,8 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
assertion_line: 92
description: Program memory after executing parametric.kcl description: Program memory after executing parametric.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [
@ -43,245 +41,268 @@ snapshot_kind: text
}, },
"bracket": { "bracket": {
"type": "Solid", "type": "Solid",
"type": "Solid", "value": {
"id": "[uuid]", "type": "Solid",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
284,
302,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
308,
326,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
332,
356,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
362,
393,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
399,
430,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
436,
444,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]", "id": "[uuid]",
"paths": [ "value": [
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
284,
302,
0
]
},
"from": [
0.0,
0.0
],
"tag": null,
"to": [
0.0,
5.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
308,
326,
0
]
},
"from": [
0.0,
5.0
],
"tag": null,
"to": [
8.0,
5.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
332,
356,
0
]
},
"from": [
8.0,
5.0
],
"tag": null,
"to": [
8.0,
4.8148
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
362,
393,
0
]
},
"from": [
8.0,
4.8148
],
"tag": null,
"to": [
0.1852,
4.8148
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
399,
430,
0
]
},
"from": [
0.1852,
4.8148
],
"tag": null,
"to": [
0.1852,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
436,
444,
0
]
},
"from": [
0.1852,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
253, 284,
278, 302,
0 0
] ],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
308,
326,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
332,
356,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
362,
393,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
399,
430,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
436,
444,
0
],
"tag": null,
"type": "extrudePlane"
} }
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
284,
302,
0
]
},
"from": [
0.0,
0.0
],
"tag": null,
"to": [
0.0,
5.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
308,
326,
0
]
},
"from": [
0.0,
5.0
],
"tag": null,
"to": [
8.0,
5.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
332,
356,
0
]
},
"from": [
8.0,
5.0
],
"tag": null,
"to": [
8.0,
4.8148
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
362,
393,
0
]
},
"from": [
8.0,
4.8148
],
"tag": null,
"to": [
0.1852,
4.8148
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
399,
430,
0
]
},
"from": [
0.1852,
4.8148
],
"tag": null,
"to": [
0.1852,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
436,
444,
0
]
},
"from": [
0.1852,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
253,
278,
0
]
}
},
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
253,
278,
0
]
}
]
},
"height": 9.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
}, },
"__meta": [ "__meta": [
{ {
@ -292,19 +313,7 @@ snapshot_kind: text
] ]
} }
] ]
}, }
"height": 9.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"__meta": [
{
"sourceRange": [
253,
278,
0
]
}
]
}, },
"distance": { "distance": {
"type": "Number", "type": "Number",

View File

@ -1,8 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
assertion_line: 92
description: Program memory after executing parametric_with_tan_arc.kcl description: Program memory after executing parametric_with_tan_arc.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [
@ -43,317 +41,340 @@ snapshot_kind: text
}, },
"bracket": { "bracket": {
"type": "Solid", "type": "Solid",
"type": "Solid", "value": {
"id": "[uuid]", "type": "Solid",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
266,
290,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
296,
347,
0
],
"tag": null,
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
353,
379,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
385,
409,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
415,
440,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
446,
529,
0
],
"tag": null,
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
535,
560,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
566,
574,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]", "id": "[uuid]",
"paths": [ "value": [
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
266,
290,
0
]
},
"from": [
0.0,
0.0
],
"tag": null,
"to": [
0.0,
8.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
296,
347,
0
]
},
"ccw": true,
"center": [
-0.7236272269866327,
8.0
],
"from": [
0.0,
8.0
],
"tag": null,
"to": [
-0.7236,
8.7236
],
"type": "TangentialArc"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
353,
379,
0
]
},
"from": [
-0.7236,
8.7236
],
"tag": null,
"to": [
-9.7236,
8.7236
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
385,
409,
0
]
},
"from": [
-9.7236,
8.7236
],
"tag": null,
"to": [
-9.7236,
8.3618
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
415,
440,
0
]
},
"from": [
-9.7236,
8.3618
],
"tag": null,
"to": [
-0.7236,
8.3618
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
446,
529,
0
]
},
"ccw": false,
"center": [
-0.7236272269866326,
8.0
],
"from": [
-0.7236,
8.3618
],
"tag": null,
"to": [
-0.3618,
8.0
],
"type": "TangentialArc"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
535,
560,
0
]
},
"from": [
-0.3618,
8.0
],
"tag": null,
"to": [
-0.3618,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
566,
574,
0
]
},
"from": [
-0.3618,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
239, 266,
260, 290,
0 0
] ],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
296,
347,
0
],
"tag": null,
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
353,
379,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
385,
409,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
415,
440,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
446,
529,
0
],
"tag": null,
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
535,
560,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
566,
574,
0
],
"tag": null,
"type": "extrudePlane"
} }
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
266,
290,
0
]
},
"from": [
0.0,
0.0
],
"tag": null,
"to": [
0.0,
8.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
296,
347,
0
]
},
"ccw": true,
"center": [
-0.7236272269866327,
8.0
],
"from": [
0.0,
8.0
],
"tag": null,
"to": [
-0.7236,
8.7236
],
"type": "TangentialArc"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
353,
379,
0
]
},
"from": [
-0.7236,
8.7236
],
"tag": null,
"to": [
-9.7236,
8.7236
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
385,
409,
0
]
},
"from": [
-9.7236,
8.7236
],
"tag": null,
"to": [
-9.7236,
8.3618
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
415,
440,
0
]
},
"from": [
-9.7236,
8.3618
],
"tag": null,
"to": [
-0.7236,
8.3618
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
446,
529,
0
]
},
"ccw": false,
"center": [
-0.7236272269866326,
8.0
],
"from": [
-0.7236,
8.3618
],
"tag": null,
"to": [
-0.3618,
8.0
],
"type": "TangentialArc"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
535,
560,
0
]
},
"from": [
-0.3618,
8.0
],
"tag": null,
"to": [
-0.3618,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
566,
574,
0
]
},
"from": [
-0.3618,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
239,
260,
0
]
}
},
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
239,
260,
0
]
}
]
},
"height": 11.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
}, },
"__meta": [ "__meta": [
{ {
@ -364,19 +385,7 @@ snapshot_kind: text
] ]
} }
] ]
}, }
"height": 11.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"__meta": [
{
"sourceRange": [
239,
260,
0
]
}
]
}, },
"distance": { "distance": {
"type": "Number", "type": "Number",

View File

@ -1540,203 +1540,226 @@ description: Program memory after executing pipe_as_arg.kcl
}, },
"myCube": { "myCube": {
"type": "Solid", "type": "Solid",
"type": "Solid", "value": {
"id": "[uuid]", "type": "Solid",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
202,
215,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
223,
236,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
244,
257,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
265,
278,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]", "id": "[uuid]",
"paths": [ "value": [
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
202,
215,
0
]
},
"from": [
-200.0,
-200.0
],
"tag": null,
"to": [
-200.0,
200.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
223,
236,
0
]
},
"from": [
-200.0,
200.0
],
"tag": null,
"to": [
200.0,
200.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
244,
257,
0
]
},
"from": [
200.0,
200.0
],
"tag": null,
"to": [
200.0,
-200.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
265,
278,
0
]
},
"from": [
200.0,
-200.0
],
"tag": null,
"to": [
-200.0,
-200.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
286,
294,
0
]
},
"from": [
-200.0,
-200.0
],
"tag": null,
"to": [
-200.0,
-200.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"__meta": []
},
"start": {
"from": [
-200.0,
-200.0
],
"to": [
-200.0,
-200.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
177, 202,
194, 215,
0 0
] ],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
223,
236,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
244,
257,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
265,
278,
0
],
"tag": null,
"type": "extrudePlane"
} }
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
202,
215,
0
]
},
"from": [
-200.0,
-200.0
],
"tag": null,
"to": [
-200.0,
200.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
223,
236,
0
]
},
"from": [
-200.0,
200.0
],
"tag": null,
"to": [
200.0,
200.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
244,
257,
0
]
},
"from": [
200.0,
200.0
],
"tag": null,
"to": [
200.0,
-200.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
265,
278,
0
]
},
"from": [
200.0,
-200.0
],
"tag": null,
"to": [
-200.0,
-200.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
286,
294,
0
]
},
"from": [
-200.0,
-200.0
],
"tag": null,
"to": [
-200.0,
-200.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
-200.0,
-200.0
],
"to": [
-200.0,
-200.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
177,
194,
0
]
}
},
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
177,
194,
0
]
}
]
},
"height": 400.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
}, },
"__meta": [ "__meta": [
{ {
@ -1747,19 +1770,7 @@ description: Program memory after executing pipe_as_arg.kcl
] ]
} }
] ]
}, }
"height": 400.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"__meta": [
{
"sourceRange": [
177,
194,
0
]
}
]
}, },
"width": { "width": {
"type": "Function", "type": "Function",

File diff suppressed because it is too large Load Diff

View File

@ -137,183 +137,206 @@ description: Program memory after executing riddle_small.kcl
}, },
"r": { "r": {
"type": "Solid", "type": "Solid",
"type": "Solid", "value": {
"id": "[uuid]", "type": "Solid",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
199,
214,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
220,
236,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
242,
258,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
264,
272,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]", "id": "[uuid]",
"paths": [ "value": [
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
199,
214,
0
]
},
"from": [
-26.0,
34.0
],
"tag": null,
"to": [
-25.0,
34.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
220,
236,
0
]
},
"from": [
-25.0,
34.0
],
"tag": null,
"to": [
-25.0,
33.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
242,
258,
0
]
},
"from": [
-25.0,
33.0
],
"tag": null,
"to": [
-26.0,
33.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
264,
272,
0
]
},
"from": [
-26.0,
33.0
],
"tag": null,
"to": [
-26.0,
34.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XZ",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0
},
"__meta": []
},
"start": {
"from": [
-26.0,
34.0
],
"to": [
-26.0,
34.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
166, 199,
193, 214,
0 0
] ],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
220,
236,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
242,
258,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
264,
272,
0
],
"tag": null,
"type": "extrudePlane"
} }
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
199,
214,
0
]
},
"from": [
-26.0,
34.0
],
"tag": null,
"to": [
-25.0,
34.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
220,
236,
0
]
},
"from": [
-25.0,
34.0
],
"tag": null,
"to": [
-25.0,
33.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
242,
258,
0
]
},
"from": [
-25.0,
33.0
],
"tag": null,
"to": [
-26.0,
33.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
264,
272,
0
]
},
"from": [
-26.0,
33.0
],
"tag": null,
"to": [
-26.0,
34.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XZ",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
-26.0,
34.0
],
"to": [
-26.0,
34.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
166,
193,
0
]
}
},
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
166,
193,
0
]
}
]
},
"height": 1.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
}, },
"__meta": [ "__meta": [
{ {
@ -324,19 +347,7 @@ description: Program memory after executing riddle_small.kcl
] ]
} }
] ]
}, }
"height": 1.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"__meta": [
{
"sourceRange": [
166,
193,
0
]
}
]
}, },
"t": { "t": {
"type": "Function", "type": "Function",

View File

@ -1129,6 +1129,9 @@ description: Program memory after executing sketch_in_object.kcl
"y": 0.0, "y": 0.0,
"z": 1.0 "z": 1.0
}, },
"units": {
"type": "Mm"
},
"__meta": [] "__meta": []
}, },
"start": { "start": {
@ -1150,6 +1153,9 @@ description: Program memory after executing sketch_in_object.kcl
] ]
} }
}, },
"units": {
"type": "Mm"
},
"__meta": [ "__meta": [
{ {
"sourceRange": [ "sourceRange": [
@ -1278,6 +1284,9 @@ description: Program memory after executing sketch_in_object.kcl
"y": 0.0, "y": 0.0,
"z": 1.0 "z": 1.0
}, },
"units": {
"type": "Mm"
},
"__meta": [] "__meta": []
}, },
"start": { "start": {
@ -1299,6 +1308,9 @@ description: Program memory after executing sketch_in_object.kcl
] ]
} }
}, },
"units": {
"type": "Mm"
},
"__meta": [ "__meta": [
{ {
"sourceRange": [ "sourceRange": [

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
assertion_line: 105
description: Program memory after executing tangential_arc.kcl description: Program memory after executing tangential_arc.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [
@ -30,157 +28,180 @@ snapshot_kind: text
}, },
"boxSketch": { "boxSketch": {
"type": "Solid", "type": "Solid",
"type": "Solid", "value": {
"id": "[uuid]", "type": "Solid",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
39,
55,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
61,
106,
0
],
"tag": null,
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
112,
129,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]", "id": "[uuid]",
"paths": [ "value": [
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
39,
55,
0
]
},
"from": [
0.0,
0.0
],
"tag": null,
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
61,
106,
0
]
},
"ccw": true,
"center": [
-5.0,
10.0
],
"from": [
0.0,
10.0
],
"tag": null,
"to": [
-5.0,
15.0
],
"type": "TangentialArc"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
112,
129,
0
]
},
"from": [
-5.0,
15.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
12, 39,
33, 55,
0 0
] ],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
61,
106,
0
],
"tag": null,
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
112,
129,
0
],
"tag": null,
"type": "extrudePlane"
} }
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
39,
55,
0
]
},
"from": [
0.0,
0.0
],
"tag": null,
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
61,
106,
0
]
},
"ccw": true,
"center": [
-5.0,
10.0
],
"from": [
0.0,
10.0
],
"tag": null,
"to": [
-5.0,
15.0
],
"type": "TangentialArc"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
112,
129,
0
]
},
"from": [
-5.0,
15.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
12,
33,
0
]
}
},
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
12,
33,
0
]
}
]
},
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
}, },
"__meta": [ "__meta": [
{ {
@ -191,19 +212,7 @@ snapshot_kind: text
] ]
} }
] ]
}, }
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"__meta": [
{
"sourceRange": [
12,
33,
0
]
}
]
} }
}, },
"parent": null "parent": null

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing xz_plane.kcl description: Program memory after executing xz_plane.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [
@ -29,152 +28,175 @@ snapshot_kind: text
}, },
"part001": { "part001": {
"type": "Solid", "type": "Solid",
"type": "Solid", "value": {
"id": "[uuid]", "type": "Solid",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
87,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
93,
112,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
118,
126,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]", "id": "[uuid]",
"paths": [ "value": [
{ {
"__geoMeta": { "faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
87,
0
]
},
"from": [
0.0,
0.0
],
"tag": null,
"to": [
100.0,
100.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
93,
112,
0
]
},
"from": [
100.0,
100.0
],
"tag": null,
"to": [
100.0,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
118,
126,
0
]
},
"from": [
100.0,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XZ",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [ "sourceRange": [
35, 66,
60, 87,
0 0
] ],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
93,
112,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
118,
126,
0
],
"tag": null,
"type": "extrudePlane"
} }
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
87,
0
]
},
"from": [
0.0,
0.0
],
"tag": null,
"to": [
100.0,
100.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
93,
112,
0
]
},
"from": [
100.0,
100.0
],
"tag": null,
"to": [
100.0,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
118,
126,
0
]
},
"from": [
100.0,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"value": "XZ",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
35,
60,
0
]
}
},
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
]
},
"height": 12.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
}, },
"__meta": [ "__meta": [
{ {
@ -185,19 +207,7 @@ snapshot_kind: text
] ]
} }
] ]
}, }
"height": 12.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
]
} }
}, },
"parent": null "parent": null