Skip to content

Commit c605389

Browse files
committed
Turn on uom checks
Signed-off-by: Nick Cameron <[email protected]>
1 parent 1628ea8 commit c605389

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+16835
-2074
lines changed

docs/kcl/fromCm.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ excerpt: "Converts a number from centimeters to the current default unit."
44
layout: manual
55
---
66

7+
**WARNING:** This function is deprecated.
8+
79
Converts a number from centimeters to the current default unit.
810

11+
*DEPRECATED* prefer using explicit numberic suffixes (e.g., `42cm`) or the `to...` conversion functions.
12+
913
No matter what units the current file uses, this function will always return a number equivalent to the input in centimeters.
1014

1115
For example, if the current file uses inches, `fromCm(1)` will return `0.393701`. If the current file uses millimeters, `fromCm(1)` will return `10`. If the current file uses centimeters, `fromCm(1)` will return `1`.

docs/kcl/fromFt.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ excerpt: "Converts a number from feet to the current default unit."
44
layout: manual
55
---
66

7+
**WARNING:** This function is deprecated.
8+
79
Converts a number from feet to the current default unit.
810

11+
*DEPRECATED* prefer using explicit numberic suffixes (e.g., `42ft`) or the `to...` conversion functions.
12+
913
No matter what units the current file uses, this function will always return a number equivalent to the input in feet.
1014

1115
For example, if the current file uses inches, `fromFt(1)` will return `12`. If the current file uses millimeters, `fromFt(1)` will return `304.8`. If the current file uses feet, `fromFt(1)` will return `1`.

docs/kcl/fromInches.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ excerpt: "Converts a number from inches to the current default unit."
44
layout: manual
55
---
66

7+
**WARNING:** This function is deprecated.
8+
79
Converts a number from inches to the current default unit.
810

11+
*DEPRECATED* prefer using explicit numberic suffixes (e.g., `42inch`) or the `to...` conversion functions.
12+
913
No matter what units the current file uses, this function will always return a number equivalent to the input in inches.
1014

1115
For example, if the current file uses inches, `fromInches(1)` will return `1`. If the current file uses millimeters, `fromInches(1)` will return `25.4`.

docs/kcl/fromM.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ excerpt: "Converts a number from meters to the current default unit."
44
layout: manual
55
---
66

7+
**WARNING:** This function is deprecated.
8+
79
Converts a number from meters to the current default unit.
810

11+
*DEPRECATED* prefer using explicit numberic suffixes (e.g., `42m`) or the `to...` conversion functions.
12+
913
No matter what units the current file uses, this function will always return a number equivalent to the input in meters.
1014

1115
For example, if the current file uses inches, `fromM(1)` will return `39.3701`. If the current file uses millimeters, `fromM(1)` will return `1000`. If the current file uses meters, `fromM(1)` will return `1`.

docs/kcl/fromMm.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ excerpt: "Converts a number from mm to the current default unit."
44
layout: manual
55
---
66

7+
**WARNING:** This function is deprecated.
8+
79
Converts a number from mm to the current default unit.
810

11+
*DEPRECATED* prefer using explicit numberic suffixes (e.g., `42mm`) or the `to...` conversion functions.
12+
913
No matter what units the current file uses, this function will always return a number equivalent to the input in millimeters.
1014

1115
For example, if the current file uses inches, `fromMm(1)` will return `1/25.4`. If the current file uses millimeters, `fromMm(1)` will return `1`.

docs/kcl/fromYd.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ excerpt: "Converts a number from yards to the current default unit."
44
layout: manual
55
---
66

7+
**WARNING:** This function is deprecated.
8+
79
Converts a number from yards to the current default unit.
810

11+
*DEPRECATED* prefer using explicit numberic suffixes (e.g., `42yd`) or the `to...` conversion functions.
12+
913
No matter what units the current file uses, this function will always return a number equivalent to the input in yards.
1014

1115
For example, if the current file uses inches, `fromYd(1)` will return `36`. If the current file uses millimeters, `fromYd(1)` will return `914.4`. If the current file uses yards, `fromYd(1)` will return `1`.

docs/kcl/index.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@ layout: manual
6666
* [`extrude`](kcl/extrude)
6767
* [`fillet`](kcl/fillet)
6868
* [`floor`](kcl/floor)
69-
* [`fromCm`](kcl/fromCm)
70-
* [`fromFt`](kcl/fromFt)
71-
* [`fromInches`](kcl/fromInches)
72-
* [`fromM`](kcl/fromM)
73-
* [`fromMm`](kcl/fromMm)
74-
* [`fromYd`](kcl/fromYd)
7569
* [`getCommonEdge`](kcl/getCommonEdge)
7670
* [`getNextAdjacentEdge`](kcl/getNextAdjacentEdge)
7771
* [`getOppositeEdge`](kcl/getOppositeEdge)
@@ -131,8 +125,14 @@ layout: manual
131125
* [`sweep`](kcl/sweep)
132126
* [`tangentToEnd`](kcl/tangentToEnd)
133127
* [`tangentialArc`](kcl/tangentialArc)
134-
* [`toDegrees`](kcl/toDegrees)
135-
* [`toRadians`](kcl/toRadians)
128+
* [`toCentimeters`](kcl/std-toCentimeters)
129+
* [`toDegrees`](kcl/std-toDegrees)
130+
* [`toFeet`](kcl/std-toFeet)
131+
* [`toInches`](kcl/std-toInches)
132+
* [`toMeters`](kcl/std-toMeters)
133+
* [`toMillimeters`](kcl/std-toMillimeters)
134+
* [`toRadians`](kcl/std-toRadians)
135+
* [`toYards`](kcl/std-toYards)
136136
* [`translate`](kcl/translate)
137137
* [`union`](kcl/union)
138138
* [`xLine`](kcl/xLine)

docs/kcl/patternTransform.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ t = 0.005 // taper factor [0-1)
174174
// Defines how to modify each layer of the vase.
175175
// Each replica is shifted up the Z axis, and has a smoothly-varying radius
176176
fn transform(replicaId) {
177-
scale = r * abs(1 - (t * replicaId)) * (5 + cos(replicaId / 8))
177+
scale = r * abs(1 - (t * replicaId)) * (5 + cos(replicaId / 8: number(rad)))
178178
return {
179179
translate = [0, 0, replicaId * 10],
180180
scale = [scale, scale, 0]

docs/kcl/std-helix.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ helix(
2626
| Name | Type | Description | Required |
2727
|----------|------|-------------|----------|
2828
| `revolutions` | `number(_)` | Number of revolutions. | Yes |
29-
| `angleStart` | `number(Angle)` | Start angle (in degrees). | Yes |
29+
| `angleStart` | `number(Angle)` | Start angle. | Yes |
3030
| `ccw` | [`bool`](/docs/kcl/types/bool) | Is the helix rotation counter clockwise? The default is `false`. | No |
3131
| `radius` | `number(Length)` | Radius of the helix. | No |
3232
| `axis` | `Axis3d | Edge` | Axis to use for the helix. | No |

docs/kcl/std-math-cos.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ exampleSketch = startSketchOn(XZ)
3131
|> startProfileAt([0, 0], %)
3232
|> angledLine(
3333
angle = 30,
34-
length = 3 / cos(toRadians(30)),
34+
length = 3 / cos(30deg),
3535
)
3636
|> yLine(endAbsolute = 0)
3737
|> close()

0 commit comments

Comments
 (0)