Merge remote-tracking branch 'origin/main' into paultag/import
This commit is contained in:
18
.eslintrc
18
.eslintrc
@ -26,11 +26,17 @@
|
||||
"@typescript-eslint/no-duplicate-enum-values": "error",
|
||||
"@typescript-eslint/no-duplicate-type-constituents": "error",
|
||||
"@typescript-eslint/no-empty-object-type": "error",
|
||||
"@typescript-eslint/no-extra-non-null-assertion": "error",
|
||||
"@typescript-eslint/no-floating-promises": "error",
|
||||
"@typescript-eslint/no-for-in-array": "error",
|
||||
"no-implied-eval": "off", // This is wrong; use the @typescript-eslint one instead.
|
||||
"@typescript-eslint/no-implied-eval": "error",
|
||||
"@typescript-eslint/no-misused-new": "error",
|
||||
"@typescript-eslint/no-misused-promises": "error",
|
||||
"@typescript-eslint/no-namespace": "error",
|
||||
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
|
||||
"@typescript-eslint/no-redundant-type-constituents": "error",
|
||||
"@typescript-eslint/no-this-alias": "warn",
|
||||
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
||||
"@typescript-eslint/no-unnecessary-type-constraint": "error",
|
||||
"no-unused-vars": "off", // This is wrong; use the @typescript-eslint one instead.
|
||||
@ -41,7 +47,13 @@
|
||||
"vars": "all",
|
||||
"args": "none"
|
||||
}],
|
||||
"@typescript-eslint/no-unsafe-unary-minus": "error",
|
||||
"@typescript-eslint/no-wrapper-object-types": "error",
|
||||
"no-throw-literal": "off", // Use @typescript-eslint/only-throw-error instead.
|
||||
"@typescript-eslint/only-throw-error": "error",
|
||||
"@typescript-eslint/prefer-as-const": "warn",
|
||||
"@typescript-eslint/prefer-namespace-keyword": "error",
|
||||
"@typescript-eslint/restrict-plus-operands": "error",
|
||||
"jsx-a11y/click-events-have-key-events": "off",
|
||||
"jsx-a11y/no-autofocus": "off",
|
||||
"jsx-a11y/no-noninteractive-element-interactions": "off",
|
||||
@ -50,7 +62,7 @@
|
||||
{
|
||||
"name": "isNaN",
|
||||
"message": "Use Number.isNaN() instead."
|
||||
},
|
||||
}
|
||||
],
|
||||
"no-restricted-syntax": [
|
||||
"error",
|
||||
@ -64,7 +76,7 @@
|
||||
"never"
|
||||
],
|
||||
"react-hooks/exhaustive-deps": "off",
|
||||
"suggest-no-throw/suggest-no-throw": "warn",
|
||||
"suggest-no-throw/suggest-no-throw": "error"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
@ -84,7 +96,7 @@
|
||||
"plugin:testing-library/react"
|
||||
],
|
||||
"rules": {
|
||||
"suggest-no-throw/suggest-no-throw": "off",
|
||||
"suggest-no-throw/suggest-no-throw": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -124,6 +124,7 @@ export class ElectronZoo {
|
||||
|
||||
// We need to expose this in order for some tests that require folder
|
||||
// creation and some code below.
|
||||
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
||||
const that = this
|
||||
|
||||
const options = {
|
||||
|
@ -37,11 +37,11 @@ export class IntoServer
|
||||
implements AsyncGenerator<Uint8Array, never, void>
|
||||
{
|
||||
private worker: Worker | null = null
|
||||
private type_: String | null = null
|
||||
private type_: string | null = null
|
||||
|
||||
private trace: boolean = false
|
||||
|
||||
constructor(type_?: String, worker?: Worker, trace?: boolean) {
|
||||
constructor(type_?: string, worker?: Worker, trace?: boolean) {
|
||||
super()
|
||||
if (worker && type_) {
|
||||
this.worker = worker
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 57 KiB |
@ -4,72 +4,142 @@
|
||||
// Set Units
|
||||
@settings(defaultLengthUnit = in)
|
||||
|
||||
// Define constants such as sheet metal thickness, bend radius, flange length, bolt diameter size, etc.
|
||||
thickness = 0.090
|
||||
bendRad = 0.08
|
||||
outsideBendRad = bendRad + thickness
|
||||
flangeLength = 0.5
|
||||
hatHeight = 3
|
||||
hatWidth = 5
|
||||
boltSize = 0.25
|
||||
flangeWidth = 1.5
|
||||
// Input bolt pattern dimensions to mount the bracket
|
||||
mountingBoltDiameter = 1 / 4
|
||||
mountingBoltPatternX = 7
|
||||
mountingBoltPatternY = 4
|
||||
|
||||
// Sketch and extrude the base shape and fillet the inside and outside edges.
|
||||
baseExtrusion = startSketchOn(-XZ)
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> line(end = [0, thickness], tag = $e1)
|
||||
|> line(end = [flangeLength, 0], tag = $e2)
|
||||
|> line(end = [0, hatHeight], tag = $e3)
|
||||
|> line(end = [hatWidth, 0], tag = $e4)
|
||||
|> line(end = [0, -hatHeight], tag = $e5)
|
||||
|> line(end = [flangeLength, 0], tag = $e6)
|
||||
|> line(end = [0, -thickness], tag = $e7)
|
||||
|> line(end = [-flangeLength - thickness, 0], tag = $e8)
|
||||
|> line(end = [0, hatHeight], tag = $e9)
|
||||
|> line(end = [-hatWidth + 2 * thickness, 0], tag = $e10)
|
||||
|> line(end = [0, -hatHeight], tag = $e11)
|
||||
|> close(tag = $e12)
|
||||
|> extrude(length = hatWidth)
|
||||
|> fillet(radius = bendRad, tags = [getNextAdjacentEdge(e2)])
|
||||
|> fillet(radius = outsideBendRad, tags = [getNextAdjacentEdge(e3)])
|
||||
|> fillet(radius = outsideBendRad, tags = [getNextAdjacentEdge(e4)])
|
||||
|> fillet(radius = bendRad, tags = [getNextAdjacentEdge(e5)])
|
||||
|> fillet(radius = outsideBendRad, tags = [getNextAdjacentEdge(e8)])
|
||||
|> fillet(radius = bendRad, tags = [getNextAdjacentEdge(e9)])
|
||||
|> fillet(radius = bendRad, tags = [getNextAdjacentEdge(e10)])
|
||||
|> fillet(radius = outsideBendRad, tags = [getNextAdjacentEdge(e11)])
|
||||
// Input bolt pattern dimensions to mount a component to the bracket
|
||||
componentBoltDiameter = 3 / 16
|
||||
componentBoltPatternX = 2
|
||||
componentBoltPatternY = 3
|
||||
|
||||
// Define the flanges and place the bolt holes
|
||||
flange1 = startSketchOn(XY)
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> line(end = [0, hatWidth])
|
||||
|> line(end = [flangeWidth, 0], tag = $e13)
|
||||
|> line(end = [0, -hatWidth], tag = $e14)
|
||||
// Define bracket constants such as sheet metal thickness, bend radius, flange length, etc.
|
||||
hatHeight = 2.5
|
||||
bendAngle = 75
|
||||
thickness = 0.125
|
||||
interiorBendRadius = 0.125
|
||||
|
||||
// Calculate Remaining Parameters
|
||||
exteriorBendRadius = interiorBendRadius + thickness
|
||||
overhang = 3 * mountingBoltDiameter
|
||||
flangeLength = 6 * mountingBoltDiameter
|
||||
flangeExtrusion = if mountingBoltPatternY > componentBoltPatternY {
|
||||
mountingBoltPatternY + overhang * 2
|
||||
} else {
|
||||
componentBoltPatternY + overhang * 2
|
||||
}
|
||||
|
||||
// Draw the extrusion profile of the sheet metal bracket
|
||||
bracketProfile = startSketchOn(XZ)
|
||||
|> startProfileAt([
|
||||
-mountingBoltPatternX / 2 - overhang,
|
||||
0
|
||||
], %)
|
||||
|> xLine(length = flangeLength)
|
||||
|> tangentialArc({
|
||||
radius = exteriorBendRadius,
|
||||
offset = bendAngle
|
||||
}, %)
|
||||
|> angledLineToY([bendAngle, hatHeight - thickness], %, $seg01)
|
||||
|> tangentialArc({
|
||||
radius = interiorBendRadius,
|
||||
offset = -bendAngle
|
||||
}, %)
|
||||
|> xLine(endAbsolute = 0, tag = $seg02)
|
||||
|> xLine(length = segLen(seg02))
|
||||
|> tangentialArc({
|
||||
radius = interiorBendRadius,
|
||||
offset = -bendAngle
|
||||
}, %)
|
||||
|> angledLine([-bendAngle, segLen(seg01)], %)
|
||||
|> tangentialArc({
|
||||
radius = exteriorBendRadius,
|
||||
offset = bendAngle
|
||||
}, %)
|
||||
|> xLine(length = flangeLength)
|
||||
|> yLine(length = thickness, tag = $seg03)
|
||||
|> xLine(length = -flangeLength, tag = $seg04)
|
||||
|> tangentialArc({
|
||||
radius = interiorBendRadius,
|
||||
offset = -bendAngle
|
||||
}, %)
|
||||
|> angledLine([180 - bendAngle, segLen(seg01)], %)
|
||||
|> tangentialArc({
|
||||
radius = exteriorBendRadius,
|
||||
offset = bendAngle
|
||||
}, %)
|
||||
|> xLine(endAbsolute = 0, tag = $seg05)
|
||||
|> xLine(length = -segLen(seg05))
|
||||
|> tangentialArc({
|
||||
radius = exteriorBendRadius,
|
||||
offset = bendAngle
|
||||
}, %)
|
||||
|> angledLine([bendAngle - 180, segLen(seg01)], %)
|
||||
|> tangentialArc({
|
||||
radius = interiorBendRadius,
|
||||
offset = -bendAngle
|
||||
}, %)
|
||||
|> xLine(length = -flangeLength, tag = $seg06)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $seg07)
|
||||
|> close()
|
||||
|> hole(circle(center = [0.75, 1], radius = boltSize), %)
|
||||
|> hole(circle(center = [0.75, 4], radius = boltSize), %)
|
||||
|> extrude(length = thickness)
|
||||
|> extrude(length = flangeExtrusion)
|
||||
|> fillet(
|
||||
radius = 0.5,
|
||||
radius = flangeLength / 3,
|
||||
tags = [
|
||||
getNextAdjacentEdge(e13),
|
||||
getNextAdjacentEdge(e14)
|
||||
seg03,
|
||||
getOppositeEdge(seg03),
|
||||
seg07,
|
||||
getOppositeEdge(seg07)
|
||||
],
|
||||
)
|
||||
|
||||
flange2 = startSketchOn(XY)
|
||||
|> startProfileAt([-6, 0], %)
|
||||
|> line(end = [0, hatWidth])
|
||||
|> line(end = [-flangeWidth, 0], tag = $e15)
|
||||
|> line(end = [0, -hatWidth], tag = $e16)
|
||||
|> close()
|
||||
|> hole(circle(center = [-6.75, 1], radius = boltSize), %)
|
||||
|> hole(circle(center = [-6.75, 4], radius = boltSize), %)
|
||||
|> extrude(length = thickness)
|
||||
|> fillet(
|
||||
radius = 0.25,
|
||||
tags = [
|
||||
getNextAdjacentEdge(e15),
|
||||
getNextAdjacentEdge(e16)
|
||||
],
|
||||
// Cut the bolt pattern in the left base flange
|
||||
leftFlangeBoltPattern = startSketchOn(bracketProfile, seg04)
|
||||
|> circle(center = [-mountingBoltPatternX / 2, overhang], radius = mountingBoltDiameter / 2)
|
||||
|> patternLinear2d(
|
||||
%,
|
||||
instances = 2,
|
||||
distance = mountingBoltPatternY,
|
||||
axis = [0, 1],
|
||||
)
|
||||
|> extrude(length = -thickness)
|
||||
|
||||
// Cut the bolt pattern in the right base flange
|
||||
rightFlangeBoltPattern = startSketchOn(bracketProfile, seg06)
|
||||
|> circle(center = [mountingBoltPatternX / 2, overhang], radius = mountingBoltDiameter / 2)
|
||||
|> patternLinear2d(
|
||||
%,
|
||||
instances = 2,
|
||||
distance = mountingBoltPatternY,
|
||||
axis = [0, 1],
|
||||
)
|
||||
|> extrude(length = -thickness)
|
||||
|
||||
// Provision the top flange with holes to mount an object
|
||||
topFlangeBoltPattern = startSketchOn(bracketProfile, seg05)
|
||||
|> circle(
|
||||
center = [
|
||||
-componentBoltPatternX / 2,
|
||||
-componentBoltPatternY / 2 + flangeExtrusion / 2
|
||||
],
|
||||
radius = componentBoltDiameter / 2,
|
||||
)
|
||||
|> patternLinear2d(
|
||||
%,
|
||||
instances = 2,
|
||||
distance = componentBoltPatternX,
|
||||
axis = [1, 0],
|
||||
)
|
||||
|> patternLinear2d(
|
||||
%,
|
||||
instances = 2,
|
||||
distance = componentBoltPatternY,
|
||||
axis = [0, 1],
|
||||
)
|
||||
|> extrude(length = -thickness)
|
||||
|
||||
// Place a hole at the center of the component bolt pattern to reduce mass
|
||||
centeredHole = startSketchOn(bracketProfile, seg05)
|
||||
|> circle(center = [0, flangeExtrusion / 2], radius = 0.75)
|
||||
|> extrude(length = -thickness)
|
||||
|
24
rust/Cargo.lock
generated
24
rust/Cargo.lock
generated
@ -1780,7 +1780,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-bumper"
|
||||
version = "0.1.56"
|
||||
version = "0.1.57"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
@ -1791,7 +1791,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-derive-docs"
|
||||
version = "0.1.56"
|
||||
version = "0.1.57"
|
||||
dependencies = [
|
||||
"Inflector",
|
||||
"anyhow",
|
||||
@ -1810,7 +1810,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-directory-test-macro"
|
||||
version = "0.1.56"
|
||||
version = "0.1.57"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@ -1819,7 +1819,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-language-server"
|
||||
version = "0.2.56"
|
||||
version = "0.2.57"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
@ -1840,7 +1840,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-language-server-release"
|
||||
version = "0.1.56"
|
||||
version = "0.1.57"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
@ -1860,7 +1860,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-lib"
|
||||
version = "0.2.56"
|
||||
version = "0.2.57"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"approx 0.5.1",
|
||||
@ -1929,7 +1929,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-python-bindings"
|
||||
version = "0.3.56"
|
||||
version = "0.3.57"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"kcl-lib",
|
||||
@ -1944,7 +1944,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-test-server"
|
||||
version = "0.1.56"
|
||||
version = "0.1.57"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"hyper 0.14.32",
|
||||
@ -1957,7 +1957,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-to-core"
|
||||
version = "0.1.56"
|
||||
version = "0.1.57"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@ -1971,7 +1971,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-wasm-lib"
|
||||
version = "0.1.56"
|
||||
version = "0.1.57"
|
||||
dependencies = [
|
||||
"bson",
|
||||
"console_error_panic_hook",
|
||||
@ -2034,9 +2034,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kittycad-modeling-cmds"
|
||||
version = "0.2.107"
|
||||
version = "0.2.108"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cb129c1f4906a76e3518e58f61968f16cb56f1279366415d2bae6059aa68fce8"
|
||||
checksum = "58f5fbcfb0fe3384592829cd1a5109aa45fb6a3ffc5ff2d164d2fd528ffd4641"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"chrono",
|
||||
|
@ -35,7 +35,7 @@ dashmap = { version = "6.1.0" }
|
||||
http = "1"
|
||||
indexmap = "2.7.0"
|
||||
kittycad = { version = "0.3.36", default-features = false, features = ["js", "requests"] }
|
||||
kittycad-modeling-cmds = { version = "0.2.107", features = ["ts-rs", "websocket"] }
|
||||
kittycad-modeling-cmds = { version = "0.2.108", features = ["ts-rs", "websocket"] }
|
||||
lazy_static = "1.5.0"
|
||||
miette = "7.5.0"
|
||||
pyo3 = { version = "0.24.0" }
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
[package]
|
||||
name = "kcl-bumper"
|
||||
version = "0.1.56"
|
||||
version = "0.1.57"
|
||||
edition = "2021"
|
||||
repository = "https://github.com/KittyCAD/modeling-api"
|
||||
rust-version = "1.76"
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "kcl-derive-docs"
|
||||
description = "A tool for generating documentation from Rust derive macros"
|
||||
version = "0.1.56"
|
||||
version = "0.1.57"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
repository = "https://github.com/KittyCAD/modeling-app"
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "kcl-directory-test-macro"
|
||||
description = "A tool for generating tests from a directory of kcl files"
|
||||
version = "0.1.56"
|
||||
version = "0.1.57"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
repository = "https://github.com/KittyCAD/modeling-app"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "kcl-language-server-release"
|
||||
version = "0.1.56"
|
||||
version = "0.1.57"
|
||||
edition = "2021"
|
||||
authors = ["KittyCAD Inc <kcl@kittycad.io>"]
|
||||
publish = false
|
||||
|
@ -2,7 +2,7 @@
|
||||
name = "kcl-language-server"
|
||||
description = "A language server for KCL."
|
||||
authors = ["KittyCAD Inc <kcl@kittycad.io>"]
|
||||
version = "0.2.56"
|
||||
version = "0.2.57"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "kcl-lib"
|
||||
description = "KittyCAD Language implementation and tools"
|
||||
version = "0.2.56"
|
||||
version = "0.2.57"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
repository = "https://github.com/KittyCAD/modeling-app"
|
||||
|
@ -138,8 +138,6 @@ async fn inner_chamfer(
|
||||
radius: LengthUnit(length),
|
||||
tolerance: LengthUnit(DEFAULT_TOLERANCE), // We can let the user set this in the future.
|
||||
cut_type: CutType::Chamfer,
|
||||
// We make this a none so that we can remove it in the future.
|
||||
face_id: None,
|
||||
}),
|
||||
)
|
||||
.await?;
|
||||
|
@ -167,8 +167,6 @@ async fn inner_fillet(
|
||||
radius: LengthUnit(radius),
|
||||
tolerance: LengthUnit(tolerance.unwrap_or(DEFAULT_TOLERANCE)),
|
||||
cut_type: CutType::Fillet,
|
||||
// We make this a none so that we can remove it in the future.
|
||||
face_id: None,
|
||||
}),
|
||||
)
|
||||
.await?;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,141 +1,145 @@
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph path2 [Path]
|
||||
2["Path<br>[728, 753, 0]"]
|
||||
3["Segment<br>[759, 796, 0]"]
|
||||
4["Segment<br>[802, 842, 0]"]
|
||||
5["Segment<br>[848, 885, 0]"]
|
||||
6["Segment<br>[891, 927, 0]"]
|
||||
7["Segment<br>[933, 971, 0]"]
|
||||
8["Segment<br>[977, 1017, 0]"]
|
||||
9["Segment<br>[1023, 1061, 0]"]
|
||||
10["Segment<br>[1067, 1120, 0]"]
|
||||
11["Segment<br>[1126, 1163, 0]"]
|
||||
12["Segment<br>[1169, 1223, 0]"]
|
||||
13["Segment<br>[1229, 1268, 0]"]
|
||||
14["Segment<br>[1274, 1291, 0]"]
|
||||
15[Solid2d]
|
||||
2["Path<br>[1227, 1308, 0]"]
|
||||
3["Segment<br>[1314, 1342, 0]"]
|
||||
4["Segment<br>[1348, 1436, 0]"]
|
||||
5["Segment<br>[1442, 1502, 0]"]
|
||||
6["Segment<br>[1508, 1597, 0]"]
|
||||
7["Segment<br>[1603, 1639, 0]"]
|
||||
8["Segment<br>[1645, 1674, 0]"]
|
||||
9["Segment<br>[1680, 1769, 0]"]
|
||||
10["Segment<br>[1775, 1817, 0]"]
|
||||
11["Segment<br>[1823, 1911, 0]"]
|
||||
12["Segment<br>[1917, 1945, 0]"]
|
||||
13["Segment<br>[1951, 1990, 0]"]
|
||||
14["Segment<br>[1996, 2039, 0]"]
|
||||
15["Segment<br>[2045, 2134, 0]"]
|
||||
16["Segment<br>[2140, 2187, 0]"]
|
||||
17["Segment<br>[2193, 2281, 0]"]
|
||||
18["Segment<br>[2287, 2323, 0]"]
|
||||
19["Segment<br>[2329, 2359, 0]"]
|
||||
20["Segment<br>[2365, 2453, 0]"]
|
||||
21["Segment<br>[2459, 2506, 0]"]
|
||||
22["Segment<br>[2512, 2601, 0]"]
|
||||
23["Segment<br>[2607, 2650, 0]"]
|
||||
24["Segment<br>[2656, 2726, 0]"]
|
||||
25["Segment<br>[2732, 2739, 0]"]
|
||||
26[Solid2d]
|
||||
end
|
||||
subgraph path56 [Path]
|
||||
56["Path<br>[1947, 1972, 0]"]
|
||||
57["Segment<br>[1978, 2003, 0]"]
|
||||
58["Segment<br>[2009, 2049, 0]"]
|
||||
59["Segment<br>[2055, 2093, 0]"]
|
||||
60["Segment<br>[2099, 2106, 0]"]
|
||||
61[Solid2d]
|
||||
subgraph path94 [Path]
|
||||
94["Path<br>[3071, 3160, 0]"]
|
||||
95["Segment<br>[3071, 3160, 0]"]
|
||||
96[Solid2d]
|
||||
end
|
||||
subgraph path62 [Path]
|
||||
62["Path<br>[2117, 2162, 0]"]
|
||||
63["Segment<br>[2117, 2162, 0]"]
|
||||
64[Solid2d]
|
||||
subgraph path102 [Path]
|
||||
102["Path<br>[3435, 3523, 0]"]
|
||||
103["Segment<br>[3435, 3523, 0]"]
|
||||
104[Solid2d]
|
||||
end
|
||||
subgraph path65 [Path]
|
||||
65["Path<br>[2177, 2222, 0]"]
|
||||
66["Segment<br>[2177, 2222, 0]"]
|
||||
67[Solid2d]
|
||||
subgraph path110 [Path]
|
||||
110["Path<br>[3805, 3985, 0]"]
|
||||
111["Segment<br>[3805, 3985, 0]"]
|
||||
112[Solid2d]
|
||||
end
|
||||
subgraph path84 [Path]
|
||||
84["Path<br>[2430, 2456, 0]"]
|
||||
85["Segment<br>[2462, 2487, 0]"]
|
||||
86["Segment<br>[2493, 2534, 0]"]
|
||||
87["Segment<br>[2540, 2578, 0]"]
|
||||
88["Segment<br>[2584, 2591, 0]"]
|
||||
89[Solid2d]
|
||||
subgraph path120 [Path]
|
||||
120["Path<br>[4401, 4457, 0]"]
|
||||
121["Segment<br>[4401, 4457, 0]"]
|
||||
122[Solid2d]
|
||||
end
|
||||
subgraph path90 [Path]
|
||||
90["Path<br>[2602, 2648, 0]"]
|
||||
91["Segment<br>[2602, 2648, 0]"]
|
||||
92[Solid2d]
|
||||
end
|
||||
subgraph path93 [Path]
|
||||
93["Path<br>[2663, 2709, 0]"]
|
||||
94["Segment<br>[2663, 2709, 0]"]
|
||||
95[Solid2d]
|
||||
end
|
||||
1["Plane<br>[704, 722, 0]"]
|
||||
16["Sweep Extrusion<br>[1297, 1323, 0]"]
|
||||
17[Wall]
|
||||
18[Wall]
|
||||
19[Wall]
|
||||
20[Wall]
|
||||
21[Wall]
|
||||
22[Wall]
|
||||
23[Wall]
|
||||
24[Wall]
|
||||
25[Wall]
|
||||
26[Wall]
|
||||
27[Wall]
|
||||
1["Plane<br>[1204, 1221, 0]"]
|
||||
27["Sweep Extrusion<br>[2745, 2778, 0]"]
|
||||
28[Wall]
|
||||
29["Cap Start"]
|
||||
30["Cap End"]
|
||||
31["SweepEdge Opposite"]
|
||||
32["SweepEdge Adjacent"]
|
||||
33["SweepEdge Opposite"]
|
||||
34["SweepEdge Adjacent"]
|
||||
35["SweepEdge Opposite"]
|
||||
36["SweepEdge Adjacent"]
|
||||
37["SweepEdge Opposite"]
|
||||
38["SweepEdge Adjacent"]
|
||||
39["SweepEdge Opposite"]
|
||||
40["SweepEdge Adjacent"]
|
||||
41["SweepEdge Opposite"]
|
||||
42["SweepEdge Adjacent"]
|
||||
43["SweepEdge Opposite"]
|
||||
44["SweepEdge Adjacent"]
|
||||
45["SweepEdge Opposite"]
|
||||
46["SweepEdge Adjacent"]
|
||||
47["SweepEdge Opposite"]
|
||||
48["SweepEdge Adjacent"]
|
||||
49["SweepEdge Opposite"]
|
||||
50["SweepEdge Adjacent"]
|
||||
51["SweepEdge Opposite"]
|
||||
52["SweepEdge Adjacent"]
|
||||
53["SweepEdge Opposite"]
|
||||
54["SweepEdge Adjacent"]
|
||||
55["Plane<br>[1924, 1941, 0]"]
|
||||
68["Sweep Extrusion<br>[2232, 2259, 0]"]
|
||||
69[Wall]
|
||||
70[Wall]
|
||||
71[Wall]
|
||||
72[Wall]
|
||||
73["Cap Start"]
|
||||
74["Cap End"]
|
||||
75["SweepEdge Opposite"]
|
||||
76["SweepEdge Adjacent"]
|
||||
77["SweepEdge Opposite"]
|
||||
78["SweepEdge Adjacent"]
|
||||
79["SweepEdge Opposite"]
|
||||
80["SweepEdge Adjacent"]
|
||||
81["SweepEdge Opposite"]
|
||||
82["SweepEdge Adjacent"]
|
||||
83["Plane<br>[2407, 2424, 0]"]
|
||||
96["Sweep Extrusion<br>[2719, 2746, 0]"]
|
||||
97[Wall]
|
||||
29[Wall]
|
||||
30[Wall]
|
||||
31[Wall]
|
||||
32[Wall]
|
||||
33[Wall]
|
||||
34[Wall]
|
||||
35[Wall]
|
||||
36[Wall]
|
||||
37[Wall]
|
||||
38[Wall]
|
||||
39[Wall]
|
||||
40[Wall]
|
||||
41[Wall]
|
||||
42[Wall]
|
||||
43[Wall]
|
||||
44[Wall]
|
||||
45[Wall]
|
||||
46[Wall]
|
||||
47[Wall]
|
||||
48["Cap Start"]
|
||||
49["Cap End"]
|
||||
50["SweepEdge Opposite"]
|
||||
51["SweepEdge Adjacent"]
|
||||
52["SweepEdge Opposite"]
|
||||
53["SweepEdge Adjacent"]
|
||||
54["SweepEdge Opposite"]
|
||||
55["SweepEdge Adjacent"]
|
||||
56["SweepEdge Opposite"]
|
||||
57["SweepEdge Adjacent"]
|
||||
58["SweepEdge Opposite"]
|
||||
59["SweepEdge Adjacent"]
|
||||
60["SweepEdge Opposite"]
|
||||
61["SweepEdge Adjacent"]
|
||||
62["SweepEdge Opposite"]
|
||||
63["SweepEdge Adjacent"]
|
||||
64["SweepEdge Opposite"]
|
||||
65["SweepEdge Adjacent"]
|
||||
66["SweepEdge Opposite"]
|
||||
67["SweepEdge Adjacent"]
|
||||
68["SweepEdge Opposite"]
|
||||
69["SweepEdge Adjacent"]
|
||||
70["SweepEdge Opposite"]
|
||||
71["SweepEdge Adjacent"]
|
||||
72["SweepEdge Opposite"]
|
||||
73["SweepEdge Adjacent"]
|
||||
74["SweepEdge Opposite"]
|
||||
75["SweepEdge Adjacent"]
|
||||
76["SweepEdge Opposite"]
|
||||
77["SweepEdge Adjacent"]
|
||||
78["SweepEdge Opposite"]
|
||||
79["SweepEdge Adjacent"]
|
||||
80["SweepEdge Opposite"]
|
||||
81["SweepEdge Adjacent"]
|
||||
82["SweepEdge Opposite"]
|
||||
83["SweepEdge Adjacent"]
|
||||
84["SweepEdge Opposite"]
|
||||
85["SweepEdge Adjacent"]
|
||||
86["SweepEdge Opposite"]
|
||||
87["SweepEdge Adjacent"]
|
||||
88["SweepEdge Opposite"]
|
||||
89["SweepEdge Adjacent"]
|
||||
90["EdgeCut Fillet<br>[2784, 2955, 0]"]
|
||||
91["EdgeCut Fillet<br>[2784, 2955, 0]"]
|
||||
92["EdgeCut Fillet<br>[2784, 2955, 0]"]
|
||||
93["EdgeCut Fillet<br>[2784, 2955, 0]"]
|
||||
97["Sweep Extrusion<br>[3289, 3317, 0]"]
|
||||
98[Wall]
|
||||
99[Wall]
|
||||
100[Wall]
|
||||
101["Cap Start"]
|
||||
102["Cap End"]
|
||||
103["SweepEdge Opposite"]
|
||||
104["SweepEdge Adjacent"]
|
||||
105["SweepEdge Opposite"]
|
||||
106["SweepEdge Adjacent"]
|
||||
99["SweepEdge Opposite"]
|
||||
100["SweepEdge Adjacent"]
|
||||
101["Sweep Extrusion<br>[3289, 3317, 0]"]
|
||||
105["Sweep Extrusion<br>[3652, 3680, 0]"]
|
||||
106[Wall]
|
||||
107["SweepEdge Opposite"]
|
||||
108["SweepEdge Adjacent"]
|
||||
109["SweepEdge Opposite"]
|
||||
110["SweepEdge Adjacent"]
|
||||
111["EdgeCut Fillet<br>[1329, 1387, 0]"]
|
||||
112["EdgeCut Fillet<br>[1393, 1458, 0]"]
|
||||
113["EdgeCut Fillet<br>[1464, 1529, 0]"]
|
||||
114["EdgeCut Fillet<br>[1535, 1593, 0]"]
|
||||
115["EdgeCut Fillet<br>[1599, 1664, 0]"]
|
||||
116["EdgeCut Fillet<br>[1670, 1728, 0]"]
|
||||
117["EdgeCut Fillet<br>[1734, 1793, 0]"]
|
||||
118["EdgeCut Fillet<br>[1799, 1865, 0]"]
|
||||
119["EdgeCut Fillet<br>[2265, 2395, 0]"]
|
||||
120["EdgeCut Fillet<br>[2265, 2395, 0]"]
|
||||
121["EdgeCut Fillet<br>[2752, 2883, 0]"]
|
||||
122["EdgeCut Fillet<br>[2752, 2883, 0]"]
|
||||
109["Sweep Extrusion<br>[3652, 3680, 0]"]
|
||||
113["Sweep Extrusion<br>[4239, 4267, 0]"]
|
||||
114[Wall]
|
||||
115["SweepEdge Opposite"]
|
||||
116["SweepEdge Adjacent"]
|
||||
117["Sweep Extrusion<br>[4239, 4267, 0]"]
|
||||
118["Sweep Extrusion<br>[4239, 4267, 0]"]
|
||||
119["Sweep Extrusion<br>[4239, 4267, 0]"]
|
||||
123["Sweep Extrusion<br>[4463, 4491, 0]"]
|
||||
124[Wall]
|
||||
125["SweepEdge Opposite"]
|
||||
126["SweepEdge Adjacent"]
|
||||
127["StartSketchOnFace<br>[3029, 3065, 0]"]
|
||||
128["StartSketchOnFace<br>[3393, 3429, 0]"]
|
||||
129["StartSketchOnFace<br>[3763, 3799, 0]"]
|
||||
130["StartSketchOnFace<br>[4359, 4395, 0]"]
|
||||
1 --- 2
|
||||
2 --- 3
|
||||
2 --- 4
|
||||
@ -149,170 +153,187 @@ flowchart LR
|
||||
2 --- 12
|
||||
2 --- 13
|
||||
2 --- 14
|
||||
2 ---- 16
|
||||
2 --- 15
|
||||
2 --- 16
|
||||
2 --- 17
|
||||
2 --- 18
|
||||
2 --- 19
|
||||
2 --- 20
|
||||
2 --- 21
|
||||
2 --- 22
|
||||
2 --- 23
|
||||
2 --- 24
|
||||
2 --- 25
|
||||
2 ---- 27
|
||||
2 --- 26
|
||||
3 --- 28
|
||||
3 --- 53
|
||||
3 --- 54
|
||||
4 --- 27
|
||||
4 --- 51
|
||||
3 --- 50
|
||||
3 --- 51
|
||||
4 --- 29
|
||||
4 --- 52
|
||||
5 --- 26
|
||||
5 --- 49
|
||||
5 --- 50
|
||||
6 --- 25
|
||||
6 --- 47
|
||||
6 --- 48
|
||||
7 --- 24
|
||||
7 --- 45
|
||||
7 --- 46
|
||||
8 --- 23
|
||||
8 --- 43
|
||||
8 --- 44
|
||||
9 --- 22
|
||||
9 --- 41
|
||||
9 --- 42
|
||||
10 --- 21
|
||||
10 --- 39
|
||||
10 --- 40
|
||||
11 --- 20
|
||||
11 --- 37
|
||||
11 --- 38
|
||||
12 --- 19
|
||||
12 --- 35
|
||||
4 --- 53
|
||||
5 --- 30
|
||||
5 --- 54
|
||||
5 --- 55
|
||||
6 --- 31
|
||||
6 --- 56
|
||||
6 --- 57
|
||||
7 --- 32
|
||||
7 --- 58
|
||||
7 --- 59
|
||||
9 --- 33
|
||||
9 --- 60
|
||||
9 --- 61
|
||||
10 --- 34
|
||||
10 --- 62
|
||||
10 --- 63
|
||||
11 --- 35
|
||||
11 --- 64
|
||||
11 --- 65
|
||||
12 --- 36
|
||||
13 --- 18
|
||||
13 --- 33
|
||||
13 --- 34
|
||||
14 --- 17
|
||||
14 --- 31
|
||||
14 --- 32
|
||||
16 --- 17
|
||||
16 --- 18
|
||||
16 --- 19
|
||||
16 --- 20
|
||||
16 --- 21
|
||||
16 --- 22
|
||||
16 --- 23
|
||||
16 --- 24
|
||||
16 --- 25
|
||||
16 --- 26
|
||||
16 --- 27
|
||||
16 --- 28
|
||||
16 --- 29
|
||||
16 --- 30
|
||||
16 --- 31
|
||||
16 --- 32
|
||||
16 --- 33
|
||||
16 --- 34
|
||||
16 --- 35
|
||||
16 --- 36
|
||||
16 --- 37
|
||||
16 --- 38
|
||||
16 --- 39
|
||||
12 --- 66
|
||||
12 --- 67
|
||||
13 --- 37
|
||||
13 --- 68
|
||||
13 --- 69
|
||||
13 --- 90
|
||||
14 --- 38
|
||||
14 --- 70
|
||||
14 --- 71
|
||||
15 --- 39
|
||||
15 --- 72
|
||||
15 --- 73
|
||||
16 --- 40
|
||||
16 --- 41
|
||||
16 --- 42
|
||||
16 --- 43
|
||||
16 --- 44
|
||||
16 --- 45
|
||||
16 --- 46
|
||||
16 --- 47
|
||||
16 --- 48
|
||||
16 --- 49
|
||||
16 --- 50
|
||||
16 --- 51
|
||||
16 --- 52
|
||||
16 --- 53
|
||||
16 --- 54
|
||||
55 --- 56
|
||||
55 --- 62
|
||||
55 --- 65
|
||||
56 --- 57
|
||||
56 --- 58
|
||||
56 --- 59
|
||||
56 --- 60
|
||||
56 ---- 68
|
||||
56 --- 61
|
||||
57 --- 72
|
||||
57 --- 81
|
||||
57 --- 82
|
||||
58 --- 71
|
||||
58 --- 79
|
||||
58 --- 80
|
||||
59 --- 70
|
||||
59 --- 77
|
||||
59 --- 78
|
||||
60 --- 69
|
||||
60 --- 75
|
||||
60 --- 76
|
||||
62 --- 63
|
||||
62 --- 64
|
||||
65 --- 66
|
||||
65 --- 67
|
||||
68 --- 69
|
||||
68 --- 70
|
||||
68 --- 71
|
||||
68 --- 72
|
||||
68 --- 73
|
||||
68 --- 74
|
||||
68 --- 75
|
||||
68 --- 76
|
||||
68 --- 77
|
||||
68 --- 78
|
||||
68 --- 79
|
||||
68 --- 80
|
||||
68 --- 81
|
||||
68 --- 82
|
||||
83 --- 84
|
||||
83 --- 90
|
||||
83 --- 93
|
||||
84 --- 85
|
||||
84 --- 86
|
||||
84 --- 87
|
||||
84 --- 88
|
||||
84 ---- 96
|
||||
84 --- 89
|
||||
85 --- 97
|
||||
85 --- 103
|
||||
85 --- 104
|
||||
86 --- 98
|
||||
86 --- 105
|
||||
86 --- 106
|
||||
87 --- 99
|
||||
87 --- 107
|
||||
87 --- 108
|
||||
88 --- 100
|
||||
88 --- 109
|
||||
88 --- 110
|
||||
90 --- 91
|
||||
90 --- 92
|
||||
93 --- 94
|
||||
93 --- 95
|
||||
96 --- 97
|
||||
96 --- 98
|
||||
96 --- 99
|
||||
96 --- 100
|
||||
96 --- 101
|
||||
96 --- 102
|
||||
96 --- 103
|
||||
96 --- 104
|
||||
96 --- 105
|
||||
96 --- 106
|
||||
96 --- 107
|
||||
96 --- 108
|
||||
96 --- 109
|
||||
96 --- 110
|
||||
52 <--x 111
|
||||
50 <--x 112
|
||||
48 <--x 113
|
||||
46 <--x 114
|
||||
40 <--x 115
|
||||
38 <--x 116
|
||||
36 <--x 117
|
||||
34 <--x 118
|
||||
80 <--x 119
|
||||
78 <--x 120
|
||||
106 <--x 121
|
||||
108 <--x 122
|
||||
16 --- 74
|
||||
16 --- 75
|
||||
17 --- 41
|
||||
17 --- 76
|
||||
17 --- 77
|
||||
18 --- 42
|
||||
18 --- 78
|
||||
18 --- 79
|
||||
20 --- 43
|
||||
20 --- 80
|
||||
20 --- 81
|
||||
21 --- 44
|
||||
21 --- 82
|
||||
21 --- 83
|
||||
22 --- 45
|
||||
22 --- 84
|
||||
22 --- 85
|
||||
23 --- 46
|
||||
23 --- 86
|
||||
23 --- 87
|
||||
24 --- 47
|
||||
24 --- 88
|
||||
24 --- 89
|
||||
24 --- 92
|
||||
27 --- 28
|
||||
27 --- 29
|
||||
27 --- 30
|
||||
27 --- 31
|
||||
27 --- 32
|
||||
27 --- 33
|
||||
27 --- 34
|
||||
27 --- 35
|
||||
27 --- 36
|
||||
27 --- 37
|
||||
27 --- 38
|
||||
27 --- 39
|
||||
27 --- 40
|
||||
27 --- 41
|
||||
27 --- 42
|
||||
27 --- 43
|
||||
27 --- 44
|
||||
27 --- 45
|
||||
27 --- 46
|
||||
27 --- 47
|
||||
27 --- 48
|
||||
27 --- 49
|
||||
27 --- 50
|
||||
27 --- 51
|
||||
27 --- 52
|
||||
27 --- 53
|
||||
27 --- 54
|
||||
27 --- 55
|
||||
27 --- 56
|
||||
27 --- 57
|
||||
27 --- 58
|
||||
27 --- 59
|
||||
27 --- 60
|
||||
27 --- 61
|
||||
27 --- 62
|
||||
27 --- 63
|
||||
27 --- 64
|
||||
27 --- 65
|
||||
27 --- 66
|
||||
27 --- 67
|
||||
27 --- 68
|
||||
27 --- 69
|
||||
27 --- 70
|
||||
27 --- 71
|
||||
27 --- 72
|
||||
27 --- 73
|
||||
27 --- 74
|
||||
27 --- 75
|
||||
27 --- 76
|
||||
27 --- 77
|
||||
27 --- 78
|
||||
27 --- 79
|
||||
27 --- 80
|
||||
27 --- 81
|
||||
27 --- 82
|
||||
27 --- 83
|
||||
27 --- 84
|
||||
27 --- 85
|
||||
27 --- 86
|
||||
27 --- 87
|
||||
27 --- 88
|
||||
27 --- 89
|
||||
38 --- 94
|
||||
42 --- 110
|
||||
42 --- 120
|
||||
46 --- 102
|
||||
68 <--x 91
|
||||
88 <--x 93
|
||||
94 --- 95
|
||||
94 ---- 97
|
||||
94 --- 96
|
||||
95 --- 98
|
||||
95 --- 99
|
||||
95 --- 100
|
||||
97 --- 98
|
||||
97 --- 99
|
||||
97 --- 100
|
||||
102 --- 103
|
||||
102 ---- 105
|
||||
102 --- 104
|
||||
103 --- 106
|
||||
103 --- 107
|
||||
103 --- 108
|
||||
105 --- 106
|
||||
105 --- 107
|
||||
105 --- 108
|
||||
110 --- 111
|
||||
110 ---- 113
|
||||
110 --- 112
|
||||
111 --- 114
|
||||
111 --- 115
|
||||
111 --- 116
|
||||
113 --- 114
|
||||
113 --- 115
|
||||
113 --- 116
|
||||
120 --- 121
|
||||
120 ---- 123
|
||||
120 --- 122
|
||||
121 --- 124
|
||||
121 --- 125
|
||||
121 --- 126
|
||||
123 --- 124
|
||||
123 --- 125
|
||||
123 --- 126
|
||||
38 <--x 127
|
||||
46 <--x 128
|
||||
42 <--x 129
|
||||
42 <--x 130
|
||||
```
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 57 KiB |
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "kcl-python-bindings"
|
||||
version = "0.3.56"
|
||||
version = "0.3.57"
|
||||
edition = "2021"
|
||||
repository = "https://github.com/kittycad/modeling-app"
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "kcl-test-server"
|
||||
description = "A test server for KCL"
|
||||
version = "0.1.56"
|
||||
version = "0.1.57"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "kcl-to-core"
|
||||
description = "Utility methods to convert kcl to engine core executable tests"
|
||||
version = "0.1.56"
|
||||
version = "0.1.57"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
repository = "https://github.com/KittyCAD/modeling-app"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "kcl-wasm-lib"
|
||||
version = "0.1.56"
|
||||
version = "0.1.57"
|
||||
edition = "2021"
|
||||
repository = "https://github.com/KittyCAD/modeling-app"
|
||||
rust-version = "1.83"
|
||||
|
@ -261,7 +261,7 @@ export class SceneInfra {
|
||||
return null
|
||||
}
|
||||
|
||||
hoveredObject: null | any = null
|
||||
hoveredObject: null | Object3D<Object3DEventMap> = null
|
||||
raycaster = new Raycaster()
|
||||
planeRaycaster = new Raycaster()
|
||||
currentMouseVector = new Vector2()
|
||||
@ -487,11 +487,13 @@ export class SceneInfra {
|
||||
if (this.hoveredObject !== firstIntersectObject) {
|
||||
const hoveredObj = this.hoveredObject
|
||||
this.hoveredObject = null
|
||||
if (hoveredObj) {
|
||||
await this.onMouseLeave({
|
||||
selected: hoveredObj,
|
||||
mouseEvent: mouseEvent,
|
||||
intersectionPoint,
|
||||
})
|
||||
}
|
||||
this.hoveredObject = firstIntersectObject
|
||||
await this.onMouseEnter({
|
||||
selected: this.hoveredObject,
|
||||
|
@ -175,8 +175,11 @@ export const FileMachineProvider = ({
|
||||
commandBarActor.send({ type: 'Close' })
|
||||
navigate(
|
||||
`..${PATHS.FILE}/${encodeURIComponent(
|
||||
// TODO: Should this be context.selectedDirectory.path?
|
||||
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
||||
context.selectedDirectory +
|
||||
window.electron.path.sep +
|
||||
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
||||
event.output.name
|
||||
)}`
|
||||
)
|
||||
|
@ -591,6 +591,7 @@ class EngineConnection extends EventTarget {
|
||||
* did not establish.
|
||||
*/
|
||||
connect(reconnecting?: boolean): Promise<void> {
|
||||
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
||||
const that = this
|
||||
return new Promise((resolve) => {
|
||||
if (this.isConnecting() || this.isReady()) {
|
||||
|
@ -274,11 +274,17 @@ export const parse = (code: string | Error): ParseResult | Error => {
|
||||
}
|
||||
}
|
||||
|
||||
// Parse and throw an exception if there are any errors (probably not suitable for use outside of testing).
|
||||
export const assertParse = (code: string): Node<Program> => {
|
||||
/**
|
||||
* Parse and throw an exception if there are any errors (probably not suitable for use outside of testing).
|
||||
*/
|
||||
export function assertParse(code: string): Node<Program> {
|
||||
const result = parse(code)
|
||||
// eslint-disable-next-line suggest-no-throw/suggest-no-throw
|
||||
if (err(result) || !resultIsOk(result)) throw result
|
||||
if (err(result)) throw result
|
||||
if (!resultIsOk(result)) {
|
||||
// eslint-disable-next-line suggest-no-throw/suggest-no-throw
|
||||
throw new Error('parse result contains errors', { cause: result })
|
||||
}
|
||||
return result.program
|
||||
}
|
||||
|
||||
@ -565,8 +571,8 @@ export function base64Decode(base64: string): ArrayBuffer | Error {
|
||||
const decoded = base64_decode(base64)
|
||||
return new Uint8Array(decoded).buffer
|
||||
} catch (e) {
|
||||
console.error('Caught error decoding base64 string: ' + e)
|
||||
return new Error('Caught error decoding base64 string: ' + e)
|
||||
console.error('Caught error decoding base64 string', e)
|
||||
return new Error('Caught error decoding base64 string', { cause: e })
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ import type { WebContentSendPayload } from './menu/channels'
|
||||
|
||||
const typeSafeIpcRendererOn = (
|
||||
channel: Channel,
|
||||
listener: (event: IpcRendererEvent, ...args: any[]) => Promise<void> | any
|
||||
listener: (event: IpcRendererEvent, ...args: any[]) => void
|
||||
) => ipcRenderer.on(channel, listener)
|
||||
|
||||
const resizeWindow = (width: number, height: number) =>
|
||||
@ -163,7 +163,7 @@ const listMachines = async (
|
||||
})
|
||||
}
|
||||
|
||||
const getMachineApiIp = async (): Promise<String | null> =>
|
||||
const getMachineApiIp = async (): Promise<string | null> =>
|
||||
ipcRenderer.invoke('find_machine_api')
|
||||
|
||||
const getArgvParsed = () => {
|
||||
|
Reference in New Issue
Block a user