Compare commits

...

8 Commits

Author SHA1 Message Date
03e4f457d4 Cut release v0.22.4 (#2748) 2024-06-21 22:55:34 -07:00
226ed37c5f fix sketch on face (#2745)
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-06-21 21:49:12 -07:00
0f3f923019 Fix sharing a sketch surface between profiles (#2744)
* udpates

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

* dont call until startprofileAt

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

* add a comment

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

* bump version

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

* updates

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

* cleanup typescript code

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

* updates

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

* cleanup redundant data

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

* fmt

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

* updates

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

* cleanup position and rotation

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

* fix clippy

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

* updates

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

* upfates

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

* updates

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

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)

* empty

* new images

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

* new docs

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

* updates

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

* fixes;

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

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)

* fixups

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

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-21 19:54:18 -07:00
bf8fb0d127 Allow passing a vec of sketches or extrudes thru a user value (#2743)
* updates

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

* updates

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

* updates

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

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-06-21 16:44:31 -07:00
4a275c2ff7 fix one out of bounds error (#2740)
* update out of bounds

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

* more

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

* be in charge of own fate for code mirror versions

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

* Revert "be in charge of own fate for code mirror versions"

This reverts commit 796ecfdd8f.

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-06-21 15:06:01 -07:00
baf5509f1d Bump syn from 2.0.66 to 2.0.67 in /src/wasm-lib (#2731)
Bumps [syn](https://github.com/dtolnay/syn) from 2.0.66 to 2.0.67.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.66...2.0.67)

---
updated-dependencies:
- dependency-name: syn
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-21 15:05:32 -07:00
47a5e1f6d3 Bump proc-macro2 from 1.0.85 to 1.0.86 in /src/wasm-lib (#2732)
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.85 to 1.0.86.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.85...1.0.86)

---
updated-dependencies:
- dependency-name: proc-macro2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-21 08:50:48 -07:00
d85211c5a4 Disable extrude button if there is no extrudable geometry (#2730)
Disable extrude button if there is no extrudeable geometry
2024-06-21 13:20:42 +10:00
78 changed files with 582 additions and 10031 deletions

View File

@ -36,8 +36,6 @@ const extrusion = extrude(5, sketch001)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -73,8 +71,6 @@ const extrusion = extrude(5, sketch001)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -101,10 +97,6 @@ const extrusion = extrude(5, sketch001)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -179,24 +171,6 @@ const extrusion = extrude(5, sketch001)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -37,8 +37,6 @@ const extrusion = extrude(5, sketch001)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -74,8 +72,6 @@ const extrusion = extrude(5, sketch001)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -102,10 +98,6 @@ const extrusion = extrude(5, sketch001)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -180,24 +172,6 @@ const extrusion = extrude(5, sketch001)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -43,8 +43,6 @@ const example = extrude(10, exampleSketch)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -80,8 +78,6 @@ const example = extrude(10, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -108,10 +104,6 @@ const example = extrude(10, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -186,24 +178,6 @@ const example = extrude(10, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```
* `tag`: `String` (OPTIONAL)
@ -213,8 +187,6 @@ const example = extrude(10, exampleSketch)
`SketchGroup` - A sketch group is a collection of paths.
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -250,8 +222,6 @@ const example = extrude(10, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -278,10 +248,6 @@ const example = extrude(10, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -356,24 +322,6 @@ const example = extrude(10, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -42,8 +42,6 @@ const extrusion = extrude(10, sketch001)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -79,8 +77,6 @@ const extrusion = extrude(10, sketch001)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -107,10 +103,6 @@ const extrusion = extrude(10, sketch001)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -185,24 +177,6 @@ const extrusion = extrude(10, sketch001)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```
* `tag`: `String` (OPTIONAL)
@ -212,8 +186,6 @@ const extrusion = extrude(10, sketch001)
`SketchGroup` - A sketch group is a collection of paths.
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -249,8 +221,6 @@ const extrusion = extrude(10, sketch001)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -277,10 +247,6 @@ const extrusion = extrude(10, sketch001)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -355,24 +321,6 @@ const extrusion = extrude(10, sketch001)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -44,8 +44,6 @@ const example = extrude(10, exampleSketch)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -81,8 +79,6 @@ const example = extrude(10, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -109,10 +105,6 @@ const example = extrude(10, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -187,24 +179,6 @@ const example = extrude(10, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```
* `tag`: `String` (OPTIONAL)
@ -214,8 +188,6 @@ const example = extrude(10, exampleSketch)
`SketchGroup` - A sketch group is a collection of paths.
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -251,8 +223,6 @@ const example = extrude(10, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -279,10 +249,6 @@ const example = extrude(10, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -357,24 +323,6 @@ const example = extrude(10, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -48,8 +48,6 @@ const example = extrude(10, exampleSketch)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -85,8 +83,6 @@ const example = extrude(10, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -113,10 +109,6 @@ const example = extrude(10, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -191,24 +183,6 @@ const example = extrude(10, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```
* `tag`: `String` (OPTIONAL)
@ -218,8 +192,6 @@ const example = extrude(10, exampleSketch)
`SketchGroup` - A sketch group is a collection of paths.
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -255,8 +227,6 @@ const example = extrude(10, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -283,10 +253,6 @@ const example = extrude(10, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -361,24 +327,6 @@ const example = extrude(10, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -41,8 +41,6 @@ const example = extrude(10, exampleSketch)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -78,8 +76,6 @@ const example = extrude(10, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -106,10 +102,6 @@ const example = extrude(10, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -184,24 +176,6 @@ const example = extrude(10, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```
* `tag`: `String` (OPTIONAL)
@ -211,8 +185,6 @@ const example = extrude(10, exampleSketch)
`SketchGroup` - A sketch group is a collection of paths.
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -248,8 +220,6 @@ const example = extrude(10, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -276,10 +246,6 @@ const example = extrude(10, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -354,24 +320,6 @@ const example = extrude(10, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -41,8 +41,6 @@ const example = extrude(10, exampleSketch)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -78,8 +76,6 @@ const example = extrude(10, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -106,10 +102,6 @@ const example = extrude(10, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -184,24 +176,6 @@ const example = extrude(10, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```
* `tag`: `String` (OPTIONAL)
@ -211,8 +185,6 @@ const example = extrude(10, exampleSketch)
`SketchGroup` - A sketch group is a collection of paths.
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -248,8 +220,6 @@ const example = extrude(10, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -276,10 +246,6 @@ const example = extrude(10, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -354,24 +320,6 @@ const example = extrude(10, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -52,8 +52,6 @@ const exampleSketch = startSketchOn('XZ')
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -89,8 +87,6 @@ const exampleSketch = startSketchOn('XZ')
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -117,10 +113,6 @@ const exampleSketch = startSketchOn('XZ')
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -195,24 +187,6 @@ const exampleSketch = startSketchOn('XZ')
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```
* `tag`: `String` (OPTIONAL)
@ -222,8 +196,6 @@ const exampleSketch = startSketchOn('XZ')
`SketchGroup` - A sketch group is a collection of paths.
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -259,8 +231,6 @@ const exampleSketch = startSketchOn('XZ')
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -287,10 +257,6 @@ const exampleSketch = startSketchOn('XZ')
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -365,24 +331,6 @@ const exampleSketch = startSketchOn('XZ')
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -47,8 +47,6 @@ const example = extrude(10, exampleSketch)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -84,8 +82,6 @@ const example = extrude(10, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -112,10 +108,6 @@ const example = extrude(10, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -190,24 +182,6 @@ const example = extrude(10, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```
* `tag`: `String` (OPTIONAL)
@ -217,8 +191,6 @@ const example = extrude(10, exampleSketch)
`SketchGroup` - A sketch group is a collection of paths.
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -254,8 +226,6 @@ const example = extrude(10, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -282,10 +252,6 @@ const example = extrude(10, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -360,24 +326,6 @@ const example = extrude(10, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -62,10 +62,6 @@ string],
height: number,
// The id of the extrude group.
id: uuid,
// The position of the extrude group.
position: [number, number, number],
// The rotation of the extrude group.
rotation: [number, number, number, number],
// The sketch group paths.
sketchGroupValues: [{
// The from point.
@ -141,10 +137,6 @@ string],
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudePlane",
@ -156,10 +148,6 @@ string],
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudeArc",
@ -196,10 +184,6 @@ string],
height: number,
// The id of the extrude group.
id: uuid,
// The position of the extrude group.
position: [number, number, number],
// The rotation of the extrude group.
rotation: [number, number, number, number],
// The sketch group paths.
sketchGroupValues: [{
// The from point.
@ -275,10 +259,6 @@ string],
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudePlane",
@ -290,10 +270,6 @@ string],
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudeArc",

View File

@ -76,8 +76,6 @@ const example = extrude(5, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -105,8 +103,6 @@ const example = extrude(5, exampleSketch)
},
} |
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -142,8 +138,6 @@ const example = extrude(5, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -170,10 +164,6 @@ const example = extrude(5, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -248,24 +238,6 @@ const example = extrude(5, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```
@ -274,8 +246,6 @@ const example = extrude(5, exampleSketch)
`SketchGroup` - A sketch group is a collection of paths.
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -311,8 +281,6 @@ const example = extrude(5, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -339,10 +307,6 @@ const example = extrude(5, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -417,24 +381,6 @@ const example = extrude(5, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -42,8 +42,6 @@ const example = extrude(10, exampleSketch)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -79,8 +77,6 @@ const example = extrude(10, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -107,10 +103,6 @@ const example = extrude(10, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -185,24 +177,6 @@ const example = extrude(10, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```
* `tag`: `String` (OPTIONAL)
@ -212,8 +186,6 @@ const example = extrude(10, exampleSketch)
`SketchGroup` - A sketch group is a collection of paths.
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -249,8 +221,6 @@ const example = extrude(10, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -277,10 +247,6 @@ const example = extrude(10, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -355,24 +321,6 @@ const example = extrude(10, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -67,8 +67,6 @@ const example = extrude(10, exampleSketch)
* `sketch_group_set`: `SketchGroupSet` - A sketch group or a group of sketch groups. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -104,8 +102,6 @@ const example = extrude(10, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -132,10 +128,6 @@ const example = extrude(10, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -211,24 +203,6 @@ const example = extrude(10, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
} |
{
type: "sketchGroups",
@ -246,10 +220,6 @@ const example = extrude(10, exampleSketch)
height: number,
// The id of the extrude group.
id: uuid,
// The position of the extrude group.
position: [number, number, number],
// The rotation of the extrude group.
rotation: [number, number, number, number],
// The sketch group paths.
sketchGroupValues: [{
// The from point.
@ -326,10 +296,6 @@ const example = extrude(10, exampleSketch)
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudePlane",
@ -341,10 +307,6 @@ const example = extrude(10, exampleSketch)
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudeArc",

View File

@ -62,10 +62,6 @@ string],
height: number,
// The id of the extrude group.
id: uuid,
// The position of the extrude group.
position: [number, number, number],
// The rotation of the extrude group.
rotation: [number, number, number, number],
// The sketch group paths.
sketchGroupValues: [{
// The from point.
@ -141,10 +137,6 @@ string],
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudePlane",
@ -156,10 +148,6 @@ string],
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudeArc",
@ -196,10 +184,6 @@ string],
height: number,
// The id of the extrude group.
id: uuid,
// The position of the extrude group.
position: [number, number, number],
// The rotation of the extrude group.
rotation: [number, number, number, number],
// The sketch group paths.
sketchGroupValues: [{
// The from point.
@ -275,10 +259,6 @@ string],
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudePlane",
@ -290,10 +270,6 @@ string],
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudeArc",

View File

@ -49,10 +49,6 @@ const revolution = startSketchOn(box, "revolveAxis")
height: number,
// The id of the extrude group.
id: uuid,
// The position of the extrude group.
position: [number, number, number],
// The rotation of the extrude group.
rotation: [number, number, number, number],
// The sketch group paths.
sketchGroupValues: [{
// The from point.
@ -128,10 +124,6 @@ const revolution = startSketchOn(box, "revolveAxis")
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudePlane",
@ -143,10 +135,6 @@ const revolution = startSketchOn(box, "revolveAxis")
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudeArc",

View File

@ -47,10 +47,6 @@ const example = extrude(5, exampleSketch)
height: number,
// The id of the extrude group.
id: uuid,
// The position of the extrude group.
position: [number, number, number],
// The rotation of the extrude group.
rotation: [number, number, number, number],
// The sketch group paths.
sketchGroupValues: [{
// The from point.
@ -126,10 +122,6 @@ const example = extrude(5, exampleSketch)
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudePlane",
@ -141,10 +133,6 @@ const example = extrude(5, exampleSketch)
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudeArc",

View File

@ -45,10 +45,6 @@ const example = extrude(5, exampleSketch)
height: number,
// The id of the extrude group.
id: uuid,
// The position of the extrude group.
position: [number, number, number],
// The rotation of the extrude group.
rotation: [number, number, number, number],
// The sketch group paths.
sketchGroupValues: [{
// The from point.
@ -124,10 +120,6 @@ const example = extrude(5, exampleSketch)
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudePlane",
@ -139,10 +131,6 @@ const example = extrude(5, exampleSketch)
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudeArc",

View File

@ -47,10 +47,6 @@ const example = extrude(5, exampleSketch)
height: number,
// The id of the extrude group.
id: uuid,
// The position of the extrude group.
position: [number, number, number],
// The rotation of the extrude group.
rotation: [number, number, number, number],
// The sketch group paths.
sketchGroupValues: [{
// The from point.
@ -126,10 +122,6 @@ const example = extrude(5, exampleSketch)
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudePlane",
@ -141,10 +133,6 @@ const example = extrude(5, exampleSketch)
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudeArc",

View File

@ -52,10 +52,6 @@ const part001 = startSketchOn('XY')
height: number,
// The id of the extrude group.
id: uuid,
// The position of the extrude group.
position: [number, number, number],
// The rotation of the extrude group.
rotation: [number, number, number, number],
// The sketch group paths.
sketchGroupValues: [{
// The from point.
@ -131,10 +127,6 @@ const part001 = startSketchOn('XY')
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudePlane",
@ -146,10 +138,6 @@ const part001 = startSketchOn('XY')
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudeArc",
@ -186,10 +174,6 @@ const part001 = startSketchOn('XY')
height: number,
// The id of the extrude group.
id: uuid,
// The position of the extrude group.
position: [number, number, number],
// The rotation of the extrude group.
rotation: [number, number, number, number],
// The sketch group paths.
sketchGroupValues: [{
// The from point.
@ -265,10 +249,6 @@ const part001 = startSketchOn('XY')
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudePlane",
@ -280,10 +260,6 @@ const part001 = startSketchOn('XY')
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudeArc",

View File

@ -53,8 +53,6 @@ const example = extrude(1, exampleSketch)
* `hole_sketch_group`: `SketchGroupSet` - A sketch group or a group of sketch groups. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -90,8 +88,6 @@ const example = extrude(1, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -118,10 +114,6 @@ const example = extrude(1, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -197,24 +189,6 @@ const example = extrude(1, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
} |
{
type: "sketchGroups",
@ -223,8 +197,6 @@ const example = extrude(1, exampleSketch)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -260,8 +232,6 @@ const example = extrude(1, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -288,10 +258,6 @@ const example = extrude(1, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -366,24 +332,6 @@ const example = extrude(1, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```
@ -392,8 +340,6 @@ const example = extrude(1, exampleSketch)
`SketchGroup` - A sketch group is a collection of paths.
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -429,8 +375,6 @@ const example = extrude(1, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -457,10 +401,6 @@ const example = extrude(1, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -535,24 +475,6 @@ const example = extrude(1, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -33,8 +33,6 @@ const example = extrude(5, exampleSketch)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -70,8 +68,6 @@ const example = extrude(5, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -98,10 +94,6 @@ const example = extrude(5, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -176,24 +168,6 @@ const example = extrude(5, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -33,8 +33,6 @@ const example = extrude(5, exampleSketch)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -70,8 +68,6 @@ const example = extrude(5, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -98,10 +94,6 @@ const example = extrude(5, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -176,24 +168,6 @@ const example = extrude(5, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -46,8 +46,6 @@ const example = extrude(5, exampleSketch)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -83,8 +81,6 @@ const example = extrude(5, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -111,10 +107,6 @@ const example = extrude(5, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -189,24 +181,6 @@ const example = extrude(5, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```
* `tag`: `String` (OPTIONAL)
@ -216,8 +190,6 @@ const example = extrude(5, exampleSketch)
`SketchGroup` - A sketch group is a collection of paths.
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -253,8 +225,6 @@ const example = extrude(5, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -281,10 +251,6 @@ const example = extrude(5, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -359,24 +325,6 @@ const example = extrude(5, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -33,8 +33,6 @@ const example = extrude(5, exampleSketch)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -70,8 +68,6 @@ const example = extrude(5, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -98,10 +94,6 @@ const example = extrude(5, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -176,24 +168,6 @@ const example = extrude(5, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```
* `tag`: `String` (OPTIONAL)
@ -203,8 +177,6 @@ const example = extrude(5, exampleSketch)
`SketchGroup` - A sketch group is a collection of paths.
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -240,8 +212,6 @@ const example = extrude(5, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -268,10 +238,6 @@ const example = extrude(5, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -346,24 +312,6 @@ const example = extrude(5, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -51,8 +51,6 @@ const example = extrude(1, exampleSketch)
* `sketch_group_set`: `SketchGroupSet` - A sketch group or a group of sketch groups. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -88,8 +86,6 @@ const example = extrude(1, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -116,10 +112,6 @@ const example = extrude(1, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -195,24 +187,6 @@ const example = extrude(1, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
} |
{
type: "sketchGroups",

View File

@ -56,10 +56,6 @@ const example = extrude(-5, exampleSketch)
height: number,
// The id of the extrude group.
id: uuid,
// The position of the extrude group.
position: [number, number, number],
// The rotation of the extrude group.
rotation: [number, number, number, number],
// The sketch group paths.
sketchGroupValues: [{
// The from point.
@ -136,10 +132,6 @@ const example = extrude(-5, exampleSketch)
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudePlane",
@ -151,10 +143,6 @@ const example = extrude(-5, exampleSketch)
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudeArc",

View File

@ -44,8 +44,6 @@ const example = extrude(1, exampleSketch)
* `sketch_group_set`: `SketchGroupSet` - A sketch group or a group of sketch groups. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -81,8 +79,6 @@ const example = extrude(1, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -109,10 +105,6 @@ const example = extrude(1, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -188,24 +180,6 @@ const example = extrude(1, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
} |
{
type: "sketchGroups",

View File

@ -54,10 +54,6 @@ const example = extrude(1, exampleSketch)
height: number,
// The id of the extrude group.
id: uuid,
// The position of the extrude group.
position: [number, number, number],
// The rotation of the extrude group.
rotation: [number, number, number, number],
// The sketch group paths.
sketchGroupValues: [{
// The from point.
@ -134,10 +130,6 @@ const example = extrude(1, exampleSketch)
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudePlane",
@ -149,10 +141,6 @@ const example = extrude(1, exampleSketch)
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudeArc",

View File

@ -34,8 +34,6 @@ const sketch001 = startSketchOn('XY')
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -71,8 +69,6 @@ const sketch001 = startSketchOn('XY')
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -99,10 +95,6 @@ const sketch001 = startSketchOn('XY')
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -177,24 +169,6 @@ const sketch001 = startSketchOn('XY')
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -29,8 +29,6 @@ const sketch001 = startSketchOn('XY')
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -66,8 +64,6 @@ const sketch001 = startSketchOn('XY')
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -94,10 +90,6 @@ const sketch001 = startSketchOn('XY')
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -172,24 +164,6 @@ const sketch001 = startSketchOn('XY')
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -28,8 +28,6 @@ const sketch001 = startSketchOn('XY')
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -65,8 +63,6 @@ const sketch001 = startSketchOn('XY')
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -93,10 +89,6 @@ const sketch001 = startSketchOn('XY')
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -171,24 +163,6 @@ const sketch001 = startSketchOn('XY')
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -162,8 +162,6 @@ string,
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -199,8 +197,6 @@ string,
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -227,10 +223,6 @@ string,
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -305,24 +297,6 @@ string,
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```
@ -337,10 +311,6 @@ string,
height: number,
// The id of the extrude group.
id: uuid,
// The position of the extrude group.
position: [number, number, number],
// The rotation of the extrude group.
rotation: [number, number, number, number],
// The sketch group paths.
sketchGroupValues: [{
// The from point.
@ -416,10 +386,6 @@ string,
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudePlane",
@ -431,10 +397,6 @@ string,
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudeArc",

View File

@ -36,8 +36,6 @@ const example = extrude(4, exampleSketch)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -73,8 +71,6 @@ const example = extrude(4, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -101,10 +97,6 @@ const example = extrude(4, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -179,24 +171,6 @@ const example = extrude(4, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -34,8 +34,6 @@ const example = extrude(5, exampleSketch)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -71,8 +69,6 @@ const example = extrude(5, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -99,10 +95,6 @@ const example = extrude(5, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -177,24 +169,6 @@ const example = extrude(5, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -35,8 +35,6 @@ const example = extrude(5, exampleSketch)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -72,8 +70,6 @@ const example = extrude(5, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -100,10 +96,6 @@ const example = extrude(5, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -178,24 +170,6 @@ const example = extrude(5, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -36,8 +36,6 @@ const example = extrude(5, exampleSketch)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -73,8 +71,6 @@ const example = extrude(5, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -101,10 +97,6 @@ const example = extrude(5, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -179,24 +171,6 @@ const example = extrude(5, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -50,10 +50,6 @@ string],
height: number,
// The id of the extrude group.
id: uuid,
// The position of the extrude group.
position: [number, number, number],
// The rotation of the extrude group.
rotation: [number, number, number, number],
// The sketch group paths.
sketchGroupValues: [{
// The from point.
@ -129,10 +125,6 @@ string],
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudePlane",
@ -144,10 +136,6 @@ string],
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudeArc",
@ -184,10 +172,6 @@ string],
height: number,
// The id of the extrude group.
id: uuid,
// The position of the extrude group.
position: [number, number, number],
// The rotation of the extrude group.
rotation: [number, number, number, number],
// The sketch group paths.
sketchGroupValues: [{
// The from point.
@ -263,10 +247,6 @@ string],
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudePlane",
@ -278,10 +258,6 @@ string],
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudeArc",

View File

@ -90,8 +90,6 @@ const example = extrude(5, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -126,8 +124,6 @@ const example = extrude(5, exampleSketch)
`SketchGroup` - A sketch group is a collection of paths.
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -163,8 +159,6 @@ const example = extrude(5, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -191,10 +185,6 @@ const example = extrude(5, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -269,24 +259,6 @@ const example = extrude(5, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -59,8 +59,6 @@ const example = extrude(5, exampleSketch)
`SketchGroup` - A sketch group is a collection of paths.
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -96,8 +94,6 @@ const example = extrude(5, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -124,10 +120,6 @@ const example = extrude(5, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -202,24 +194,6 @@ const example = extrude(5, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -167,10 +167,6 @@ const a1 = startSketchOn({
height: number,
// The id of the extrude group.
id: uuid,
// The position of the extrude group.
position: [number, number, number],
// The rotation of the extrude group.
rotation: [number, number, number, number],
// The sketch group paths.
sketchGroupValues: [{
// The from point.
@ -246,10 +242,6 @@ const a1 = startSketchOn({
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudePlane",
@ -261,10 +253,6 @@ const a1 = startSketchOn({
id: uuid,
// The name.
name: string,
// The position.
position: [number, number, number],
// The rotation.
rotation: [number, number, number, number],
// The source range.
sourceRange: [number, number],
type: "extrudeArc",
@ -331,8 +319,6 @@ string
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.

File diff suppressed because it is too large Load Diff

View File

@ -42,8 +42,6 @@ const example = extrude(10, exampleSketch)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -79,8 +77,6 @@ const example = extrude(10, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -107,10 +103,6 @@ const example = extrude(10, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -185,24 +177,6 @@ const example = extrude(10, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```
* `tag`: `String` (OPTIONAL)
@ -212,8 +186,6 @@ const example = extrude(10, exampleSketch)
`SketchGroup` - A sketch group is a collection of paths.
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -249,8 +221,6 @@ const example = extrude(10, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -277,10 +247,6 @@ const example = extrude(10, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -355,24 +321,6 @@ const example = extrude(10, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -33,8 +33,6 @@ const example = extrude(10, exampleSketch)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -70,8 +68,6 @@ const example = extrude(10, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -98,10 +94,6 @@ const example = extrude(10, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -176,24 +168,6 @@ const example = extrude(10, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```
* `tag`: `String` (OPTIONAL)
@ -203,8 +177,6 @@ const example = extrude(10, exampleSketch)
`SketchGroup` - A sketch group is a collection of paths.
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -240,8 +212,6 @@ const example = extrude(10, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -268,10 +238,6 @@ const example = extrude(10, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -346,24 +312,6 @@ const example = extrude(10, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -36,8 +36,6 @@ const example = extrude(10, exampleSketch)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -73,8 +71,6 @@ const example = extrude(10, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -101,10 +97,6 @@ const example = extrude(10, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -179,24 +171,6 @@ const example = extrude(10, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```
* `tag`: `String` (OPTIONAL)
@ -206,8 +180,6 @@ const example = extrude(10, exampleSketch)
`SketchGroup` - A sketch group is a collection of paths.
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -243,8 +215,6 @@ const example = extrude(10, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -271,10 +241,6 @@ const example = extrude(10, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -349,24 +315,6 @@ const example = extrude(10, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -36,8 +36,6 @@ const example = extrude(10, exampleSketch)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -73,8 +71,6 @@ const example = extrude(10, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -101,10 +97,6 @@ const example = extrude(10, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -179,24 +171,6 @@ const example = extrude(10, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```
* `tag`: `String` (OPTIONAL)
@ -206,8 +180,6 @@ const example = extrude(10, exampleSketch)
`SketchGroup` - A sketch group is a collection of paths.
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -243,8 +215,6 @@ const example = extrude(10, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -271,10 +241,6 @@ const example = extrude(10, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -349,24 +315,6 @@ const example = extrude(10, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -34,8 +34,6 @@ const example = extrude(10, exampleSketch)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -71,8 +69,6 @@ const example = extrude(10, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -99,10 +95,6 @@ const example = extrude(10, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -177,24 +169,6 @@ const example = extrude(10, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```
* `tag`: `String` (OPTIONAL)
@ -204,8 +178,6 @@ const example = extrude(10, exampleSketch)
`SketchGroup` - A sketch group is a collection of paths.
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -241,8 +213,6 @@ const example = extrude(10, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -269,10 +239,6 @@ const example = extrude(10, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -347,24 +313,6 @@ const example = extrude(10, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -32,8 +32,6 @@ const example = extrude(5, exampleSketch)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -69,8 +67,6 @@ const example = extrude(5, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -97,10 +93,6 @@ const example = extrude(5, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -175,24 +167,6 @@ const example = extrude(5, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```
* `tag`: `String` (OPTIONAL)
@ -202,8 +176,6 @@ const example = extrude(5, exampleSketch)
`SketchGroup` - A sketch group is a collection of paths.
```js
{
// The plane id or face id of the sketch group.
entityId: uuid,
// The id of the sketch group.
id: uuid,
// What the sketch is on (can be a plane or a face).
@ -239,8 +211,6 @@ const example = extrude(5, exampleSketch)
},
} |
{
// the face id the sketch is on
faceId: uuid,
// The id of the face.
id: uuid,
// The original sketch group id of the object we are sketching on.
@ -267,10 +237,6 @@ const example = extrude(5, exampleSketch)
z: number,
},
},
// The position of the sketch group.
position: [number, number, number],
// The rotation of the sketch group base plane.
rotation: [number, number, number, number],
// The starting path.
start: {
// The from point.
@ -345,24 +311,6 @@ const example = extrude(5, exampleSketch)
to: [number, number],
type: "Base",
}],
// The x-axis of the sketch group base plane in the 3D space
xAxis: {
x: number,
y: number,
z: number,
},
// The y-axis of the sketch group base plane in the 3D space
yAxis: {
x: number,
y: number,
z: number,
},
// The z-axis of the sketch group base plane in the 3D space
zAxis: {
x: number,
y: number,
z: number,
},
}
```

View File

@ -990,6 +990,59 @@ test.describe('Can create sketches on all planes and their back sides', () => {
})
})
test('Position _ Is Out Of Range... regression test', async ({ page }) => {
const u = await getUtils(page)
// const PUR = 400 / 37.5 //pixeltoUnitRatio
await page.setViewportSize({ width: 1200, height: 500 })
await page.addInitScript(async () => {
localStorage.setItem(
'persistCode',
`const exampleSketch = startSketchOn("XZ")
|> startProfileAt([0, 0], %)
|> angledLine({ angle: 50, length: 45 }, %)
|> yLineTo(0, %)
|> close(%)
|>
const example = extrude(5, exampleSketch)
shell({ faces: ['end'], thickness: 0.25 }, exampleSketch)`
)
})
const lspStartPromise = page.waitForEvent('console', async (message) => {
// it would be better to wait for a message that the kcl lsp has started by looking for the message message.text().includes('[lsp] [window/logMessage]')
// but that doesn't seem to make it to the console for macos/safari :(
if (message.text().includes('start kcl lsp')) {
await new Promise((resolve) => setTimeout(resolve, 200))
return true
}
return false
})
await page.goto('/')
await u.waitForAuthSkipAppStart()
await lspStartPromise
// error in guter
await expect(page.locator('.cm-lint-marker-error')).toBeVisible()
// error text on hover
await page.hover('.cm-lint-marker-error')
await expect(page.getByText('Unexpected token').first()).toBeVisible()
// Okay execution finished, let's start editing text below the error.
await u.codeLocator.click()
// Go to the end of the editor
await page.keyboard.press('End')
// Get to the area where we want to type.
for (let i = 0; i < 20; i++) {
await page.keyboard.press('ArrowLeft')
}
await page.keyboard.press('Enter')
await page.keyboard.type('thing: "blah"', { delay: 100 })
await page.keyboard.press('Enter')
})
test('Auto complete works', async ({ page }) => {
const u = await getUtils(page)
// const PUR = 400 / 37.5 //pixeltoUnitRatio
@ -1798,6 +1851,74 @@ test.describe('Testing selections', () => {
await page.waitForTimeout(100)
await expect(page.getByTestId('hover-highlight')).not.toBeVisible()
})
test("Extrude button should be disabled if there's no extrudable geometry when nothing is selected", async ({
page,
}) => {
const u = await getUtils(page)
await page.addInitScript(async () => {
localStorage.setItem(
'persistCode',
`const sketch001 = startSketchOn('XZ')
|> startProfileAt([3.29, 7.86], %)
|> line([2.48, 2.44], %)
|> line([2.66, 1.17], %)
|> line([3.75, 0.46], %)
|> line([4.99, -0.46], %, 'seg01')
|> line([3.3, -2.12], %)
|> line([2.16, -3.33], %)
|> line([0.85, -3.08], %)
|> line([-0.18, -3.36], %)
|> line([-3.86, -2.73], %)
|> line([-17.67, 0.85], %)
|> close(%)
const extrude001 = extrude(10, sketch001)
`
)
})
await page.setViewportSize({ width: 1000, height: 500 })
await page.goto('/')
await u.waitForAuthSkipAppStart()
// wait for execution done
await u.openDebugPanel()
await u.expectCmdLog('[data-message-type="execution-done"]')
await u.closeDebugPanel()
const selectUnExtrudable = () =>
page.getByText(`line([4.99, -0.46], %, 'seg01')`).click()
const clickEmpty = () => page.mouse.click(700, 460)
await selectUnExtrudable()
// expect extrude button to be disabled
await expect(page.getByRole('button', { name: 'Extrude' })).toBeDisabled()
await clickEmpty()
// expect active line to contain nothing
await expect(page.locator('.cm-activeLine')).toHaveText('')
// and extrude to still be disabled
await expect(page.getByRole('button', { name: 'Extrude' })).toBeDisabled()
const codeToAdd = `${await u.codeLocator.allInnerTexts()}
const sketch002 = startSketchOn(extrude001, 'seg01')
|> startProfileAt([-12.94, 6.6], %)
|> line([2.45, -0.2], %)
|> line([-2, -1.25], %)
|> lineTo([profileStartX(%), profileStartY(%)], %)
|> close(%)
`
await u.codeLocator.fill(codeToAdd)
await selectUnExtrudable()
// expect extrude button to be disabled
await expect(page.getByRole('button', { name: 'Extrude' })).toBeDisabled()
await clickEmpty()
await expect(page.locator('.cm-activeLine')).toHaveText('')
// there's not extrudable geometry, so button should be enabled
await expect(
page.getByRole('button', { name: 'Extrude' })
).not.toBeDisabled()
})
test('Testing selections (and hovers) work on sketches when NOT in sketch mode', async ({
page,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View File

@ -1,6 +1,6 @@
{
"name": "untitled-app",
"version": "0.22.3",
"version": "0.22.4",
"private": true,
"dependencies": {
"@codemirror/autocomplete": "^6.16.0",

View File

@ -75,5 +75,5 @@
}
},
"productName": "Zoo Modeling App",
"version": "0.22.3"
"version": "0.22.4"
}

View File

@ -343,11 +343,8 @@ export class SceneEntities {
pathToNode: sketchPathToNode,
}
const dummy = new Mesh()
dummy.position.set(
sketchGroup.position[0],
sketchGroup.position[1],
sketchGroup.position[2]
)
// TODO: When we actually have sketch positions and rotations we can use them here.
dummy.position.set(0, 0, 0)
const orthoFactor = orthoScale(sceneInfra.camControls.camera)
const factor =
(sceneInfra.camControls.camera instanceof OrthographicCamera
@ -1397,7 +1394,6 @@ export class SceneEntities {
streamDimensions
)
let _entity_id = entity_id
console.log('things', _entity_id, rest)
if (!_entity_id) return
if (
engineCommandManager.defaultPlanes?.xy === _entity_id ||
@ -1426,7 +1422,6 @@ export class SceneEntities {
.sub(sceneInfra.camControls.target)
if (engineCommandManager.defaultPlanes?.xy === _entity_id) {
console.log('XY')
zAxis = [0, 0, 1]
yAxis = [0, 1, 0]
if (camVector.z < 0) {
@ -1434,7 +1429,6 @@ export class SceneEntities {
_entity_id = engineCommandManager.defaultPlanes?.negXy || ''
}
} else if (engineCommandManager.defaultPlanes?.yz === _entity_id) {
console.log('YZ')
zAxis = [1, 0, 0]
yAxis = [0, 0, 1]
if (camVector.x < 0) {
@ -1442,7 +1436,6 @@ export class SceneEntities {
_entity_id = engineCommandManager.defaultPlanes?.negYz || ''
}
} else if (engineCommandManager.defaultPlanes?.xz === _entity_id) {
console.log('XZ')
zAxis = [0, 1, 0]
yAxis = [0, 0, 1]
_entity_id = engineCommandManager.defaultPlanes?.negXz || ''
@ -1496,6 +1489,7 @@ export class SceneEntities {
kclManager.ast,
artifact.range
)
const extrudePathToNode = extrusions?.range
? getNodePathFromSourceRange(kclManager.ast, extrusions.range)
: []
@ -1804,7 +1798,7 @@ export function getSketchQuaternion(
ast: kclManager.ast,
programMemory: kclManager.programMemory,
})
const zAxis = sketchGroup?.zAxis || sketchNormalBackUp
const zAxis = sketchGroup?.on.zAxis || sketchNormalBackUp
return getQuaternionFromZAxis(massageFormats(zAxis))
}
export async function getSketchOrientationDetails(
@ -1819,20 +1813,24 @@ export async function getSketchOrientationDetails(
programMemory: kclManager.programMemory,
})
if (sketchGroup.on.type === 'plane') {
const zAxis = sketchGroup?.zAxis
const zAxis = sketchGroup?.on.zAxis
return {
quat: getQuaternionFromZAxis(massageFormats(zAxis)),
sketchDetails: {
sketchPathToNode,
zAxis: [zAxis.x, zAxis.y, zAxis.z],
yAxis: [sketchGroup.yAxis.x, sketchGroup.yAxis.y, sketchGroup.yAxis.z],
yAxis: [
sketchGroup.on.yAxis.x,
sketchGroup.on.yAxis.y,
sketchGroup.on.yAxis.z,
],
origin: [0, 0, 0],
faceId: sketchGroup.on.id,
},
}
}
if (sketchGroup.on.type === 'face') {
const faceInfo = await getFaceDetails(sketchGroup.on.faceId)
const faceInfo = await getFaceDetails(sketchGroup.on.id)
if (!faceInfo?.origin || !faceInfo?.z_axis || !faceInfo?.y_axis)
throw new Error('faceInfo')
@ -1848,7 +1846,7 @@ export async function getSketchOrientationDetails(
zAxis: [z_axis.x, z_axis.y, z_axis.z],
yAxis: [y_axis.x, y_axis.y, y_axis.z],
origin: [origin.x, origin.y, origin.z],
faceId: sketchGroup.on.faceId,
faceId: sketchGroup.on.id,
},
}
}

View File

@ -63,6 +63,7 @@ import {
import {
getNodeFromPath,
getNodePathFromSourceRange,
hasExtrudableGeometry,
isSingleCursorInPipe,
} from 'lang/queryAst'
import { TEST } from 'env'
@ -447,8 +448,13 @@ export const ModelingMachineProvider = ({
if (
selectionRanges.codeBasedSelections.length === 0 ||
isSelectionLastLine(selectionRanges, codeManager.code)
)
return true
) {
// they have no selection, we should enable the button
// so they can select the face through the cmdbar
// BUT only if there's extrudable geometry
if (hasExtrudableGeometry(kclManager.ast)) return true
return false
}
if (!isPipe) return false
return canExtrudeSelection(selectionRanges)
@ -501,6 +507,7 @@ export const ModelingMachineProvider = ({
},
'animate-to-face': async (_, { data }) => {
if (data.type === 'extrudeFace') {
console.log('data', data)
const { modifiedAst, pathToNode: pathToNewSketchNode } =
sketchOnExtrudedFace(
kclManager.ast,

View File

@ -43,20 +43,16 @@ describe('processMemory', () => {
theExtrude: [
{
type: 'extrudePlane',
position: [0, 0, 0],
rotation: [0, 0, 0, 1],
faceId: expect.any(String),
name: '',
id: expect.any(String),
faceId: expect.any(String),
sourceRange: [170, 194],
},
{
type: 'extrudePlane',
position: [0, 0, 0],
rotation: [0, 0, 0, 1],
faceId: expect.any(String),
name: '',
id: expect.any(String),
faceId: expect.any(String),
sourceRange: [202, 230],
},
],

View File

@ -51,13 +51,7 @@ const mySketch001 = startSketchOn('XY')
},
},
],
position: [0, 0, 0],
rotation: [0, 0, 0, 1],
xAxis: { x: 1, y: 0, z: 0 },
yAxis: { x: 0, y: 1, z: 0 },
zAxis: { x: 0, y: 0, z: 1 },
id: expect.any(String),
entityId: expect.any(String),
__meta: [{ sourceRange: [46, 71] }],
})
})
@ -79,8 +73,6 @@ const mySketch001 = startSketchOn('XY')
value: [
{
type: 'extrudePlane',
position: [0, 0, 0],
rotation: [0, 0, 0, 1],
faceId: expect.any(String),
name: '',
id: expect.any(String),
@ -88,8 +80,6 @@ const mySketch001 = startSketchOn('XY')
},
{
type: 'extrudePlane',
position: [0, 0, 0],
rotation: [0, 0, 0, 1],
faceId: expect.any(String),
name: '',
id: expect.any(String),
@ -119,8 +109,6 @@ const mySketch001 = startSketchOn('XY')
},
],
height: 2,
position: [0, 0, 0],
rotation: [0, 0, 0, 1],
xAxis: { x: 1, y: 0, z: 0 },
yAxis: { x: 0, y: 1, z: 0 },
zAxis: { x: 0, y: 0, z: 1 },
@ -162,8 +150,6 @@ const sk2 = startSketchOn('XY')
value: [
{
type: 'extrudePlane',
position: [0, 0, 0],
rotation: [0, 0, 0, 1],
faceId: expect.any(String),
name: '',
id: expect.any(String),
@ -171,8 +157,6 @@ const sk2 = startSketchOn('XY')
},
{
type: 'extrudePlane',
position: [0, 0, 0],
rotation: [0, 0, 0, 1],
faceId: expect.any(String),
name: 'p',
id: expect.any(String),
@ -180,8 +164,6 @@ const sk2 = startSketchOn('XY')
},
{
type: 'extrudePlane',
position: [0, 0, 0],
rotation: [0, 0, 0, 1],
faceId: expect.any(String),
name: '',
id: expect.any(String),
@ -221,8 +203,6 @@ const sk2 = startSketchOn('XY')
},
],
height: 2,
position: [0, 0, 0],
rotation: [0, 0, 0, 1],
xAxis: { x: 1, y: 0, z: 0 },
yAxis: { x: 0, y: 1, z: 0 },
zAxis: { x: 0, y: 0, z: 1 },
@ -236,8 +216,6 @@ const sk2 = startSketchOn('XY')
value: [
{
type: 'extrudePlane',
position: [0, 0, 0],
rotation: [0, 0, 0, 1],
faceId: expect.any(String),
name: '',
id: expect.any(String),
@ -245,8 +223,6 @@ const sk2 = startSketchOn('XY')
},
{
type: 'extrudePlane',
position: [0, 0, 0],
rotation: [0, 0, 0, 1],
faceId: expect.any(String),
name: 'p',
id: expect.any(String),
@ -254,8 +230,6 @@ const sk2 = startSketchOn('XY')
},
{
type: 'extrudePlane',
position: [0, 0, 0],
rotation: [0, 0, 0, 1],
faceId: expect.any(String),
name: '',
id: expect.any(String),
@ -295,8 +269,6 @@ const sk2 = startSketchOn('XY')
},
],
height: 2,
position: [0, 0, 0],
rotation: [0, 0, 0, 1],
xAxis: { x: 1, y: 0, z: 0 },
yAxis: { x: 0, y: 1, z: 0 },
zAxis: { x: 0, y: 0, z: 1 },

View File

@ -177,13 +177,7 @@ const newVar = myVar + 1`
},
},
],
position: [0, 0, 0],
rotation: [0, 0, 0, 1],
xAxis: { x: 1, y: 0, z: 0 },
yAxis: { x: 0, y: 1, z: 0 },
zAxis: { x: 0, y: 0, z: 1 },
id: expect.any(String),
entityId: expect.any(String),
__meta: [{ sourceRange: [39, 63] }],
})
})

View File

@ -7,6 +7,8 @@ import {
doesPipeHaveCallExp,
hasExtrudeSketchGroup,
findUsesOfTagInPipe,
hasSketchPipeBeenExtruded,
hasExtrudableGeometry,
} from './queryAst'
import { enginelessExecutor } from '../lib/testHelpers'
import {
@ -396,3 +398,90 @@ describe('Testing findUsesOfTagInPipe', () => {
expect(result).toHaveLength(0)
})
})
describe('Testing hasSketchPipeBeenExtruded', () => {
const exampleCode = `const sketch001 = startSketchOn('XZ')
|> startProfileAt([3.29, 7.86], %)
|> line([2.48, 2.44], %)
|> line([2.66, 1.17], %)
|> line([3.75, 0.46], %)
|> line([4.99, -0.46], %, 'seg01')
|> line([3.3, -2.12], %)
|> line([2.16, -3.33], %)
|> line([0.85, -3.08], %)
|> line([-0.18, -3.36], %)
|> line([-3.86, -2.73], %)
|> line([-17.67, 0.85], %)
|> close(%)
const extrude001 = extrude(10, sketch001)
const sketch002 = startSketchOn(extrude001, 'seg01')
|> startProfileAt([-12.94, 6.6], %)
|> line([2.45, -0.2], %)
|> line([-2, -1.25], %)
|> lineTo([profileStartX(%), profileStartY(%)], %)
|> close(%)
`
it('finds sketch001 pipe to be extruded', async () => {
const ast = parse(exampleCode)
const lineOfInterest = `line([4.99, -0.46], %, 'seg01')`
const characterIndex =
exampleCode.indexOf(lineOfInterest) + lineOfInterest.length
const extruded = hasSketchPipeBeenExtruded(
{
range: [characterIndex, characterIndex],
type: 'default',
},
ast
)
expect(extruded).toBeTruthy()
})
it('find sketch002 NOT pipe to be extruded', async () => {
const ast = parse(exampleCode)
const lineOfInterest = `line([2.45, -0.2], %)`
const characterIndex =
exampleCode.indexOf(lineOfInterest) + lineOfInterest.length
const extruded = hasSketchPipeBeenExtruded(
{
range: [characterIndex, characterIndex],
type: 'default',
},
ast
)
expect(extruded).toBeFalsy()
})
})
describe('Testing hasExtrudableGeometry', () => {
it('finds sketch001 pipe to be extruded', async () => {
const exampleCode = `const sketch001 = startSketchOn('XZ')
|> startProfileAt([3.29, 7.86], %)
|> line([2.48, 2.44], %)
|> line([-3.86, -2.73], %)
|> line([-17.67, 0.85], %)
|> close(%)
const extrude001 = extrude(10, sketch001)
const sketch002 = startSketchOn(extrude001, 'seg01')
|> startProfileAt([-12.94, 6.6], %)
|> line([2.45, -0.2], %)
|> line([-2, -1.25], %)
|> lineTo([profileStartX(%), profileStartY(%)], %)
|> close(%)
`
const ast = parse(exampleCode)
const extrudable = hasExtrudableGeometry(ast)
expect(extrudable).toBeTruthy()
})
it('find sketch002 NOT pipe to be extruded', async () => {
const exampleCode = `const sketch001 = startSketchOn('XZ')
|> startProfileAt([3.29, 7.86], %)
|> line([2.48, 2.44], %)
|> line([-3.86, -2.73], %)
|> line([-17.67, 0.85], %)
|> close(%)
const extrude001 = extrude(10, sketch001)
`
const ast = parse(exampleCode)
const extrudable = hasExtrudableGeometry(ast)
expect(extrudable).toBeFalsy()
})
})

View File

@ -720,3 +720,78 @@ export function findUsesOfTagInPipe(
})
return dependentRanges
}
export function hasSketchPipeBeenExtruded(selection: Selection, ast: Program) {
const path = getNodePathFromSourceRange(ast, selection.range)
const { node: pipeExpression } = getNodeFromPath<PipeExpression>(
ast,
path,
'PipeExpression'
)
if (pipeExpression.type !== 'PipeExpression') return false
const varDec = getNodeFromPath<VariableDeclarator>(
ast,
path,
'VariableDeclarator'
).node
let extruded = false
traverse(ast as any, {
enter(node) {
if (
node.type === 'CallExpression' &&
node.callee.type === 'Identifier' &&
node.callee.name === 'extrude' &&
node.arguments?.[1]?.type === 'Identifier' &&
node.arguments[1].name === varDec.id.name
) {
extruded = true
}
},
})
return extruded
}
/** File must contain at least one sketch that has not been extruded already */
export function hasExtrudableGeometry(ast: Program) {
const theMap: any = {}
traverse(ast as any, {
enter(node) {
if (
node.type === 'VariableDeclarator' &&
node.init?.type === 'PipeExpression'
) {
let hasStartProfileAt = false
let hasStartSketchOn = false
let hasClose = false
for (const pipe of node.init.body) {
if (
pipe.type === 'CallExpression' &&
pipe.callee.name === 'startProfileAt'
) {
hasStartProfileAt = true
}
if (
pipe.type === 'CallExpression' &&
pipe.callee.name === 'startSketchOn'
) {
hasStartSketchOn = true
}
if (pipe.type === 'CallExpression' && pipe.callee.name === 'close') {
hasClose = true
}
}
if (hasStartProfileAt && hasStartSketchOn && hasClose) {
theMap[node.id.name] = true
}
} else if (
node.type === 'CallExpression' &&
node.callee.name === 'extrude' &&
node.arguments[1]?.type === 'Identifier' &&
theMap?.[node?.arguments?.[1]?.name]
) {
delete theMap[node.arguments[1].name]
}
},
})
return Object.keys(theMap).length > 0
}

View File

@ -1466,6 +1466,9 @@ export class EngineCommandManager extends EventTarget {
if (command && command.type === 'pending') {
const resolve = command.resolve
const oldArtifact = this.artifactMap[id] as ArtifactMapCommand & {
extrusions?: string[]
}
const artifact = {
type: 'result',
range: command.range,
@ -1474,7 +1477,10 @@ export class EngineCommandManager extends EventTarget {
parentId: command.parentId ? command.parentId : undefined,
data: modelingResponse,
raw,
} as const
} as ArtifactMapCommand & { extrusions?: string[] }
if (oldArtifact?.extrusions) {
artifact.extrusions = oldArtifact.extrusions
}
this.artifactMap[id] = artifact
if (
(command.commandType === 'entity_linear_pattern' &&
@ -1903,6 +1909,8 @@ export class EngineCommandManager extends EventTarget {
} else {
typedTarget.extrusions = [id]
}
// Update in the map.
this.artifactMap[command.target] = typedTarget
}
}
return promise

View File

@ -74,8 +74,6 @@ export type SyntaxType =
| 'UnaryExpression'
export type { SourceRange } from '../wasm-lib/kcl/bindings/SourceRange'
export type { Position } from '../wasm-lib/kcl/bindings/Position'
export type { Rotation } from '../wasm-lib/kcl/bindings/Rotation'
export type { Path } from '../wasm-lib/kcl/bindings/Path'
export type { SketchGroup } from '../wasm-lib/kcl/bindings/SketchGroup'
export type { ExtrudeGroup } from '../wasm-lib/kcl/bindings/ExtrudeGroup'

View File

@ -16,6 +16,7 @@ import { Program } from 'lang/wasm'
import {
doesPipeHaveCallExp,
getNodeFromPath,
hasSketchPipeBeenExtruded,
isSingleCursorInPipe,
} from 'lang/queryAst'
import { CommandArgument } from './commandTypes'
@ -387,6 +388,7 @@ export function canExtrudeSelection(selection: Selections) {
)
return (
!!isSketchPipe(selection) &&
commonNodes.every((n) => !hasSketchPipeBeenExtruded(n.selection, n.ast)) &&
commonNodes.every((n) => nodeHasClose(n)) &&
commonNodes.every((n) => !nodeHasExtrude(n))
)

View File

@ -169,7 +169,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -180,7 +180,7 @@ checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -197,7 +197,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -437,7 +437,7 @@ dependencies = [
"heck 0.5.0",
"proc-macro2",
"quote",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -635,7 +635,7 @@ dependencies = [
"proc-macro2",
"quote",
"strsim 0.10.0",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -646,7 +646,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f"
dependencies = [
"darling_core",
"quote",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -687,7 +687,7 @@ checksum = "4078275de501a61ceb9e759d37bdd3d7210e654dbc167ac1a3678ef4435ed57b"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.66",
"syn 2.0.67",
"synstructure",
]
@ -716,7 +716,7 @@ dependencies = [
"rustfmt-wrapper",
"serde",
"serde_tokenstream",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -727,7 +727,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -754,7 +754,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -926,7 +926,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -1016,7 +1016,7 @@ dependencies = [
"inflections",
"proc-macro2",
"quote",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -1375,7 +1375,7 @@ dependencies = [
[[package]]
name = "kcl-lib"
version = "0.1.60"
version = "0.1.62"
dependencies = [
"anyhow",
"approx",
@ -1438,7 +1438,7 @@ dependencies = [
"pretty_assertions",
"proc-macro2",
"quote",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -1814,7 +1814,7 @@ dependencies = [
"regex",
"regex-syntax 0.8.3",
"structmeta",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -1867,7 +1867,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -1977,9 +1977,9 @@ dependencies = [
[[package]]
name = "proc-macro2"
version = "1.0.85"
version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23"
checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
dependencies = [
"unicode-ident",
]
@ -2031,7 +2031,7 @@ dependencies = [
"proc-macro2",
"pyo3-macros-backend",
"quote",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -2044,7 +2044,7 @@ dependencies = [
"proc-macro2",
"pyo3-build-config",
"quote",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -2506,7 +2506,7 @@ dependencies = [
"proc-macro2",
"quote",
"serde_derive_internals",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -2580,7 +2580,7 @@ checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -2591,7 +2591,7 @@ checksum = "330f01ce65a3a5fe59a60c82f3c9a024b573b8a6e875bd233fe5f934e71d54e3"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -2614,7 +2614,7 @@ checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -2635,7 +2635,7 @@ dependencies = [
"proc-macro2",
"quote",
"serde",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -2772,7 +2772,7 @@ dependencies = [
"proc-macro2",
"quote",
"structmeta-derive",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -2783,7 +2783,7 @@ checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -2827,9 +2827,9 @@ dependencies = [
[[package]]
name = "syn"
version = "2.0.66"
version = "2.0.67"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5"
checksum = "ff8655ed1d86f3af4ee3fd3263786bc14245ad17c4c7e85ba7187fb3ae028c90"
dependencies = [
"proc-macro2",
"quote",
@ -2850,7 +2850,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -2933,7 +2933,7 @@ checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -3029,7 +3029,7 @@ checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -3182,7 +3182,7 @@ checksum = "84fd902d4e0b9a4b27f2f440108dc034e1758628a9b702f8ec61ad66355422fa"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -3210,7 +3210,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -3287,7 +3287,7 @@ checksum = "cbdee324e50a7402416d9c25270d3df4241ed528af5d36dda18b6f219551c577"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.66",
"syn 2.0.67",
"termcolor",
]
@ -3446,7 +3446,7 @@ dependencies = [
"proc-macro-error",
"proc-macro2",
"quote",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]
@ -3507,7 +3507,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
"syn 2.0.66",
"syn 2.0.67",
"wasm-bindgen-shared",
]
@ -3542,7 +3542,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.66",
"syn 2.0.67",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@ -3867,7 +3867,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.66",
"syn 2.0.67",
]
[[package]]

View File

@ -20,7 +20,7 @@ quote = "1"
regex = "1.10"
serde = { version = "1.0.203", features = ["derive"] }
serde_tokenstream = "0.2"
syn = { version = "2.0.66", features = ["full"] }
syn = { version = "2.0.67", features = ["full"] }
[dev-dependencies]
anyhow = "1.0.86"

View File

@ -15,7 +15,7 @@ databake = "0.1.8"
kcl-lib = { path = "../kcl" }
proc-macro2 = "1"
quote = "1"
syn = { version = "2.0.66", features = ["full"] }
syn = { version = "2.0.67", features = ["full"] }
[dev-dependencies]
pretty_assertions = "1.4.0"

View File

@ -1,12 +1,14 @@
[package]
name = "kcl-test-server"
description = "A test server for KCL"
version = "0.1.0"
edition = "2021"
license = "MIT"
[dependencies]
anyhow = "1.0.86"
hyper = { version = "0.14.29", features = ["server"] }
kcl-lib = { path = "../kcl" }
kcl-lib = { version = "0.1.62", path = "../kcl" }
pico-args = "0.5.0"
serde = { version = "1.0.203", features = ["derive"] }
serde_json = "1.0.117"

View File

@ -1,7 +1,7 @@
[package]
name = "kcl-lib"
description = "KittyCAD Language implementation and tools"
version = "0.1.60"
version = "0.1.62"
edition = "2021"
license = "MIT"
repository = "https://github.com/KittyCAD/modeling-app"

View File

@ -153,6 +153,34 @@ pub enum MemoryItem {
},
}
impl MemoryItem {
pub fn get_sketch_group_set(&self) -> Result<SketchGroupSet> {
match self {
MemoryItem::SketchGroup(s) => Ok(SketchGroupSet::SketchGroup(s.clone())),
MemoryItem::SketchGroups { value } => Ok(SketchGroupSet::SketchGroups(value.clone())),
MemoryItem::UserVal(value) => {
let sg: Vec<Box<SketchGroup>> = serde_json::from_value(value.value.clone())
.map_err(|e| anyhow::anyhow!("Failed to deserialize array of sketch groups from JSON: {}", e))?;
Ok(SketchGroupSet::SketchGroups(sg.clone()))
}
_ => anyhow::bail!("Not a sketch group or sketch groups: {:?}", self),
}
}
pub fn get_extrude_group_set(&self) -> Result<ExtrudeGroupSet> {
match self {
MemoryItem::ExtrudeGroup(e) => Ok(ExtrudeGroupSet::ExtrudeGroup(e.clone())),
MemoryItem::ExtrudeGroups { value } => Ok(ExtrudeGroupSet::ExtrudeGroups(value.clone())),
MemoryItem::UserVal(value) => {
let eg: Vec<Box<ExtrudeGroup>> = serde_json::from_value(value.value.clone())
.map_err(|e| anyhow::anyhow!("Failed to deserialize array of extrude groups from JSON: {}", e))?;
Ok(ExtrudeGroupSet::ExtrudeGroups(eg.clone()))
}
_ => anyhow::bail!("Not a extrude group or extrude groups: {:?}", self),
}
}
}
/// A geometry.
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
#[ts(export)]
@ -261,8 +289,6 @@ pub struct Face {
pub y_axis: Point3d,
/// The z-axis (normal).
pub z_axis: Point3d,
/// the face id the sketch is on
pub face_id: uuid::Uuid,
#[serde(rename = "__meta")]
pub meta: Vec<Metadata>,
}
@ -428,18 +454,6 @@ pub struct SketchGroup {
pub on: SketchSurface,
/// The starting path.
pub start: BasePath,
/// The position of the sketch group.
pub position: Position,
/// The rotation of the sketch group base plane.
pub rotation: Rotation,
/// The x-axis of the sketch group base plane in the 3D space
pub x_axis: Point3d,
/// The y-axis of the sketch group base plane in the 3D space
pub y_axis: Point3d,
/// The z-axis of the sketch group base plane in the 3D space
pub z_axis: Point3d,
/// The plane id or face id of the sketch group.
pub entity_id: Option<uuid::Uuid>,
/// Metadata.
#[serde(rename = "__meta")]
pub meta: Vec<Metadata>,
@ -560,10 +574,6 @@ pub struct ExtrudeGroup {
pub sketch_group_values: Vec<Path>,
/// The height of the extrude group.
pub height: f64,
/// The position of the extrude group.
pub position: Position,
/// The rotation of the extrude group.
pub rotation: Rotation,
/// The x-axis of the extrude group base plane in the 3D space
pub x_axis: Point3d,
/// The y-axis of the extrude group base plane in the 3D space
@ -598,24 +608,6 @@ pub enum BodyType {
Block,
}
#[derive(Debug, Deserialize, Serialize, PartialEq, Copy, Clone, ts_rs::TS, JsonSchema)]
#[ts(export)]
pub struct Position(#[ts(type = "[number, number, number]")] pub [f64; 3]);
impl From<Position> for Point3d {
fn from(p: Position) -> Self {
Self {
x: p.0[0],
y: p.0[1],
z: p.0[2],
}
}
}
#[derive(Debug, Deserialize, Serialize, PartialEq, Copy, Clone, ts_rs::TS, JsonSchema)]
#[ts(export)]
pub struct Rotation(#[ts(type = "[number, number, number, number]")] pub [f64; 4]);
#[derive(Debug, Default, Deserialize, Serialize, PartialEq, Copy, Clone, ts_rs::TS, JsonSchema, Hash, Eq)]
#[cfg_attr(feature = "pyo3", pyo3::pyclass)]
#[ts(export)]
@ -645,7 +637,7 @@ impl SourceRange {
pub fn start_to_lsp_position(&self, code: &str) -> LspPosition {
// Calculate the line and column of the error from the source range.
// Lines are zero indexed in vscode so we need to subtract 1.
let mut line = code[..self.start()].lines().count();
let mut line = code.get(..self.start()).unwrap_or_default().lines().count();
if line > 0 {
line = line.saturating_sub(1);
}
@ -658,7 +650,7 @@ impl SourceRange {
}
pub fn end_to_lsp_position(&self, code: &str) -> LspPosition {
let lines = code[..self.end()].lines();
let lines = code.get(..self.end()).unwrap_or_default().lines();
if lines.clone().count() == 0 {
return LspPosition { line: 0, character: 0 };
}
@ -896,10 +888,6 @@ pub enum ExtrudeSurface {
#[ts(export)]
#[serde(rename_all = "camelCase")]
pub struct ExtrudePlane {
/// The position.
pub position: Position,
/// The rotation.
pub rotation: Rotation,
/// The face id for the extrude plane.
pub face_id: uuid::Uuid,
/// The name.
@ -914,10 +902,6 @@ pub struct ExtrudePlane {
#[ts(export)]
#[serde(rename_all = "camelCase")]
pub struct ExtrudeArc {
/// The position.
pub position: Position,
/// The rotation.
pub rotation: Rotation,
/// The face id for the extrude plane.
pub face_id: uuid::Uuid,
/// The name.
@ -941,20 +925,6 @@ impl ExtrudeSurface {
ExtrudeSurface::ExtrudeArc(ea) => ea.name.to_string(),
}
}
pub fn get_position(&self) -> Position {
match self {
ExtrudeSurface::ExtrudePlane(ep) => ep.position,
ExtrudeSurface::ExtrudeArc(ea) => ea.position,
}
}
pub fn get_rotation(&self) -> Rotation {
match self {
ExtrudeSurface::ExtrudePlane(ep) => ep.rotation,
ExtrudeSurface::ExtrudeArc(ea) => ea.rotation,
}
}
}
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]

View File

@ -3,6 +3,7 @@
//! KCL is written in Rust. This crate contains the compiler tooling (e.g. parser, lexer, code generation),
//! the standard library implementation, a LSP implementation, generator for the docs, and more.
#![recursion_limit = "1024"]
#![allow(clippy::boxed_local)]
macro_rules! println {
($($rest:tt)*) => {

View File

@ -150,7 +150,7 @@ pub(crate) async fn do_post_extrude(
let mut sketch_group = *sketch_group.clone();
// If we were sketching on a face, we need the original face id.
if let SketchSurface::Face(face) = sketch_group.on {
if let SketchSurface::Face(ref face) = sketch_group.on {
sketch_group.id = face.sketch_group_id;
}
@ -198,8 +198,6 @@ pub(crate) async fn do_post_extrude(
match path {
Path::TangentialArc { .. } | Path::TangentialArcTo { .. } => {
let extrude_surface = ExtrudeSurface::ExtrudeArc(crate::executor::ExtrudeArc {
position: sketch_group.position, // TODO should be for the extrude surface
rotation: sketch_group.rotation, // TODO should be for the extrude surface
face_id: *actual_face_id,
name: path.get_base().name.clone(),
geo_meta: GeoMeta {
@ -211,8 +209,6 @@ pub(crate) async fn do_post_extrude(
}
Path::Base { .. } | Path::ToPoint { .. } | Path::Horizontal { .. } | Path::AngledLineTo { .. } => {
let extrude_surface = ExtrudeSurface::ExtrudePlane(crate::executor::ExtrudePlane {
position: sketch_group.position, // TODO should be for the extrude surface
rotation: sketch_group.rotation, // TODO should be for the extrude surface
face_id: *actual_face_id,
name: path.get_base().name.clone(),
geo_meta: GeoMeta {
@ -226,8 +222,6 @@ pub(crate) async fn do_post_extrude(
} else if args.ctx.is_mock {
// Only pre-populate the extrude surface if we are in mock mode.
new_value.push(ExtrudeSurface::ExtrudePlane(crate::executor::ExtrudePlane {
position: sketch_group.position, // TODO should be for the extrude surface
rotation: sketch_group.rotation, // TODO should be for the extrude surface
// pushing this values with a fake face_id to make extrudes mock-execute safe
face_id: Uuid::new_v4(),
name: path.get_base().name.clone(),
@ -247,11 +241,9 @@ pub(crate) async fn do_post_extrude(
value: new_value,
sketch_group_values: sketch_group.value.clone(),
height: length,
position: sketch_group.position,
rotation: sketch_group.rotation,
x_axis: sketch_group.x_axis,
y_axis: sketch_group.y_axis,
z_axis: sketch_group.z_axis,
x_axis: sketch_group.on.x_axis(),
y_axis: sketch_group.on.y_axis(),
z_axis: sketch_group.on.z_axis(),
start_cap_id,
end_cap_id,
meta: sketch_group.meta,

View File

@ -437,18 +437,14 @@ impl Args {
})
})?;
let sketch_set = if let MemoryItem::SketchGroup(sg) = first_value {
SketchGroupSet::SketchGroup(sg.clone())
} else if let MemoryItem::SketchGroups { value } = first_value {
SketchGroupSet::SketchGroups(value.clone())
} else {
return Err(KclError::Type(KclErrorDetails {
message: format!(
"Expected a SketchGroup or Vector of SketchGroups as the first argument, found `{:?}`",
self.args
),
source_ranges: vec![self.source_range],
}));
let sketch_set = match first_value.get_sketch_group_set() {
Ok(set) => set,
Err(err) => {
return Err(KclError::Type(KclErrorDetails {
message: format!("Expected an SketchGroupSet as the first argument: {}", err),
source_ranges: vec![self.source_range],
}))
}
};
let second_value = self.args.get(1).ok_or_else(|| {
@ -672,18 +668,14 @@ impl Args {
})
})?;
let sketch_set = if let MemoryItem::SketchGroup(sg) = second_value {
SketchGroupSet::SketchGroup(sg.clone())
} else if let MemoryItem::SketchGroups { value } = second_value {
SketchGroupSet::SketchGroups(value.clone())
} else {
return Err(KclError::Type(KclErrorDetails {
message: format!(
"Expected a SketchGroup or Vector of SketchGroups as the second argument, found `{:?}`",
self.args
),
source_ranges: vec![self.source_range],
}));
let sketch_set = match second_value.get_sketch_group_set() {
Ok(set) => set,
Err(err) => {
return Err(KclError::Type(KclErrorDetails {
message: format!("Expected an SketchGroupSet as the second argument: {}", err),
source_ranges: vec![self.source_range],
}))
}
};
Ok((data, sketch_set))
@ -813,18 +805,14 @@ impl Args {
})
})?;
let extrude_set = if let MemoryItem::ExtrudeGroup(eg) = second_value {
ExtrudeGroupSet::ExtrudeGroup(eg.clone())
} else if let MemoryItem::ExtrudeGroups { value } = second_value {
ExtrudeGroupSet::ExtrudeGroups(value.clone())
} else {
return Err(KclError::Type(KclErrorDetails {
message: format!(
"Expected a ExtrudeGroup or Vector of ExtrudeGroups as the second argument, found `{:?}`",
self.args
),
source_ranges: vec![self.source_range],
}));
let extrude_set = match second_value.get_extrude_group_set() {
Ok(set) => set,
Err(err) => {
return Err(KclError::Type(KclErrorDetails {
message: format!("Expected an ExtrudeGroupSet as the second argument: {}", err),
source_ranges: vec![self.source_range],
}))
}
};
Ok((data, extrude_set))
@ -953,18 +941,14 @@ impl Args {
})
})?;
let sketch_set = if let MemoryItem::SketchGroup(sg) = second_value {
SketchGroupSet::SketchGroup(sg.clone())
} else if let MemoryItem::SketchGroups { value } = second_value {
SketchGroupSet::SketchGroups(value.clone())
} else {
return Err(KclError::Type(KclErrorDetails {
message: format!(
"Expected a SketchGroup or Vector of SketchGroups as the second argument, found `{:?}`",
self.args
),
source_ranges: vec![self.source_range],
}));
let sketch_set = match second_value.get_sketch_group_set() {
Ok(set) => set,
Err(err) => {
return Err(KclError::Type(KclErrorDetails {
message: format!("Expected an SketchGroupSet as the second argument: {}", err),
source_ranges: vec![self.source_range],
}))
}
};
Ok((number, sketch_set))

View File

@ -11,7 +11,7 @@ use crate::{
errors::{KclError, KclErrorDetails},
executor::{
BasePath, ExtrudeGroup, ExtrudeSurface, Face, GeoMeta, MemoryItem, Path, Plane, PlaneType, Point2d, Point3d,
Position, Rotation, SketchGroup, SketchGroupSet, SketchSurface, SourceRange, UserVal,
SketchGroup, SketchGroupSet, SketchSurface, SourceRange, UserVal,
},
std::{
utils::{
@ -1069,22 +1069,8 @@ async fn start_sketch_on_face(
})?,
};
// Enter sketch mode on the face.
let id = uuid::Uuid::new_v4();
args.batch_modeling_cmd(
id,
ModelingCmd::EnableSketchMode {
animated: false,
ortho: false,
entity_id: extrude_plane_id,
adjust_camera: false,
planar_normal: None,
},
)
.await?;
Ok(Box::new(Face {
id,
id: extrude_plane_id,
value: tag.to_string(),
sketch_group_id: extrude_group.id,
// TODO: get this from the extrude plane data.
@ -1092,7 +1078,6 @@ async fn start_sketch_on_face(
y_axis: extrude_group.y_axis,
z_axis: extrude_group.z_axis,
meta: vec![args.source_range.into()],
face_id: extrude_plane_id,
}))
}
@ -1134,20 +1119,6 @@ async fn start_sketch_on_plane(data: PlaneData, args: Args) -> Result<Box<Plane>
}
};
// Enter sketch mode on the plane.
args.batch_modeling_cmd(
uuid::Uuid::new_v4(),
ModelingCmd::EnableSketchMode {
animated: false,
ortho: false,
entity_id: plane.id,
// We pass in the normal for the plane here.
planar_normal: Some(plane.z_axis.clone().into()),
adjust_camera: false,
},
)
.await?;
Ok(Box::new(plane))
}
@ -1202,6 +1173,26 @@ pub(crate) async fn inner_start_profile_at(
tag: Option<String>,
args: Args,
) -> Result<Box<SketchGroup>, KclError> {
// Enter sketch mode on the surface.
// We call this here so you can reuse the sketch surface for multiple sketches.
let id = uuid::Uuid::new_v4();
args.batch_modeling_cmd(
id,
ModelingCmd::EnableSketchMode {
animated: false,
ortho: false,
entity_id: sketch_surface.id(),
adjust_camera: false,
planar_normal: if let SketchSurface::Plane(plane) = &sketch_surface {
// We pass in the normal for the plane here.
Some(plane.z_axis.clone().into())
} else {
None
},
},
)
.await?;
let id = uuid::Uuid::new_v4();
let path_id = uuid::Uuid::new_v4();
@ -1232,12 +1223,6 @@ pub(crate) async fn inner_start_profile_at(
let sketch_group = SketchGroup {
id: path_id,
on: sketch_surface.clone(),
position: Position([0.0, 0.0, 0.0]),
rotation: Rotation([0.0, 0.0, 0.0, 1.0]),
x_axis: sketch_surface.x_axis(),
y_axis: sketch_surface.y_axis(),
z_axis: sketch_surface.z_axis(),
entity_id: Some(sketch_surface.id()),
value: vec![],
start: current_path,
meta: vec![args.source_range.into()],

View File

@ -2009,3 +2009,68 @@ const pattn2 = patternCircular3d({axis: [0,0, 1], center: [-20, -20, -20], repet
let result = execute_and_snapshot(code, UnitLength::Mm).await.unwrap();
twenty_twenty::assert_image("tests/executor/outputs/circular_pattern3d_a_pattern.png", &result, 1.0);
}
#[tokio::test(flavor = "multi_thread")]
async fn serial_test_array_of_sketches() {
let code = r#"const plane001 = startSketchOn('XZ')
const profile001 = plane001
|> startProfileAt([40.82, 240.82], %)
|> line([235.72, -8.16], %)
|> line([13.27, -253.07], %)
|> line([-247.97, -19.39], %)
|> lineTo([profileStartX(%), profileStartY(%)], %)
|> close(%)
const profile002 = plane001
|> startProfileAt([47.17, -71.91], %)
|> line([247.96, -4.03], %)
|> line([-17.26, -116.79], %)
|> line([-235.87, 12.66], %)
|> lineTo([profileStartX(%), profileStartY(%)], %)
|> close(%)
const sketch001 = [profile001, profile002]
extrude(10, sketch001)
"#;
let result = execute_and_snapshot(code, UnitLength::Mm).await.unwrap();
twenty_twenty::assert_image("tests/executor/outputs/array_of_sketches.png", &result, 1.0);
}
#[tokio::test(flavor = "multi_thread")]
async fn serial_test_circular_pattern3d_array_of_extrudes() {
let code = r#"const plane001 = startSketchOn('XZ')
const sketch001 = plane001
|> startProfileAt([40.82, 240.82], %)
|> line([235.72, -8.16], %)
|> line([13.27, -253.07], %)
|> line([-247.97, -19.39], %)
|> lineTo([profileStartX(%), profileStartY(%)], %)
|> close(%)
|> extrude(10, %)
const sketch002 = plane001
|> startProfileAt([47.17, -71.91], %)
|> line([247.96, -4.03], %)
|> line([-17.26, -116.79], %)
|> line([-235.87, 12.66], %)
|> lineTo([profileStartX(%), profileStartY(%)], %)
|> close(%)
|> extrude(10, %)
let extrudes = [sketch001, sketch002]
const pattn1 = patternLinear3d({
axis: [0, 1, 0],
repetitions: 2,
distance: 20
}, extrudes)
"#;
let result = execute_and_snapshot(code, UnitLength::Mm).await.unwrap();
twenty_twenty::assert_image("tests/executor/outputs/pattern3d_array_of_extrudes.png", &result, 1.0);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB