Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patterns 2d 3d #1701

Merged
merged 5 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12,451 changes: 6,233 additions & 6,218 deletions docs/kcl/std.json

Large diffs are not rendered by default.

130 changes: 90 additions & 40 deletions docs/kcl/std.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@
* [`log2`](#log2)
* [`max`](#max)
* [`min`](#min)
* [`patternCircular`](#patternCircular)
* [`patternLinear`](#patternLinear)
* [`patternCircular2d`](#patternCircular2d)
* [`patternCircular3d`](#patternCircular3d)
* [`patternLinear2d`](#patternLinear2d)
* [`patternLinear3d`](#patternLinear3d)
* [`pi`](#pi)
* [`pow`](#pow)
* [`segAng`](#segAng)
Expand Down Expand Up @@ -7170,34 +7172,32 @@ min(args: [number]) -> number



### patternCircular
### patternCircular2d

A Circular pattern.
A circular pattern on a 2D sketch.



```
patternCircular(data: CircularPatternData, geometry: Geometry) -> Geometries
patternCircular2d(data: CircularPattern2dData, sketch_group: SketchGroup) -> [SketchGroup]
```

#### Arguments

* `data`: `CircularPatternData` - Data for a circular pattern. (REQUIRED)
* `data`: `CircularPattern2dData` - Data for a circular pattern on a 2D sketch. (REQUIRED)
```
{
// The arc angle (in degrees) to place the repetitions. Must be greater than 0.
arcDegrees: number,
// The axis around which to make the pattern. This is a 2D vector.
axis: [number, number],
// The center about which to make th pattern. This is a 3D vector.
center: [number, number, number],
// The center about which to make th pattern. This is a 2D vector.
center: [number, number],
// The number of repetitions. Must be greater than 0. This excludes the original entity. For example, if `repetitions` is 1, the original entity will be copied once.
repetitions: number,
// Whether or not to rotate the duplicates as they are copied.
rotateDuplicates: string,
}
```
* `geometry`: `Geometry` - A geometry. (REQUIRED)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```
{
// The plane id or face id of the sketch group.
Expand Down Expand Up @@ -7276,7 +7276,6 @@ patternCircular(data: CircularPatternData, geometry: Geometry) -> Geometries
// The to point.
to: [number, number],
},
type: "SketchGroup",
// The paths in the sketch group.
value: [{
// The from point.
Expand Down Expand Up @@ -7360,7 +7359,44 @@ patternCircular(data: CircularPatternData, geometry: Geometry) -> Geometries
y: number,
z: number,
},
} |
}
```

#### Returns

* `[SketchGroup]`



### patternCircular3d

A circular pattern on a 3D model.



```
patternCircular3d(data: CircularPattern3dData, extrude_group: ExtrudeGroup) -> [ExtrudeGroup]
```

#### Arguments

* `data`: `CircularPattern3dData` - Data for a circular pattern on a 3D model. (REQUIRED)
```
{
// The arc angle (in degrees) to place the repetitions. Must be greater than 0.
arcDegrees: number,
// The axis around which to make the pattern. This is a 3D vector.
axis: [number, number, number],
// The center about which to make th pattern. This is a 3D vector.
center: [number, number, number],
// The number of repetitions. Must be greater than 0. This excludes the original entity. For example, if `repetitions` is 1, the original entity will be copied once.
repetitions: number,
// Whether or not to rotate the duplicates as they are copied.
rotateDuplicates: string,
}
```
* `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED)
```
{
// The id of the extrusion end cap
endCapId: uuid,
Expand Down Expand Up @@ -7439,7 +7475,6 @@ patternCircular(data: CircularPatternData, geometry: Geometry) -> Geometries
}],
// The id of the extrusion start cap
startCapId: uuid,
type: "ExtrudeGroup",
// The extrude surfaces.
value: [{
// The face id for the extrude plane.
Expand Down Expand Up @@ -7494,31 +7529,23 @@ patternCircular(data: CircularPatternData, geometry: Geometry) -> Geometries

#### Returns

* `Geometries` - A set of geometry.
```
{
type: "SketchGroups",
} |
{
type: "ExtrudeGroups",
}
```
* `[ExtrudeGroup]`



### patternLinear
### patternLinear2d

A linear pattern.
A linear pattern on a 2D sketch.



```
patternLinear(data: LinearPatternData, geometry: Geometry) -> Geometries
patternLinear2d(data: LinearPattern2dData, sketch_group: SketchGroup) -> [SketchGroup]
```

#### Arguments

* `data`: `LinearPatternData` - Data for a linear pattern. (REQUIRED)
* `data`: `LinearPattern2dData` - Data for a linear pattern on a 2D sketch. (REQUIRED)
```
{
// The axis of the pattern. This is a 2D vector.
Expand All @@ -7529,7 +7556,7 @@ patternLinear(data: LinearPatternData, geometry: Geometry) -> Geometries
repetitions: number,
}
```
* `geometry`: `Geometry` - A geometry. (REQUIRED)
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
```
{
// The plane id or face id of the sketch group.
Expand Down Expand Up @@ -7608,7 +7635,6 @@ patternLinear(data: LinearPatternData, geometry: Geometry) -> Geometries
// The to point.
to: [number, number],
},
type: "SketchGroup",
// The paths in the sketch group.
value: [{
// The from point.
Expand Down Expand Up @@ -7692,7 +7718,40 @@ patternLinear(data: LinearPatternData, geometry: Geometry) -> Geometries
y: number,
z: number,
},
} |
}
```

#### Returns

* `[SketchGroup]`



### patternLinear3d

A linear pattern on a 3D model.



```
patternLinear3d(data: LinearPattern3dData, extrude_group: ExtrudeGroup) -> [ExtrudeGroup]
```

#### Arguments

* `data`: `LinearPattern3dData` - Data for a linear pattern on a 3D model. (REQUIRED)
```
{
// The axis of the pattern.
axis: [number, number, number],
// The distance between each repetition. This can also be referred to as spacing.
distance: number,
// The number of repetitions. Must be greater than 0. This excludes the original entity. For example, if `repetitions` is 1, the original entity will be copied once.
repetitions: number,
}
```
* `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED)
```
{
// The id of the extrusion end cap
endCapId: uuid,
Expand Down Expand Up @@ -7771,7 +7830,6 @@ patternLinear(data: LinearPatternData, geometry: Geometry) -> Geometries
}],
// The id of the extrusion start cap
startCapId: uuid,
type: "ExtrudeGroup",
// The extrude surfaces.
value: [{
// The face id for the extrude plane.
Expand Down Expand Up @@ -7826,15 +7884,7 @@ patternLinear(data: LinearPatternData, geometry: Geometry) -> Geometries

#### Returns

* `Geometries` - A set of geometry.
```
{
type: "SketchGroups",
} |
{
type: "ExtrudeGroups",
}
```
* `[ExtrudeGroup]`



Expand Down
20 changes: 2 additions & 18 deletions src/wasm-lib/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/wasm-lib/derive-docs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "derive-docs"
description = "A tool for generating documentation from Rust derive macros"
version = "0.1.9"
version = "0.1.10"
edition = "2021"
license = "MIT"
repository = "https://github.com/KittyCAD/modeling-app"
Expand Down
Loading
Loading