Compare commits
36 Commits
kcl-64
...
achalmers/
Author | SHA1 | Date | |
---|---|---|---|
1a912f58a6 | |||
320740cfb7 | |||
f1fdf48834 | |||
bae875382c | |||
14ce66bcc1 | |||
644c561815 | |||
5f31f3a6b3 | |||
a0afe9dd0e | |||
9c29756a38 | |||
bf63b21d74 | |||
0ea0d1703e | |||
29b8a442c2 | |||
844f229b5a | |||
fa51b4bbbc | |||
1fa6e1eccc | |||
44b810ee0a | |||
a9998be176 | |||
5e200aebcc | |||
e0cd3efc64 | |||
77e3efde9a | |||
a173a82d59 | |||
4d2bc18c2f | |||
aca5fdb521 | |||
8867258e47 | |||
f6cb725268 | |||
1bd570ceb9 | |||
1c87298b44 | |||
3a23ec1bee | |||
d96a4d3337 | |||
94452cce88 | |||
2e754f2a11 | |||
719136937e | |||
e207552255 | |||
1835e49191 | |||
145c28bbd5 | |||
a58a3361b6 |
77
.github/workflows/cargo-test.yml
vendored
77
.github/workflows/cargo-test.yml
vendored
@ -13,11 +13,11 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
name: cargo test
|
||||
jobs:
|
||||
cargotest:
|
||||
name: cargo test
|
||||
build-test-artifacts:
|
||||
name: Build test artifacts
|
||||
runs-on:
|
||||
- runs-on=${{ github.run_id }}
|
||||
- runner=32cpu-linux-x64
|
||||
- runner=8cpu-linux-x64
|
||||
- extras=s3-cache
|
||||
steps:
|
||||
- uses: runs-on/action@v1
|
||||
@ -43,7 +43,6 @@ jobs:
|
||||
env:
|
||||
GH_ACTIONS_AXIOM_TOKEN: ${{ secrets.GH_ACTIONS_AXIOM_TOKEN }}
|
||||
OS_NAME: ${{ env.OS_NAME }}
|
||||
- uses: taiki-e/install-action@cargo-llvm-cov
|
||||
- uses: taiki-e/install-action@nextest
|
||||
- name: Install just
|
||||
uses: taiki-e/install-action@just
|
||||
@ -121,21 +120,67 @@ jobs:
|
||||
# Configure nextest when it's run by insta (via just).
|
||||
NEXTEST_PROFILE: ci
|
||||
RUST_BACKTRACE: full
|
||||
- name: cargo test
|
||||
if: steps.path-changes.outputs.outside-kcl-samples == 'true'
|
||||
- name: Build and archive tests
|
||||
run: |
|
||||
cd rust
|
||||
cargo nextest archive --workspace --features artifact-graph --archive-file nextest-archive.tar.zst
|
||||
- name: Upload archive to workflow
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: nextest-archive
|
||||
path: rust/nextest-archive.tar.zst
|
||||
|
||||
run-test-artifacts:
|
||||
name: cargo test (shard ${{ matrix.partitionIndex}})
|
||||
runs-on:
|
||||
- runs-on=${{ github.run_id }}
|
||||
- runner=32cpu-linux-x64
|
||||
- extras=s3-cache
|
||||
needs: build-test-artifacts
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
partitionIndex: [1, 2, 3, 4, 5, 6]
|
||||
partitionTotal: [6]
|
||||
steps:
|
||||
- uses: runs-on/action@v1
|
||||
- uses: actions/create-github-app-token@v1
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ secrets.MODELING_APP_GH_APP_ID }}
|
||||
private-key: ${{ secrets.MODELING_APP_GH_APP_PRIVATE_KEY }}
|
||||
owner: ${{ github.repository_owner }}
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ steps.app-token.outputs.token }}
|
||||
- name: Use correct Rust toolchain
|
||||
shell: bash
|
||||
run: |
|
||||
[ -e rust-toolchain.toml ] || cp rust/rust-toolchain.toml ./
|
||||
- name: Install rust
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
cache: false # Configured below.
|
||||
- name: Start Vector
|
||||
run: .github/ci-cd-scripts/start-vector-ubuntu.sh
|
||||
env:
|
||||
GH_ACTIONS_AXIOM_TOKEN: ${{ secrets.GH_ACTIONS_AXIOM_TOKEN }}
|
||||
OS_NAME: ${{ env.OS_NAME }}
|
||||
- uses: taiki-e/install-action@nextest
|
||||
- name: Download archive
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: nextest-archive
|
||||
- name: Run tests
|
||||
shell: bash
|
||||
run: |-
|
||||
cp nextest-archive.tar.zst rust/nextest-archive.tar.zst
|
||||
ls -lah
|
||||
cd rust
|
||||
cargo llvm-cov nextest --workspace --features artifact-graph --lcov --output-path lcov.info --retries=2 --no-fail-fast -P ci 2>&1 | tee /tmp/github-actions.log
|
||||
cargo nextest run\
|
||||
--retries=2 --no-fail-fast -P ci --archive-file nextest-archive.tar.zst \
|
||||
--partition count:${{ matrix.partitionIndex}}/${{ matrix.partitionTotal }} \
|
||||
2>&1 | tee /tmp/github-actions.log
|
||||
env:
|
||||
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
|
||||
- name: Upload to codecov.io
|
||||
if: steps.path-changes.outputs.outside-kcl-samples == 'true'
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
token: ${{secrets.CODECOV_TOKEN}}
|
||||
fail_ci_if_error: true
|
||||
flags: rust
|
||||
verbose: true
|
||||
files: lcov.info
|
||||
|
||||
|
2
.github/workflows/e2e-tests.yml
vendored
2
.github/workflows/e2e-tests.yml
vendored
@ -277,7 +277,7 @@ jobs:
|
||||
timeout-minutes: 60
|
||||
env:
|
||||
OS_NAME: ${{ contains(matrix.os, 'ubuntu') && 'ubuntu' || (contains(matrix.os, 'windows') && 'windows' || 'macos') }}
|
||||
name: playwright:electron:${{ contains(matrix.os, 'ubuntu') && 'ubuntu' || (contains(matrix.os, 'windows') && 'windows' || 'macos') }}:${{ matrix.shardIndex }}:${{ matrix.shardTotal }}
|
||||
name: playwright:electron:${{ contains(matrix.os, 'ubuntu') && 'ubuntu' || (contains(matrix.os, 'windows') && 'windows' || 'macos') }} (shard ${{ matrix.shardIndex }})
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -9,7 +9,7 @@ The value of `pi`, Archimedes’ constant (π).
|
||||
|
||||
|
||||
```js
|
||||
std::math::PI: number = 3.14159265358979323846264338327950288_
|
||||
std::math::PI: number(_?) = 3.14159265358979323846264338327950288_?
|
||||
```
|
||||
|
||||
### Examples
|
||||
@ -18,7 +18,7 @@ std::math::PI: number = 3.14159265358979323846264338327950288_
|
||||
circumference = 70
|
||||
|
||||
exampleSketch = startSketchOn(XZ)
|
||||
|> circle(center = [0, 0], radius = circumference / (2 * PI))
|
||||
|> circle(center = [0, 0], radius = (circumference / (2 * PI)): number(mm))
|
||||
|
||||
example = extrude(exampleSketch, length = 5)
|
||||
```
|
||||
|
File diff suppressed because one or more lines are too long
@ -30,24 +30,17 @@ layout: manual
|
||||
* [`Y`](kcl/consts/std-Y)
|
||||
* [`YZ`](kcl/consts/std-YZ)
|
||||
* [`Z`](kcl/consts/std-Z)
|
||||
* [`abs`](kcl/abs)
|
||||
* [`acos`](kcl/acos)
|
||||
* [`angledLine`](kcl/angledLine)
|
||||
* [`angledLineThatIntersects`](kcl/angledLineThatIntersects)
|
||||
* [`appearance`](kcl/appearance)
|
||||
* [`arc`](kcl/arc)
|
||||
* [`asin`](kcl/asin)
|
||||
* [`assert`](kcl/assert)
|
||||
* [`assertIs`](kcl/assertIs)
|
||||
* [`atan`](kcl/atan)
|
||||
* [`atan2`](kcl/atan2)
|
||||
* [`bezierCurve`](kcl/bezierCurve)
|
||||
* [`ceil`](kcl/ceil)
|
||||
* [`circleThreePoint`](kcl/circleThreePoint)
|
||||
* [`clone`](kcl/clone)
|
||||
* [`close`](kcl/close)
|
||||
* [`extrude`](kcl/extrude)
|
||||
* [`floor`](kcl/floor)
|
||||
* [`getCommonEdge`](kcl/getCommonEdge)
|
||||
* [`getNextAdjacentEdge`](kcl/getNextAdjacentEdge)
|
||||
* [`getOppositeEdge`](kcl/getOppositeEdge)
|
||||
@ -61,14 +54,8 @@ layout: manual
|
||||
* [`legAngY`](kcl/legAngY)
|
||||
* [`legLen`](kcl/legLen)
|
||||
* [`line`](kcl/line)
|
||||
* [`ln`](kcl/ln)
|
||||
* [`loft`](kcl/loft)
|
||||
* [`log`](kcl/log)
|
||||
* [`log10`](kcl/log10)
|
||||
* [`log2`](kcl/log2)
|
||||
* [`map`](kcl/map)
|
||||
* [`max`](kcl/max)
|
||||
* [`min`](kcl/min)
|
||||
* [`offsetPlane`](kcl/std-offsetPlane)
|
||||
* [`patternCircular2d`](kcl/patternCircular2d)
|
||||
* [`patternCircular3d`](kcl/patternCircular3d)
|
||||
@ -78,16 +65,13 @@ layout: manual
|
||||
* [`patternTransform2d`](kcl/patternTransform2d)
|
||||
* [`polygon`](kcl/polygon)
|
||||
* [`pop`](kcl/pop)
|
||||
* [`pow`](kcl/pow)
|
||||
* [`profileStart`](kcl/profileStart)
|
||||
* [`profileStartX`](kcl/profileStartX)
|
||||
* [`profileStartY`](kcl/profileStartY)
|
||||
* [`push`](kcl/push)
|
||||
* [`reduce`](kcl/reduce)
|
||||
* [`rem`](kcl/rem)
|
||||
* [`revolve`](kcl/std-revolve)
|
||||
* [`rotate`](kcl/rotate)
|
||||
* [`round`](kcl/round)
|
||||
* [`scale`](kcl/scale)
|
||||
* [`segAng`](kcl/segAng)
|
||||
* [`segEnd`](kcl/segEnd)
|
||||
@ -97,7 +81,6 @@ layout: manual
|
||||
* [`segStart`](kcl/segStart)
|
||||
* [`segStartX`](kcl/segStartX)
|
||||
* [`segStartY`](kcl/segStartY)
|
||||
* [`sqrt`](kcl/sqrt)
|
||||
* [`startProfile`](kcl/startProfile)
|
||||
* [`startSketchOn`](kcl/startSketchOn)
|
||||
* [`subtract`](kcl/subtract)
|
||||
@ -105,26 +88,35 @@ layout: manual
|
||||
* [`sweep`](kcl/sweep)
|
||||
* [`tangentToEnd`](kcl/tangentToEnd)
|
||||
* [`tangentialArc`](kcl/tangentialArc)
|
||||
* [`toCentimeters`](kcl/std-toCentimeters)
|
||||
* [`toDegrees`](kcl/std-toDegrees)
|
||||
* [`toFeet`](kcl/std-toFeet)
|
||||
* [`toInches`](kcl/std-toInches)
|
||||
* [`toMeters`](kcl/std-toMeters)
|
||||
* [`toMillimeters`](kcl/std-toMillimeters)
|
||||
* [`toRadians`](kcl/std-toRadians)
|
||||
* [`toYards`](kcl/std-toYards)
|
||||
* [`translate`](kcl/translate)
|
||||
* [`union`](kcl/union)
|
||||
* [`xLine`](kcl/xLine)
|
||||
* [`yLine`](kcl/yLine)
|
||||
* **std::math**
|
||||
* [`E`](kcl/consts/std-math-E)
|
||||
* [`PI`](kcl/consts/std-math-PI)
|
||||
* [`TAU`](kcl/consts/std-math-TAU)
|
||||
* [`cos`](kcl/std-math-cos)
|
||||
* [`polar`](kcl/std-math-polar)
|
||||
* [`sin`](kcl/std-math-sin)
|
||||
* [`tan`](kcl/std-math-tan)
|
||||
* [`math::E`](kcl/consts/std-math-E)
|
||||
* [`math::PI`](kcl/consts/std-math-PI)
|
||||
* [`math::TAU`](kcl/consts/std-math-TAU)
|
||||
* [`math::abs`](kcl/std-math-abs)
|
||||
* [`math::acos`](kcl/std-math-acos)
|
||||
* [`math::asin`](kcl/std-math-asin)
|
||||
* [`math::atan`](kcl/std-math-atan)
|
||||
* [`math::atan2`](kcl/std-math-atan2)
|
||||
* [`math::ceil`](kcl/std-math-ceil)
|
||||
* [`math::cos`](kcl/std-math-cos)
|
||||
* [`math::floor`](kcl/std-math-floor)
|
||||
* [`math::ln`](kcl/std-math-ln)
|
||||
* [`math::log`](kcl/std-math-log)
|
||||
* [`math::log10`](kcl/std-math-log10)
|
||||
* [`math::log2`](kcl/std-math-log2)
|
||||
* [`math::max`](kcl/std-math-max)
|
||||
* [`math::min`](kcl/std-math-min)
|
||||
* [`math::polar`](kcl/std-math-polar)
|
||||
* [`math::pow`](kcl/std-math-pow)
|
||||
* [`math::rem`](kcl/std-math-rem)
|
||||
* [`math::round`](kcl/std-math-round)
|
||||
* [`math::sin`](kcl/std-math-sin)
|
||||
* [`math::sqrt`](kcl/std-math-sqrt)
|
||||
* [`math::tan`](kcl/std-math-tan)
|
||||
* **std::sketch**
|
||||
* [`circle`](kcl/std-sketch-circle)
|
||||
* [`mirror2d`](kcl/std-sketch-mirror2d)
|
||||
@ -149,3 +141,12 @@ layout: manual
|
||||
* [`Point3d`](kcl/types/Point3d)
|
||||
* [`Sketch`](kcl/types/Sketch)
|
||||
* [`Solid`](kcl/types/Solid)
|
||||
* **std::units**
|
||||
* [`units::toCentimeters`](kcl/std-units-toCentimeters)
|
||||
* [`units::toDegrees`](kcl/std-units-toDegrees)
|
||||
* [`units::toFeet`](kcl/std-units-toFeet)
|
||||
* [`units::toInches`](kcl/std-units-toInches)
|
||||
* [`units::toMeters`](kcl/std-units-toMeters)
|
||||
* [`units::toMillimeters`](kcl/std-units-toMillimeters)
|
||||
* [`units::toRadians`](kcl/std-units-toRadians)
|
||||
* [`units::toYards`](kcl/std-units-toYards)
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -178,7 +178,7 @@ t = 0.005 // taper factor [0-1)
|
||||
// Defines how to modify each layer of the vase.
|
||||
// Each replica is shifted up the Z axis, and has a smoothly-varying radius
|
||||
fn transform(replicaId) {
|
||||
scale = r * abs(1 - (t * replicaId)) * (5 + cos(replicaId / 8: number(rad)))
|
||||
scale = r * math::abs(1 - (t * replicaId)) * (5 + math::cos((replicaId / 8): number(rad)))
|
||||
return {
|
||||
translate = [0, 0, replicaId * 10],
|
||||
scale = [scale, scale, 0]
|
||||
|
File diff suppressed because one or more lines are too long
@ -93,11 +93,14 @@ assert(
|
||||
// Declare a function that sketches a decagon.
|
||||
fn decagon(radius) {
|
||||
// Each side of the decagon is turned this many radians from the previous angle.
|
||||
stepAngle = 1 / 10 * TAU
|
||||
stepAngle = (1 / 10 * TAU): number(rad)
|
||||
|
||||
// Start the decagon sketch at this point.
|
||||
startOfDecagonSketch = startSketchOn(XY)
|
||||
|> startProfile(at = [cos(0) * radius, sin(0) * radius])
|
||||
|> startProfile(at = [
|
||||
math::cos(0) * radius,
|
||||
math::sin(0) * radius
|
||||
])
|
||||
|
||||
// Use a `reduce` to draw the remaining decagon sides.
|
||||
// For each number in the array 1..10, run the given function,
|
||||
@ -107,8 +110,8 @@ fn decagon(radius) {
|
||||
initial = startOfDecagonSketch,
|
||||
f = fn(i, partialDecagon) {
|
||||
// Draw one edge of the decagon.
|
||||
x = cos(stepAngle * i) * radius
|
||||
y = sin(stepAngle * i) * radius
|
||||
x = math::cos(stepAngle * i) * radius
|
||||
y = math::sin(stepAngle * i) * radius
|
||||
return line(partialDecagon, end = [x, y])
|
||||
},
|
||||
)
|
||||
@ -118,15 +121,15 @@ fn decagon(radius) {
|
||||
|
||||
/* The `decagon` above is basically like this pseudo-code:
|
||||
fn decagon(radius):
|
||||
stepAngle = (1/10) * TAU
|
||||
plane = startSketchOn('XY')
|
||||
startOfDecagonSketch = startProfile(plane, at = [(cos(0)*radius), (sin(0) * radius)])
|
||||
stepAngle = ((1/10) * TAU): number(rad)
|
||||
plane = startSketchOn(XY)
|
||||
startOfDecagonSketch = startProfile(plane, at = [(math::cos(0)*radius), (math::sin(0) * radius)])
|
||||
|
||||
// Here's the reduce part.
|
||||
partialDecagon = startOfDecagonSketch
|
||||
for i in [1..10]:
|
||||
x = cos(stepAngle * i) * radius
|
||||
y = sin(stepAngle * i) * radius
|
||||
x = math::cos(stepAngle * i) * radius
|
||||
y = math::sin(stepAngle * i) * radius
|
||||
partialDecagon = line(partialDecagon, end = [x, y])
|
||||
fullDecagon = partialDecagon // it's now full
|
||||
return fullDecagon */
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -108,7 +108,7 @@ springSketch = startSketchOn(XY)
|
||||
// Create a helix on a cylinder.
|
||||
|
||||
part001 = startSketchOn(XY)
|
||||
|> circle( center= [5, 5], radius= 10 )
|
||||
|> circle( center = [5, 5], radius= 10 )
|
||||
|> extrude(length = 10)
|
||||
|
||||
helix(
|
||||
|
51
docs/kcl/std-math-abs.md
Normal file
51
docs/kcl/std-math-abs.md
Normal file
File diff suppressed because one or more lines are too long
45
docs/kcl/std-math-acos.md
Normal file
45
docs/kcl/std-math-acos.md
Normal file
File diff suppressed because one or more lines are too long
44
docs/kcl/std-math-asin.md
Normal file
44
docs/kcl/std-math-asin.md
Normal file
File diff suppressed because one or more lines are too long
43
docs/kcl/std-math-atan.md
Normal file
43
docs/kcl/std-math-atan.md
Normal file
@ -0,0 +1,43 @@
|
||||
---
|
||||
title: "std::math::atan"
|
||||
excerpt: "Compute the arctangent of a number."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Compute the arctangent of a number.
|
||||
|
||||
Consider using `atan2()` instead for the true inverse of tangent.
|
||||
|
||||
```js
|
||||
atan(@num: number(_)): number(rad)
|
||||
```
|
||||
|
||||
|
||||
### Arguments
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `num` | `number(_)` | | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
`number(rad)`
|
||||
|
||||
|
||||
### Examples
|
||||
|
||||
```js
|
||||
sketch001 = startSketchOn(XZ)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> angledLine(
|
||||
angle = math::atan(1.25),
|
||||
length = 20,
|
||||
)
|
||||
|> yLine(endAbsolute = 0)
|
||||
|> close()
|
||||
|
||||
extrude001 = extrude(sketch001, length = 5)
|
||||
```
|
||||
|
||||
|
||||
|
48
docs/kcl/std-math-atan2.md
Normal file
48
docs/kcl/std-math-atan2.md
Normal file
File diff suppressed because one or more lines are too long
42
docs/kcl/std-math-ceil.md
Normal file
42
docs/kcl/std-math-ceil.md
Normal file
File diff suppressed because one or more lines are too long
@ -1,10 +1,10 @@
|
||||
---
|
||||
title: "std::math::cos"
|
||||
excerpt: "Compute the cosine of a number (in radians)."
|
||||
excerpt: "Compute the cosine of a number."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Compute the cosine of a number (in radians).
|
||||
Compute the cosine of a number.
|
||||
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ exampleSketch = startSketchOn(XZ)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> angledLine(
|
||||
angle = 30,
|
||||
length = 3 / cos(30deg),
|
||||
length = 3 / math::cos(30deg),
|
||||
)
|
||||
|> yLine(endAbsolute = 0)
|
||||
|> close()
|
||||
|
42
docs/kcl/std-math-floor.md
Normal file
42
docs/kcl/std-math-floor.md
Normal file
File diff suppressed because one or more lines are too long
42
docs/kcl/std-math-ln.md
Normal file
42
docs/kcl/std-math-ln.md
Normal file
File diff suppressed because one or more lines are too long
48
docs/kcl/std-math-log.md
Normal file
48
docs/kcl/std-math-log.md
Normal file
File diff suppressed because one or more lines are too long
42
docs/kcl/std-math-log10.md
Normal file
42
docs/kcl/std-math-log10.md
Normal file
File diff suppressed because one or more lines are too long
42
docs/kcl/std-math-log2.md
Normal file
42
docs/kcl/std-math-log2.md
Normal file
File diff suppressed because one or more lines are too long
44
docs/kcl/std-math-max.md
Normal file
44
docs/kcl/std-math-max.md
Normal file
File diff suppressed because one or more lines are too long
44
docs/kcl/std-math-min.md
Normal file
44
docs/kcl/std-math-min.md
Normal file
File diff suppressed because one or more lines are too long
@ -34,7 +34,7 @@ polar(
|
||||
```js
|
||||
exampleSketch = startSketchOn(XZ)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(end = polar(angle = 30, length = 5), tag = $thing)
|
||||
|> line(end = math::polar(angle = 30, length = 5), tag = $thing)
|
||||
|> line(end = [0, 5])
|
||||
|> line(end = [segEndX(thing), 0])
|
||||
|> line(end = [-20, 10])
|
||||
|
48
docs/kcl/std-math-pow.md
Normal file
48
docs/kcl/std-math-pow.md
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
42
docs/kcl/std-math-round.md
Normal file
42
docs/kcl/std-math-round.md
Normal file
File diff suppressed because one or more lines are too long
@ -1,10 +1,10 @@
|
||||
---
|
||||
title: "std::math::sin"
|
||||
excerpt: "Compute the sine of a number (in radians)."
|
||||
excerpt: "Compute the sine of a number."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Compute the sine of a number (in radians).
|
||||
Compute the sine of a number.
|
||||
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ exampleSketch = startSketchOn(XZ)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> angledLine(
|
||||
angle = 50,
|
||||
length = 15 / sin(135deg),
|
||||
length = 15 / math::sin(135deg),
|
||||
)
|
||||
|> yLine(endAbsolute = 0)
|
||||
|> close()
|
||||
|
44
docs/kcl/std-math-sqrt.md
Normal file
44
docs/kcl/std-math-sqrt.md
Normal file
File diff suppressed because one or more lines are too long
@ -1,10 +1,10 @@
|
||||
---
|
||||
title: "std::math::tan"
|
||||
excerpt: "Compute the tangent of a number (in radians)."
|
||||
excerpt: "Compute the tangent of a number."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Compute the tangent of a number (in radians).
|
||||
Compute the tangent of a number.
|
||||
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ exampleSketch = startSketchOn(XZ)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> angledLine(
|
||||
angle = 50,
|
||||
length = 50 * tan((1/2): number(rad)),
|
||||
length = 50 * math::tan((1/2): number(rad)),
|
||||
)
|
||||
|> yLine(endAbsolute = 0)
|
||||
|> close()
|
||||
|
@ -189,7 +189,7 @@ part001 = revolve(
|
||||
sketch001,
|
||||
axis = {
|
||||
direction = [0.0, 1.0],
|
||||
origin: [0.0, 0.0]
|
||||
origin = [0.0, 0.0]
|
||||
}
|
||||
)
|
||||
```
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: "std::toCentimeters"
|
||||
title: "std::units::toCentimeters"
|
||||
excerpt: "Convert a number to centimeters from its current units."
|
||||
layout: manual
|
||||
---
|
44
docs/kcl/std-units-toDegrees.md
Normal file
44
docs/kcl/std-units-toDegrees.md
Normal file
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: "std::toFeet"
|
||||
title: "std::units::toFeet"
|
||||
excerpt: "Convert a number to feet from its current units."
|
||||
layout: manual
|
||||
---
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: "std::toInches"
|
||||
title: "std::units::toInches"
|
||||
excerpt: "Convert a number to inches from its current units."
|
||||
layout: manual
|
||||
---
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: "std::toMeters"
|
||||
title: "std::units::toMeters"
|
||||
excerpt: "Convert a number to meters from its current units."
|
||||
layout: manual
|
||||
---
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: "std::toMillimeters"
|
||||
title: "std::units::toMillimeters"
|
||||
excerpt: "Convert a number to millimeters from its current units."
|
||||
layout: manual
|
||||
---
|
44
docs/kcl/std-units-toRadians.md
Normal file
44
docs/kcl/std-units-toRadians.md
Normal file
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: "std::toYards"
|
||||
title: "std::units::toYards"
|
||||
excerpt: "Converts a number to yards from its current units."
|
||||
layout: manual
|
||||
---
|
1308
docs/kcl/std.json
1308
docs/kcl/std.json
File diff suppressed because it is too large
Load Diff
@ -1,23 +0,0 @@
|
||||
---
|
||||
title: "AngledLineThatIntersectsData"
|
||||
excerpt: "Data for drawing an angled line that intersects with a given line."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Data for drawing an angled line that intersects with a given line.
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `angle` |`TyF64`| The angle of the line. | No |
|
||||
| `intersectTag` |[`TagIdentifier`](/docs/kcl/types#tag-identifier)| The tag of the line to intersect with. | No |
|
||||
| `offset` |`TyF64`| The offset from the intersecting line. | No |
|
||||
|
||||
|
@ -1,23 +0,0 @@
|
||||
---
|
||||
title: "AppearanceData"
|
||||
excerpt: "Data for appearance."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Data for appearance.
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `color` |`string`| Color of the new material, a hex string like "#ff0000". | No |
|
||||
| `metalness` |`number` (**maximum:** 100.0)| Metalness of the new material, a percentage like 95.7. | No |
|
||||
| `roughness` |`number` (**maximum:** 100.0)| Roughness of the new material, a percentage like 95.7. | No |
|
||||
|
||||
|
@ -1,54 +0,0 @@
|
||||
---
|
||||
title: "ArcData"
|
||||
excerpt: "Data to draw an arc."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Data to draw an arc.
|
||||
|
||||
|
||||
|
||||
|
||||
**This schema accepts any of the following:**
|
||||
|
||||
Angles and radius with an optional tag.
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `angleStart` |`TyF64`| The start angle. | No |
|
||||
| `angleEnd` |`TyF64`| The end angle. | No |
|
||||
| `radius` |`TyF64`| The radius. | No |
|
||||
|
||||
|
||||
----
|
||||
Center, to and radius with an optional tag.
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `center` |`[, `TyF64`, `TyF64`]`| The center. | No |
|
||||
| `to` |`[, `TyF64`, `TyF64`]`| The to point. | No |
|
||||
| `radius` |`TyF64`| The radius. | No |
|
||||
|
||||
|
||||
----
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,22 +0,0 @@
|
||||
---
|
||||
title: "ArcToData"
|
||||
excerpt: "Data to draw a three point arc (arcTo)."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Data to draw a three point arc (arcTo).
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `end` |`[, `TyF64`, `TyF64`]`| End point of the arc. A point in 3D space | No |
|
||||
| `interior` |`[, `TyF64`, `TyF64`]`| Interior point of the arc. A point in 3D space | No |
|
||||
|
||||
|
@ -1,46 +0,0 @@
|
||||
---
|
||||
title: "Axis"
|
||||
excerpt: "Co-ordinate axis specifier."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Co-ordinate axis specifier.
|
||||
|
||||
See [cglearn.eu] for background reading.
|
||||
|
||||
[cglearn.eu]: https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
**This schema accepts exactly one of the following:**
|
||||
|
||||
'Y' axis.
|
||||
|
||||
**enum:** `y`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----
|
||||
'Z' axis.
|
||||
|
||||
**enum:** `z`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----
|
||||
|
||||
|
||||
|
||||
|
@ -1,42 +0,0 @@
|
||||
---
|
||||
title: "Axis2dOrEdgeReference"
|
||||
excerpt: "A 2D axis or tagged edge."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
A 2D axis or tagged edge.
|
||||
|
||||
|
||||
|
||||
|
||||
**This schema accepts any of the following:**
|
||||
|
||||
2D axis and origin.
|
||||
|
||||
[`AxisAndOrigin2d`](/docs/kcl/types/AxisAndOrigin2d)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----
|
||||
Tagged edge.
|
||||
|
||||
[`EdgeReference`](/docs/kcl/types/EdgeReference)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,42 +0,0 @@
|
||||
---
|
||||
title: "Axis3dOrEdgeReference"
|
||||
excerpt: "A 3D axis or tagged edge."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
A 3D axis or tagged edge.
|
||||
|
||||
|
||||
|
||||
|
||||
**This schema accepts any of the following:**
|
||||
|
||||
3D axis and origin.
|
||||
|
||||
[`AxisAndOrigin3d`](/docs/kcl/types/AxisAndOrigin3d)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----
|
||||
Tagged edge.
|
||||
|
||||
[`EdgeReference`](/docs/kcl/types/EdgeReference)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,81 +0,0 @@
|
||||
---
|
||||
title: "AxisAndOrigin2d"
|
||||
excerpt: "A 2D axis and origin."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
A 2D axis and origin.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
**This schema accepts exactly one of the following:**
|
||||
|
||||
X-axis.
|
||||
|
||||
**enum:** `X`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----
|
||||
Y-axis.
|
||||
|
||||
**enum:** `Y`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----
|
||||
Flip the X-axis.
|
||||
|
||||
**enum:** `-X`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----
|
||||
Flip the Y-axis.
|
||||
|
||||
**enum:** `-Y`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `custom` |`object`| | No |
|
||||
|
||||
|
||||
----
|
||||
|
||||
|
||||
|
||||
|
@ -1,105 +0,0 @@
|
||||
---
|
||||
title: "AxisAndOrigin3d"
|
||||
excerpt: "A 3D axis and origin."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
A 3D axis and origin.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
**This schema accepts exactly one of the following:**
|
||||
|
||||
X-axis.
|
||||
|
||||
**enum:** `X`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----
|
||||
Y-axis.
|
||||
|
||||
**enum:** `Y`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----
|
||||
Z-axis.
|
||||
|
||||
**enum:** `Z`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----
|
||||
Flip the X-axis.
|
||||
|
||||
**enum:** `-X`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----
|
||||
Flip the Y-axis.
|
||||
|
||||
**enum:** `-Y`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----
|
||||
Flip the Z-axis.
|
||||
|
||||
**enum:** `-Z`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `custom` |`object`| | No |
|
||||
|
||||
|
||||
----
|
||||
|
||||
|
||||
|
||||
|
@ -1,22 +0,0 @@
|
||||
---
|
||||
title: "AxisDirectionPair"
|
||||
excerpt: "An [[`Axis`](/docs/kcl/types/Axis)] paired with a [[`Direction`](/docs/kcl/types/Direction)]."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
An [[`Axis`](/docs/kcl/types/Axis)] paired with a [[`Direction`](/docs/kcl/types/Direction)].
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `axis` |[`Axis`](/docs/kcl/types/Axis)| Axis specifier. | No |
|
||||
| `direction` |[`Direction`](/docs/kcl/types/Direction)| Specifies which direction the axis is pointing. | No |
|
||||
|
||||
|
@ -1,23 +0,0 @@
|
||||
---
|
||||
title: "BezierData"
|
||||
excerpt: "Data to draw a bezier curve."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Data to draw a bezier curve.
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `to` |`[, `TyF64`, `TyF64`]`| The to point. | No |
|
||||
| `control1` |`[, `TyF64`, `TyF64`]`| The first control point. | No |
|
||||
| `control2` |`[, `TyF64`, `TyF64`]`| The second control point. | No |
|
||||
|
||||
|
@ -1,22 +0,0 @@
|
||||
---
|
||||
title: "ChamferData"
|
||||
excerpt: "Data for chamfers."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Data for chamfers.
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `length` |`number`| The length of the chamfer. | No |
|
||||
| `tags` |`[` [`EdgeReference`](/docs/kcl/types/EdgeReference) `]`| The tags of the paths you want to chamfer. | No |
|
||||
|
||||
|
@ -1,22 +0,0 @@
|
||||
---
|
||||
title: "CircleData"
|
||||
excerpt: "Data for drawing an circle"
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Data for drawing an circle
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `center` |`[number, number]`| The center of the circle. | No |
|
||||
| `radius` |`number`| The circle radius | No |
|
||||
|
||||
|
@ -1,23 +0,0 @@
|
||||
---
|
||||
title: "CircleThreePointData"
|
||||
excerpt: "Data for drawing a 3-point circle"
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Data for drawing a 3-point circle
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `p1` |`[number, number]`| Point one for circle derivation. | No |
|
||||
| `p2` |`[number, number]`| Point two for circle derivation. | No |
|
||||
| `p3` |`[number, number]`| Point three for circle derivation. | No |
|
||||
|
||||
|
@ -1,25 +0,0 @@
|
||||
---
|
||||
title: "CircularPattern2dData"
|
||||
excerpt: "Data for a circular pattern on a 2D sketch."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Data for a circular pattern on a 2D sketch.
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `instances` |`integer`| The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect. | No |
|
||||
| `center` |`[number, number]`| The center about which to make the pattern. This is a 2D vector. | No |
|
||||
| `arcDegrees` |`number`| The arc angle (in degrees) to place the repetitions. Must be greater than 0. | No |
|
||||
| `rotateDuplicates` |`boolean`| Whether or not to rotate the duplicates as they are copied. | No |
|
||||
| `useOriginal` |`boolean`| If the target being patterned is itself a pattern, then, should you use the original solid, or the pattern? | No |
|
||||
|
||||
|
@ -1,26 +0,0 @@
|
||||
---
|
||||
title: "CircularPattern3dData"
|
||||
excerpt: "Data for a circular pattern on a 3D model."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Data for a circular pattern on a 3D model.
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `instances` |`integer`| The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect. | No |
|
||||
| `axis` |`[number, number, number]`| The axis around which to make the pattern. This is a 3D vector. | No |
|
||||
| `center` |`[number, number, number]`| The center about which to make the pattern. This is a 3D vector. | No |
|
||||
| `arcDegrees` |`number`| The arc angle (in degrees) to place the repetitions. Must be greater than 0. | No |
|
||||
| `rotateDuplicates` |`boolean`| Whether or not to rotate the duplicates as they are copied. | No |
|
||||
| `useOriginal` |`boolean`| If the target being patterned is itself a pattern, then, should you use the original solid, or the pattern? | No |
|
||||
|
||||
|
@ -1,42 +0,0 @@
|
||||
---
|
||||
title: "Direction"
|
||||
excerpt: "Specifies the sign of a co-ordinate axis."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Specifies the sign of a co-ordinate axis.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
**This schema accepts exactly one of the following:**
|
||||
|
||||
Increasing numbers.
|
||||
|
||||
**enum:** `positive`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----
|
||||
Decreasing numbers.
|
||||
|
||||
**enum:** `negative`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----
|
||||
|
||||
|
||||
|
||||
|
@ -1,41 +0,0 @@
|
||||
---
|
||||
title: "EdgeReference"
|
||||
excerpt: "A tag or a uuid of an edge."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
A tag or a uuid of an edge.
|
||||
|
||||
|
||||
|
||||
|
||||
**This schema accepts any of the following:**
|
||||
|
||||
A uuid of an edge.
|
||||
|
||||
**Type:** [`string`](/docs/kcl/types/string) (`uuid`)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----
|
||||
A tag of an edge.
|
||||
|
||||
[`TagIdentifier`](/docs/kcl/types#tag-identifier)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,21 +0,0 @@
|
||||
---
|
||||
title: "Environment"
|
||||
excerpt: ""
|
||||
layout: manual
|
||||
---
|
||||
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `bindings` |`object`| | No |
|
||||
| `parent` |`integer`| | No |
|
||||
|
||||
|
@ -1,17 +0,0 @@
|
||||
---
|
||||
title: "EnvironmentRef"
|
||||
excerpt: "An index pointing to a snapshot within a specific (unspecified) environment."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
An index pointing to a snapshot within a specific (unspecified) environment.
|
||||
|
||||
[`SnapshotRef`](/docs/kcl/types/SnapshotRef)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,23 +0,0 @@
|
||||
---
|
||||
title: "FilletData"
|
||||
excerpt: "Data for fillets."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Data for fillets.
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `radius` |`number`| The radius of the fillet. | No |
|
||||
| `tags` |`[` [`EdgeReference`](/docs/kcl/types/EdgeReference) `]`| The tags of the paths you want to fillet. | No |
|
||||
| `tolerance` |`number`| The tolerance for the fillet. | No |
|
||||
|
||||
|
@ -1,24 +0,0 @@
|
||||
---
|
||||
title: "HelixRevolutionsData"
|
||||
excerpt: "Data for helix revolutions."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Data for helix revolutions.
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `revolutions` |[`number`](/docs/kcl/types/number)| Number of revolutions. | No |
|
||||
| `angleStart` |[`number`](/docs/kcl/types/number)| Start angle (in degrees). | No |
|
||||
| `ccw` |`boolean`| Is the helix rotation counter clockwise? The default is `false`. | No |
|
||||
| `length` |[`number`](/docs/kcl/types/number)| Length of the helix. If this argument is not provided, the height of the solid is used. | No |
|
||||
|
||||
|
@ -1,27 +0,0 @@
|
||||
---
|
||||
title: "HelixValue"
|
||||
excerpt: "A helix."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
A helix.
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `value` |[`string`](/docs/kcl/types/string)| The id of the helix. | No |
|
||||
| `artifactId` |[`string`](/docs/kcl/types/string)| The artifact ID. | No |
|
||||
| `revolutions` |[`number`](/docs/kcl/types/number)| Number of revolutions. | No |
|
||||
| `angleStart` |[`number`](/docs/kcl/types/number)| Start angle (in degrees). | No |
|
||||
| `ccw` |`boolean`| Is the helix rotation counter clockwise? | No |
|
||||
| `cylinderId` |[`string`](/docs/kcl/types/string)| The cylinder the helix was created on. | No |
|
||||
| `units` |[`UnitLen`](/docs/kcl/types/UnitLen)| A unit of length. | No |
|
||||
|
||||
|
@ -1,136 +0,0 @@
|
||||
---
|
||||
title: "ImportFormat"
|
||||
excerpt: "Import format specifier"
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Import format specifier
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
**This schema accepts exactly one of the following:**
|
||||
|
||||
Autodesk Filmbox (FBX) format
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `format` |enum: `fbx`| | No |
|
||||
|
||||
|
||||
----
|
||||
Binary glTF 2.0. We refer to this as glTF since that is how our customers refer to it, but this can also import binary glTF (glb).
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `format` |enum: `gltf`| | No |
|
||||
|
||||
|
||||
----
|
||||
Wavefront OBJ format.
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `format` |enum: `obj`| | No |
|
||||
| `coords` |[`System`](/docs/kcl/types/System)| Co-ordinate system of input data. Defaults to the [KittyCAD co-ordinate system. | No |
|
||||
| `units` |[`UnitLength`](/docs/kcl/types/UnitLength)| The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. Defaults to millimeters. | No |
|
||||
|
||||
|
||||
----
|
||||
The PLY Polygon File Format.
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `format` |enum: `ply`| | No |
|
||||
| `coords` |[`System`](/docs/kcl/types/System)| Co-ordinate system of input data. Defaults to the [KittyCAD co-ordinate system. | No |
|
||||
| `units` |[`UnitLength`](/docs/kcl/types/UnitLength)| The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. Defaults to millimeters. | No |
|
||||
|
||||
|
||||
----
|
||||
SolidWorks part (SLDPRT) format.
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `format` |enum: `sldprt`| | No |
|
||||
|
||||
|
||||
----
|
||||
ISO 10303-21 (STEP) format.
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `format` |enum: `step`| | No |
|
||||
|
||||
|
||||
----
|
||||
ST**ereo**L**ithography format.
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `format` |enum: `stl`| | No |
|
||||
| `coords` |[`System`](/docs/kcl/types/System)| Co-ordinate system of input data. Defaults to the [KittyCAD co-ordinate system. | No |
|
||||
| `units` |[`UnitLength`](/docs/kcl/types/UnitLength)| The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. Defaults to millimeters. | No |
|
||||
|
||||
|
||||
----
|
||||
|
||||
|
||||
|
||||
|
@ -1,22 +0,0 @@
|
||||
---
|
||||
title: "ImportedGeometry"
|
||||
excerpt: "Data for an imported geometry."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Data for an imported geometry.
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `id` |[`string`](/docs/kcl/types/string)| The ID of the imported geometry. | No |
|
||||
| `value` |`[` [`string`](/docs/kcl/types/string) `]`| The original file paths. | No |
|
||||
|
||||
|
@ -1,23 +0,0 @@
|
||||
---
|
||||
title: "LinearPattern2dData"
|
||||
excerpt: "Data for a linear pattern on a 2D sketch."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Data for a linear pattern on a 2D sketch.
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `instances` |`integer`| The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect. | No |
|
||||
| `distance` |`number`| The distance between each repetition. This can also be referred to as spacing. | No |
|
||||
| `axis` |`[number, number]`| The axis of the pattern. This is a 2D vector. | No |
|
||||
|
||||
|
@ -1,23 +0,0 @@
|
||||
---
|
||||
title: "LinearPattern3dData"
|
||||
excerpt: "Data for a linear pattern on a 3D model."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Data for a linear pattern on a 3D model.
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `instances` |`integer`| The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect. | No |
|
||||
| `distance` |`number`| The distance between each repetition. This can also be referred to as spacing. | No |
|
||||
| `axis` |`[number, number, number]`| The axis of the pattern. | No |
|
||||
|
||||
|
@ -1,24 +0,0 @@
|
||||
---
|
||||
title: "LoftData"
|
||||
excerpt: "Data for a loft."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Data for a loft.
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `vDegree` |`integer` (**minimum:** 1.0)| Degree of the interpolation. Must be greater than zero. For example, use 2 for quadratic, or 3 for cubic interpolation in the V direction. This defaults to 2, if not specified. | No |
|
||||
| `bezApproximateRational` |`boolean`| Attempt to approximate rational curves (such as arcs) using a bezier. This will remove banding around interpolations between arcs and non-arcs. It may produce errors in other scenarios Over time, this field won't be necessary. | No |
|
||||
| `baseCurveIndex` |`integer`| This can be set to override the automatically determined topological base curve, which is usually the first section encountered. | No |
|
||||
| `tolerance` |`number`| Tolerance for the loft operation. | No |
|
||||
|
||||
|
@ -1,21 +0,0 @@
|
||||
---
|
||||
title: "Metadata"
|
||||
excerpt: "Metadata."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Metadata.
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `sourceRange` |[`SourceRange`](/docs/kcl/types/SourceRange)| The source range. | No |
|
||||
|
||||
|
@ -1,21 +0,0 @@
|
||||
---
|
||||
title: "Mirror2dData"
|
||||
excerpt: "Data for a mirror."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Data for a mirror.
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `axis` |[`Axis2dOrEdgeReference`](/docs/kcl/types/Axis2dOrEdgeReference)| Axis to use as mirror. | No |
|
||||
|
||||
|
@ -96,7 +96,7 @@ A defined plane.
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `plane` |`object`| | No |
|
||||
| `plane` |[`PlaneInfo`](/docs/kcl/types/PlaneInfo)| | No |
|
||||
|
||||
|
||||
----
|
||||
|
22
docs/kcl/types/PlaneInfo.md
Normal file
22
docs/kcl/types/PlaneInfo.md
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
title: "PlaneInfo"
|
||||
excerpt: ""
|
||||
layout: manual
|
||||
---
|
||||
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `origin` |[`Point3d`](/docs/kcl/types/Point3d)| Origin of the plane. | No |
|
||||
| `xAxis` |[`Point3d`](/docs/kcl/types/Point3d)| What should the plane's X axis be? | No |
|
||||
| `yAxis` |[`Point3d`](/docs/kcl/types/Point3d)| What should the plane's Y axis be? | No |
|
||||
|
||||
|
@ -1,24 +0,0 @@
|
||||
---
|
||||
title: "PolygonData"
|
||||
excerpt: "Data for drawing a polygon"
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Data for drawing a polygon
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `radius` |`TyF64`| The radius of the polygon | No |
|
||||
| `numSides` |`integer`| The number of sides in the polygon | No |
|
||||
| `center` |`[, `TyF64`, `TyF64`]`| The center point of the polygon | No |
|
||||
| `inscribed` |`boolean`| Whether the polygon is inscribed (true) or circumscribed (false) about a circle with the specified radius | No |
|
||||
|
||||
|
@ -1,21 +0,0 @@
|
||||
---
|
||||
title: "ProgramMemory"
|
||||
excerpt: ""
|
||||
layout: manual
|
||||
---
|
||||
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `environments` |`[` [`Environment`](/docs/kcl/types/Environment) `]`| | No |
|
||||
| `currentEnv` |`integer`| | No |
|
||||
|
||||
|
@ -1,23 +0,0 @@
|
||||
---
|
||||
title: "RevolveData"
|
||||
excerpt: "Data for revolution surfaces."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Data for revolution surfaces.
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `angle` |[`number`](/docs/kcl/types/number) (**maximum:** 360.0) (**minimum:** -360.0)| Angle to revolve (in degrees). Default is 360. | No |
|
||||
| `axis` |[`Axis2dOrEdgeReference`](/docs/kcl/types/Axis2dOrEdgeReference)| Axis of revolution. | No |
|
||||
| `tolerance` |[`number`](/docs/kcl/types/number)| Tolerance for the revolve operation. | No |
|
||||
|
||||
|
@ -1,22 +0,0 @@
|
||||
---
|
||||
title: "ShellData"
|
||||
excerpt: "Data for shells."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
Data for shells.
|
||||
|
||||
**Type:** `object`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `thickness` |`number`| The thickness of the shell. | No |
|
||||
| `faces` |`[` [`FaceTag`](/docs/kcl/types/FaceTag) `]`| The faces you want removed. | No |
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user