Gears DLC (free) (#6835)
* Gears DLC (free) Using the involuteCircular fn to create a variety of cylindrical gearsets * Delete public/kcl-samples/gear directory * Update main.kcl fixing gear meshing * new samples Signed-off-by: Jess Frazelle <github@jessfraz.com> * add link Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Jess Frazelle <github@jessfraz.com>
@ -34,7 +34,7 @@ The 3D view in Design Studio is just a video stream from our hosted geometry eng
|
|||||||
- WebSockets (via [KittyCAD TS client](https://github.com/KittyCAD/kittycad.ts))
|
- WebSockets (via [KittyCAD TS client](https://github.com/KittyCAD/kittycad.ts))
|
||||||
- Code Editor
|
- Code Editor
|
||||||
- [CodeMirror](https://codemirror.net/)
|
- [CodeMirror](https://codemirror.net/)
|
||||||
- Custom WASM LSP Server
|
- [Custom WASM LSP Server](https://github.com/KittyCAD/modeling-app/tree/main/rust/kcl-lib/src/lsp/kcl)
|
||||||
- Modeling
|
- Modeling
|
||||||
- [KittyCAD TypeScript client](https://github.com/KittyCAD/kittycad.ts)
|
- [KittyCAD TypeScript client](https://github.com/KittyCAD/kittycad.ts)
|
||||||
|
|
||||||
|
|||||||
@ -55,8 +55,6 @@ When you submit a PR to add or modify KCL samples, images will be generated and
|
|||||||
[](food-service-spatula/main.kcl)
|
[](food-service-spatula/main.kcl)
|
||||||
#### [french-press](french-press/main.kcl) ([screenshot](screenshots/french-press.png))
|
#### [french-press](french-press/main.kcl) ([screenshot](screenshots/french-press.png))
|
||||||
[](french-press/main.kcl)
|
[](french-press/main.kcl)
|
||||||
#### [gear](gear/main.kcl) ([screenshot](screenshots/gear.png))
|
|
||||||
[](gear/main.kcl)
|
|
||||||
#### [gear-rack](gear-rack/main.kcl) ([screenshot](screenshots/gear-rack.png))
|
#### [gear-rack](gear-rack/main.kcl) ([screenshot](screenshots/gear-rack.png))
|
||||||
[](gear-rack/main.kcl)
|
[](gear-rack/main.kcl)
|
||||||
#### [gridfinity-baseplate](gridfinity-baseplate/main.kcl) ([screenshot](screenshots/gridfinity-baseplate.png))
|
#### [gridfinity-baseplate](gridfinity-baseplate/main.kcl) ([screenshot](screenshots/gridfinity-baseplate.png))
|
||||||
@ -67,6 +65,14 @@ When you submit a PR to add or modify KCL samples, images will be generated and
|
|||||||
[](gridfinity-bins/main.kcl)
|
[](gridfinity-bins/main.kcl)
|
||||||
#### [gridfinity-bins-stacking-lip](gridfinity-bins-stacking-lip/main.kcl) ([screenshot](screenshots/gridfinity-bins-stacking-lip.png))
|
#### [gridfinity-bins-stacking-lip](gridfinity-bins-stacking-lip/main.kcl) ([screenshot](screenshots/gridfinity-bins-stacking-lip.png))
|
||||||
[](gridfinity-bins-stacking-lip/main.kcl)
|
[](gridfinity-bins-stacking-lip/main.kcl)
|
||||||
|
#### [helical-gear](helical-gear/main.kcl) ([screenshot](screenshots/helical-gear.png))
|
||||||
|
[](helical-gear/main.kcl)
|
||||||
|
#### [helical-planetary-gearset](helical-planetary-gearset/main.kcl) ([screenshot](screenshots/helical-planetary-gearset.png))
|
||||||
|
[](helical-planetary-gearset/main.kcl)
|
||||||
|
#### [herringbone-gear](herringbone-gear/main.kcl) ([screenshot](screenshots/herringbone-gear.png))
|
||||||
|
[](herringbone-gear/main.kcl)
|
||||||
|
#### [herringbone-planetary-gearset](herringbone-planetary-gearset/main.kcl) ([screenshot](screenshots/herringbone-planetary-gearset.png))
|
||||||
|
[](herringbone-planetary-gearset/main.kcl)
|
||||||
#### [hex-nut](hex-nut/main.kcl) ([screenshot](screenshots/hex-nut.png))
|
#### [hex-nut](hex-nut/main.kcl) ([screenshot](screenshots/hex-nut.png))
|
||||||
[](hex-nut/main.kcl)
|
[](hex-nut/main.kcl)
|
||||||
#### [i-beam](i-beam/main.kcl) ([screenshot](screenshots/i-beam.png))
|
#### [i-beam](i-beam/main.kcl) ([screenshot](screenshots/i-beam.png))
|
||||||
@ -101,6 +107,10 @@ When you submit a PR to add or modify KCL samples, images will be generated and
|
|||||||
[](sheet-metal-bracket/main.kcl)
|
[](sheet-metal-bracket/main.kcl)
|
||||||
#### [socket-head-cap-screw](socket-head-cap-screw/main.kcl) ([screenshot](screenshots/socket-head-cap-screw.png))
|
#### [socket-head-cap-screw](socket-head-cap-screw/main.kcl) ([screenshot](screenshots/socket-head-cap-screw.png))
|
||||||
[](socket-head-cap-screw/main.kcl)
|
[](socket-head-cap-screw/main.kcl)
|
||||||
|
#### [spur-gear](spur-gear/main.kcl) ([screenshot](screenshots/spur-gear.png))
|
||||||
|
[](spur-gear/main.kcl)
|
||||||
|
#### [spur-reduction-gearset](spur-reduction-gearset/main.kcl) ([screenshot](screenshots/spur-reduction-gearset.png))
|
||||||
|
[](spur-reduction-gearset/main.kcl)
|
||||||
#### [utility-sink](utility-sink/main.kcl) ([screenshot](screenshots/utility-sink.png))
|
#### [utility-sink](utility-sink/main.kcl) ([screenshot](screenshots/utility-sink.png))
|
||||||
[](utility-sink/main.kcl)
|
[](utility-sink/main.kcl)
|
||||||
#### [walkie-talkie](walkie-talkie/main.kcl) ([screenshot](screenshots/walkie-talkie.png))
|
#### [walkie-talkie](walkie-talkie/main.kcl) ([screenshot](screenshots/walkie-talkie.png))
|
||||||
|
|||||||
@ -1,112 +0,0 @@
|
|||||||
// Spur Gear
|
|
||||||
// A rotating machine part having cut teeth or, in the case of a cogwheel, inserted teeth (called cogs), which mesh with another toothed part to transmit torque. Geared devices can change the speed, torque, and direction of a power source. The two elements that define a gear are its circular shape and the teeth that are integrated into its outer edge, which are designed to fit into the teeth of another gear.
|
|
||||||
|
|
||||||
// Set units
|
|
||||||
@settings(defaultLengthUnit = in, kclVersion = 1.0)
|
|
||||||
|
|
||||||
// Define parameters
|
|
||||||
nTeeth = 21
|
|
||||||
module = 0.5
|
|
||||||
pitchDiameter = module * nTeeth
|
|
||||||
pressureAngle = 20
|
|
||||||
addendum = module
|
|
||||||
deddendum = 1.25 * module
|
|
||||||
baseDiameter = pitchDiameter * cos(pressureAngle)
|
|
||||||
tipDiameter = pitchDiameter + 2 * module
|
|
||||||
gearHeight = 3
|
|
||||||
|
|
||||||
// Interpolate points along the involute curve
|
|
||||||
cmo = 101
|
|
||||||
rs = map(
|
|
||||||
[0..cmo],
|
|
||||||
f = fn(@i) {
|
|
||||||
return baseDiameter / 2 + i / cmo * (tipDiameter - baseDiameter) / 2
|
|
||||||
},
|
|
||||||
)
|
|
||||||
|
|
||||||
// Calculate operating pressure angle
|
|
||||||
angles = map(
|
|
||||||
rs,
|
|
||||||
f = fn(@r) {
|
|
||||||
return units::toDegrees(acos(baseDiameter / 2 / r))
|
|
||||||
},
|
|
||||||
)
|
|
||||||
|
|
||||||
// Calculate the involute function
|
|
||||||
invas = map(
|
|
||||||
angles,
|
|
||||||
f = fn(@a) {
|
|
||||||
return tan(a) - units::toRadians(a)
|
|
||||||
},
|
|
||||||
)
|
|
||||||
|
|
||||||
// Map the involute curve
|
|
||||||
xs = map(
|
|
||||||
[0..cmo],
|
|
||||||
f = fn(@i) {
|
|
||||||
return rs[i] * cos(invas[i]: number(rad))
|
|
||||||
},
|
|
||||||
)
|
|
||||||
|
|
||||||
ys = map(
|
|
||||||
[0..cmo],
|
|
||||||
f = fn(@i) {
|
|
||||||
return rs[i] * sin(invas[i]: number(rad))
|
|
||||||
},
|
|
||||||
)
|
|
||||||
|
|
||||||
// Extrude the gear body
|
|
||||||
body = startSketchOn(XY)
|
|
||||||
|> circle(center = [0, 0], radius = baseDiameter / 2)
|
|
||||||
|> extrude(length = gearHeight)
|
|
||||||
|
|
||||||
toothAngle = 360 / nTeeth / 1.5
|
|
||||||
|
|
||||||
// Plot the involute curve
|
|
||||||
fn leftInvolute(@i, accum) {
|
|
||||||
j = 100 - i // iterate backwards
|
|
||||||
return line(accum, endAbsolute = [xs[j], ys[j]])
|
|
||||||
}
|
|
||||||
|
|
||||||
fn rightInvolute(@i, accum) {
|
|
||||||
x = rs[i] * cos(-toothAngle + units::toDegrees(atan(ys[i] / xs[i])))
|
|
||||||
y = -rs[i] * sin(-toothAngle + units::toDegrees(atan(ys[i] / xs[i])))
|
|
||||||
return line(accum, endAbsolute = [x, y])
|
|
||||||
}
|
|
||||||
|
|
||||||
// Draw gear teeth
|
|
||||||
start = startSketchOn(XY)
|
|
||||||
|> startProfile(at = [xs[101], ys[101]])
|
|
||||||
teeth = reduce([0..100], initial = start, f = leftInvolute)
|
|
||||||
|> arc(angleStart = 0, angleEnd = toothAngle, radius = baseDiameter / 2)
|
|
||||||
|> reduce([1..101], initial = %, f = rightInvolute)
|
|
||||||
|> close()
|
|
||||||
|> extrude(length = gearHeight)
|
|
||||||
|> patternCircular3d(
|
|
||||||
axis = [0, 0, 1],
|
|
||||||
center = [0, 0, 0],
|
|
||||||
instances = nTeeth,
|
|
||||||
arcDegrees = 360,
|
|
||||||
rotateDuplicates = true,
|
|
||||||
)
|
|
||||||
|
|
||||||
// Define the constants of the keyway and the bore hole
|
|
||||||
keywayWidth = 0.250
|
|
||||||
keywayDepth = keywayWidth / 2
|
|
||||||
holeDiam = 2
|
|
||||||
holeRadius = 1
|
|
||||||
startAngle = asin(keywayWidth / 2 / holeRadius)
|
|
||||||
|
|
||||||
// Sketch the keyway and center hole and extrude
|
|
||||||
keyWay = startSketchOn(body, face = END)
|
|
||||||
|> startProfile(at = [
|
|
||||||
holeRadius * cos(startAngle),
|
|
||||||
holeRadius * sin(startAngle)
|
|
||||||
])
|
|
||||||
|> xLine(length = keywayDepth)
|
|
||||||
|> yLine(length = -keywayWidth)
|
|
||||||
|> xLine(length = -keywayDepth)
|
|
||||||
|> arc(angleStart = -1 * units::toDegrees(startAngle) + 360, angleEnd = 180, radius = holeRadius)
|
|
||||||
|> arc(angleStart = 180, angleEnd = units::toDegrees(startAngle), radius = holeRadius)
|
|
||||||
|> close()
|
|
||||||
|> extrude(length = -gearHeight)
|
|
||||||
99
public/kcl-samples/helical-gear/main.kcl
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
// Helical Gear
|
||||||
|
// A helical gear is a type of cylindrical gear where the teeth are slanted at an angle relative to the axis of rotation. This greatly reduces noise and wear when transmitting torque across meshed spinning gears
|
||||||
|
|
||||||
|
// Set units
|
||||||
|
@settings(defaultLengthUnit = mm)
|
||||||
|
|
||||||
|
// Define a function to create a helical gear
|
||||||
|
fn helicalGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) {
|
||||||
|
// Calculate gear parameters
|
||||||
|
pitchDiameter = module * nTeeth
|
||||||
|
addendum = module
|
||||||
|
deddendum = 1.25 * module
|
||||||
|
baseDiameter = pitchDiameter * cos(pressureAngle)
|
||||||
|
tipDiameter = pitchDiameter + 2 * module
|
||||||
|
|
||||||
|
// Define the constants of the keyway and the bore hole
|
||||||
|
keywayWidth = 2
|
||||||
|
keywayDepth = keywayWidth / 2
|
||||||
|
holeDiam = 7
|
||||||
|
holeRadius = holeDiam / 2
|
||||||
|
startAngle = asin(keywayWidth / 2 / holeRadius)
|
||||||
|
|
||||||
|
// Sketch the keyway and center hole
|
||||||
|
holeWithKeyway = startSketchOn(XY)
|
||||||
|
|> startProfile(at = [
|
||||||
|
holeRadius * cos(startAngle),
|
||||||
|
holeRadius * sin(startAngle)
|
||||||
|
])
|
||||||
|
|> xLine(length = keywayDepth)
|
||||||
|
|> yLine(length = -keywayWidth)
|
||||||
|
|> xLine(length = -keywayDepth)
|
||||||
|
|> arc(angleStart = -1 * startAngle + 360, angleEnd = 180, radius = holeRadius)
|
||||||
|
|> arc(angleStart = 180, angleEnd = startAngle, radius = holeRadius)
|
||||||
|
|> close()
|
||||||
|
|
||||||
|
// Define a function to create a rotated gear sketch on an offset plane
|
||||||
|
fn helicalGearSketch(offsetHeight) {
|
||||||
|
// Calculate the amount to rotate each planar sketch of the gear given the gear helix angle and total gear height
|
||||||
|
helixCalc = acos(offsetHeight * tan(helixAngle) / (tipDiameter / 2))
|
||||||
|
|
||||||
|
// Using the gear parameters, sketch an involute tooth spanning from the base diameter to the tip diameter
|
||||||
|
helicalGearSketch = startSketchOn(offsetPlane(XY, offset = offsetHeight))
|
||||||
|
|> startProfile(at = polar(angle = helixCalc, length = baseDiameter / 2))
|
||||||
|
|> involuteCircular(
|
||||||
|
startRadius = baseDiameter / 2,
|
||||||
|
endRadius = tipDiameter / 2,
|
||||||
|
angle = helixCalc,
|
||||||
|
tag = $seg01,
|
||||||
|
)
|
||||||
|
|> line(endAbsolute = polar(angle = 160 / nTeeth + helixCalc, length = tipDiameter / 2))
|
||||||
|
|> involuteCircular(
|
||||||
|
startRadius = baseDiameter / 2,
|
||||||
|
endRadius = tipDiameter / 2,
|
||||||
|
angle = -(4 * atan(segEndY(seg01) / segEndX(seg01)) - (3 * helixCalc)),
|
||||||
|
reverse = true,
|
||||||
|
)
|
||||||
|
|
||||||
|
// Position the end line of the sketch at the start of the next tooth
|
||||||
|
|> line(endAbsolute = polar(angle = 360 / nTeeth + helixCalc, length = baseDiameter / 2))
|
||||||
|
|
||||||
|
// Pattern the sketch about the center by the specified number of teeth, then close the sketch
|
||||||
|
|> patternCircular2d(
|
||||||
|
%,
|
||||||
|
instances = nTeeth,
|
||||||
|
center = [0, 0],
|
||||||
|
arcDegrees = 360,
|
||||||
|
rotateDuplicates = true,
|
||||||
|
)
|
||||||
|
|> close()
|
||||||
|
|> subtract2d(tool = holeWithKeyway)
|
||||||
|
return helicalGearSketch
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw a gear sketch on the base plane
|
||||||
|
gearSketch001 = helicalGearSketch(offsetHeight = 0)
|
||||||
|
|
||||||
|
// Draw a rotated gear sketch on a middle interstitial plane
|
||||||
|
gearSketch002 = helicalGearSketch(offsetHeight = gearHeight / 2)
|
||||||
|
|
||||||
|
// Draw a rotated gear sketch at the gear height offset plane
|
||||||
|
gearSketch003 = helicalGearSketch(offsetHeight = gearHeight)
|
||||||
|
|
||||||
|
// Loft each rotated gear sketch together to form a helical gear
|
||||||
|
helicalGear = loft([
|
||||||
|
gearSketch001,
|
||||||
|
gearSketch002,
|
||||||
|
gearSketch003
|
||||||
|
])
|
||||||
|
|
||||||
|
return helicalGear
|
||||||
|
}
|
||||||
|
|
||||||
|
helicalGear(
|
||||||
|
nTeeth = 21,
|
||||||
|
module = 2,
|
||||||
|
pressureAngle = 20,
|
||||||
|
helixAngle = 35,
|
||||||
|
gearHeight = 7,
|
||||||
|
)
|
||||||
197
public/kcl-samples/helical-planetary-gearset/main.kcl
Normal file
@ -0,0 +1,197 @@
|
|||||||
|
// Helical Planetary Gearset
|
||||||
|
// A helical planetary gearset is a type of planetary gear system where the teeth of the sun gear, planet gears, and/or ring gear are helical rather than straight. This design allows for smoother, quieter operation, greater load-carrying capacity, and more flexible shaft alignment.
|
||||||
|
|
||||||
|
// Set units
|
||||||
|
@settings(defaultLengthUnit = mm)
|
||||||
|
|
||||||
|
// Define a function to create a helical gear
|
||||||
|
fn helicalGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) {
|
||||||
|
// Calculate gear parameters
|
||||||
|
pitchDiameter = module * nTeeth
|
||||||
|
addendum = module
|
||||||
|
deddendum = 1.25 * module
|
||||||
|
baseDiameter = pitchDiameter * cos(pressureAngle)
|
||||||
|
tipDiameter = pitchDiameter + 2 * module
|
||||||
|
|
||||||
|
// Define the constants of the keyway and the bore hole
|
||||||
|
keywayWidth = 1
|
||||||
|
keywayDepth = keywayWidth / 2
|
||||||
|
holeDiam = 7
|
||||||
|
holeRadius = holeDiam / 2
|
||||||
|
startAngle = asin(keywayWidth / 2 / holeRadius)
|
||||||
|
|
||||||
|
// Sketch the keyway and center hole
|
||||||
|
holeWithKeyway = startSketchOn(XY)
|
||||||
|
|> startProfile(at = [
|
||||||
|
holeRadius * cos(startAngle),
|
||||||
|
holeRadius * sin(startAngle)
|
||||||
|
])
|
||||||
|
|> xLine(length = keywayDepth)
|
||||||
|
|> yLine(length = -keywayWidth)
|
||||||
|
|> xLine(length = -keywayDepth)
|
||||||
|
|> arc(angleStart = -1 * startAngle + 360, angleEnd = 180, radius = holeRadius)
|
||||||
|
|> arc(angleStart = 180, angleEnd = startAngle, radius = holeRadius)
|
||||||
|
|> close()
|
||||||
|
|
||||||
|
// Define a function to create a rotated gear sketch on an offset plane
|
||||||
|
fn helicalGearSketch(offsetHeight) {
|
||||||
|
// Calculate the amount to rotate each planar sketch of the gear given the gear helix angle and total gear height
|
||||||
|
helixCalc = acos(offsetHeight * tan(helixAngle) / (tipDiameter / 2))
|
||||||
|
|
||||||
|
// Using the gear parameters, sketch an involute tooth spanning from the base diameter to the tip diameter
|
||||||
|
helicalGearSketch = startSketchOn(offsetPlane(XY, offset = offsetHeight))
|
||||||
|
|> startProfile(at = polar(angle = helixCalc, length = baseDiameter / 2))
|
||||||
|
|> involuteCircular(
|
||||||
|
startRadius = baseDiameter / 2,
|
||||||
|
endRadius = tipDiameter / 2,
|
||||||
|
angle = helixCalc,
|
||||||
|
tag = $seg01,
|
||||||
|
)
|
||||||
|
|> line(endAbsolute = polar(angle = 160 / nTeeth + helixCalc, length = tipDiameter / 2))
|
||||||
|
|> involuteCircular(
|
||||||
|
startRadius = baseDiameter / 2,
|
||||||
|
endRadius = tipDiameter / 2,
|
||||||
|
angle = -(4 * atan(segEndY(seg01) / segEndX(seg01)) - (3 * helixCalc)),
|
||||||
|
reverse = true,
|
||||||
|
)
|
||||||
|
|
||||||
|
// Position the end line of the sketch at the start of the next tooth
|
||||||
|
|> line(endAbsolute = polar(angle = 360 / nTeeth + helixCalc, length = baseDiameter / 2))
|
||||||
|
|
||||||
|
// Pattern the sketch about the center by the specified number of teeth, then close the sketch
|
||||||
|
|> patternCircular2d(
|
||||||
|
%,
|
||||||
|
instances = nTeeth,
|
||||||
|
center = [0, 0],
|
||||||
|
arcDegrees = 360,
|
||||||
|
rotateDuplicates = true,
|
||||||
|
)
|
||||||
|
|> close()
|
||||||
|
|> subtract2d(tool = holeWithKeyway)
|
||||||
|
return helicalGearSketch
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw a gear sketch on the base plane
|
||||||
|
gearSketch001 = helicalGearSketch(offsetHeight = 0)
|
||||||
|
|
||||||
|
// Draw a rotated gear sketch on a middle interstitial plane
|
||||||
|
gearSketch002 = helicalGearSketch(offsetHeight = gearHeight / 2)
|
||||||
|
|
||||||
|
// Draw a rotated gear sketch at the gear height offset plane
|
||||||
|
gearSketch003 = helicalGearSketch(offsetHeight = gearHeight)
|
||||||
|
|
||||||
|
// Loft each rotated gear sketch together to form a helical gear
|
||||||
|
helicalGear = loft([
|
||||||
|
gearSketch001,
|
||||||
|
gearSketch002,
|
||||||
|
gearSketch003
|
||||||
|
])
|
||||||
|
|
||||||
|
return helicalGear
|
||||||
|
}
|
||||||
|
|
||||||
|
// Define a function to create a ring gear
|
||||||
|
fn ringGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) {
|
||||||
|
// Calculate gear parameters
|
||||||
|
pitchDiameter = module * nTeeth
|
||||||
|
addendum = module
|
||||||
|
deddendum = 1.25 * module
|
||||||
|
baseDiameter = pitchDiameter * cos(pressureAngle)
|
||||||
|
tipDiameter = pitchDiameter + 2 * module
|
||||||
|
|
||||||
|
// Define a function to create a rotated gear sketch on an offset plane
|
||||||
|
fn ringGearSketch(offsetHeight) {
|
||||||
|
// Calculate the amount to rotate each planar sketch of the gear given the gear helix angle and total gear height
|
||||||
|
helixCalc = acos(offsetHeight * tan(helixAngle) / (tipDiameter / 2))
|
||||||
|
|
||||||
|
// Using the gear parameters, sketch an involute tooth spanning from the base diameter to the tip diameter
|
||||||
|
ringTeeth = startSketchOn(offsetPlane(XY, offset = offsetHeight))
|
||||||
|
|> startProfile(at = polar(angle = helixCalc, length = baseDiameter / 2))
|
||||||
|
|> involuteCircular(
|
||||||
|
startRadius = baseDiameter / 2,
|
||||||
|
endRadius = tipDiameter / 2,
|
||||||
|
angle = helixCalc,
|
||||||
|
tag = $seg01,
|
||||||
|
)
|
||||||
|
|> line(endAbsolute = polar(angle = 200 / nTeeth + helixCalc, length = tipDiameter / 2))
|
||||||
|
|> involuteCircular(
|
||||||
|
startRadius = baseDiameter / 2,
|
||||||
|
endRadius = tipDiameter / 2,
|
||||||
|
angle = -(4 * atan(segEndY(seg01) / segEndX(seg01)) - (3 * helixCalc)),
|
||||||
|
reverse = true,
|
||||||
|
)
|
||||||
|
|
||||||
|
// Position the end line of the sketch at the start of the next tooth
|
||||||
|
|> line(endAbsolute = polar(angle = 360 / nTeeth + helixCalc, length = baseDiameter / 2))
|
||||||
|
|
||||||
|
// Pattern the sketch about the center by the specified number of teeth, then close the sketch
|
||||||
|
|> patternCircular2d(
|
||||||
|
%,
|
||||||
|
instances = nTeeth,
|
||||||
|
center = [0, 0],
|
||||||
|
arcDegrees = 360,
|
||||||
|
rotateDuplicates = true,
|
||||||
|
)
|
||||||
|
|> close()
|
||||||
|
|
||||||
|
// Create a circular body that is larger than the tip diameter of the gear, then subtract the gear profile from the body
|
||||||
|
ringGearSketch = startSketchOn(offsetPlane(XY, offset = offsetHeight))
|
||||||
|
|> circle(center = [0, 0], radius = tipDiameter / 1.85)
|
||||||
|
|> subtract2d(tool = ringTeeth)
|
||||||
|
return ringGearSketch
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw a gear sketch on the base plane
|
||||||
|
gearSketch001 = ringGearSketch(offsetHeight = 0)
|
||||||
|
|
||||||
|
// Draw a rotated gear sketch on a middle interstitial plane
|
||||||
|
gearSketch002 = ringGearSketch(offsetHeight = gearHeight / 2)
|
||||||
|
|
||||||
|
// Draw a rotated gear sketch at the gear height offset plane
|
||||||
|
gearSketch003 = ringGearSketch(offsetHeight = gearHeight)
|
||||||
|
|
||||||
|
// Loft each rotated gear sketch together to form a ring gear
|
||||||
|
ringGear = loft([
|
||||||
|
gearSketch001,
|
||||||
|
gearSketch002,
|
||||||
|
gearSketch003
|
||||||
|
])
|
||||||
|
|
||||||
|
return ringGear
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create the outer ring gear for the planetary gearset
|
||||||
|
ringGear(
|
||||||
|
nTeeth = 42,
|
||||||
|
module = 1.5,
|
||||||
|
pressureAngle = 14,
|
||||||
|
helixAngle = -25,
|
||||||
|
gearHeight = 5,
|
||||||
|
)
|
||||||
|
|
||||||
|
// Create a central sun gear using a small helical gear
|
||||||
|
helicalGear(
|
||||||
|
nTeeth = 12,
|
||||||
|
module = 1.5,
|
||||||
|
pressureAngle = 14,
|
||||||
|
helixAngle = 25,
|
||||||
|
gearHeight = 5,
|
||||||
|
)
|
||||||
|
|
||||||
|
// Create the helical planet gears
|
||||||
|
numPlanetGears = 3
|
||||||
|
helicalGear(
|
||||||
|
nTeeth = 12,
|
||||||
|
module = 1.5,
|
||||||
|
pressureAngle = 14,
|
||||||
|
helixAngle = -25,
|
||||||
|
gearHeight = 5,
|
||||||
|
)
|
||||||
|
|> translate(y = (12 + 12) / 2 * 1.5 + 2.7)
|
||||||
|
|> patternCircular3d(
|
||||||
|
instances = numPlanetGears,
|
||||||
|
axis = [0, 0, 1],
|
||||||
|
center = [0, 0, 0],
|
||||||
|
arcDegrees = 360,
|
||||||
|
rotateDuplicates = false,
|
||||||
|
)
|
||||||
84
public/kcl-samples/herringbone-gear/main.kcl
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
// Herringbone Gear
|
||||||
|
// A herringbone, or double-helical gear, is a cylindrical gear type with angled teeth in opposing directions. This allows the quietness and smoothness of a helical gear, without applying a directional load while turning
|
||||||
|
|
||||||
|
// Set units
|
||||||
|
@settings(defaultLengthUnit = mm)
|
||||||
|
|
||||||
|
// Define a function to create a herringbone gear
|
||||||
|
fn herringboneGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) {
|
||||||
|
// Calculate gear parameters
|
||||||
|
pitchDiameter = module * nTeeth
|
||||||
|
addendum = module
|
||||||
|
deddendum = 1.25 * module
|
||||||
|
baseDiameter = pitchDiameter * cos(pressureAngle)
|
||||||
|
tipDiameter = pitchDiameter + 2 * module
|
||||||
|
|
||||||
|
// Define a function to create a rotated gear sketch on an offset plane
|
||||||
|
fn herringboneGearSketch(offsetHeight) {
|
||||||
|
// Calculate the amount to rotate each planar sketch of the gear given the gear helix angle and total gear height
|
||||||
|
helixCalc = acos(offsetHeight * tan(helixAngle) / (tipDiameter / 2))
|
||||||
|
|
||||||
|
// Using the gear parameters, sketch an involute tooth spanning from the base diameter to the tip diameter
|
||||||
|
herringboneGearSketch = startSketchOn(offsetPlane(XY, offset = offsetHeight))
|
||||||
|
|> startProfile(at = polar(angle = helixCalc, length = baseDiameter / 2))
|
||||||
|
|> involuteCircular(
|
||||||
|
startRadius = baseDiameter / 2,
|
||||||
|
endRadius = tipDiameter / 2,
|
||||||
|
angle = helixCalc,
|
||||||
|
tag = $seg01,
|
||||||
|
)
|
||||||
|
|> line(endAbsolute = polar(angle = 160 / nTeeth + helixCalc, length = tipDiameter / 2))
|
||||||
|
|> involuteCircular(
|
||||||
|
startRadius = baseDiameter / 2,
|
||||||
|
endRadius = tipDiameter / 2,
|
||||||
|
angle = -(4 * atan(segEndY(seg01) / segEndX(seg01)) - (3 * helixCalc)),
|
||||||
|
reverse = true,
|
||||||
|
)
|
||||||
|
|
||||||
|
// Position the end line of the sketch at the start of the next tooth
|
||||||
|
|> line(endAbsolute = polar(angle = 360 / nTeeth + helixCalc, length = baseDiameter / 2))
|
||||||
|
|
||||||
|
// Pattern the sketch about the center by the specified number of teeth, then close the sketch
|
||||||
|
|> patternCircular2d(
|
||||||
|
%,
|
||||||
|
instances = nTeeth,
|
||||||
|
center = [0, 0],
|
||||||
|
arcDegrees = 360,
|
||||||
|
rotateDuplicates = true,
|
||||||
|
)
|
||||||
|
|> close()
|
||||||
|
// Create a center hole with an 8mm diameter
|
||||||
|
|> subtract2d(tool = circle(center = [0, 0], radius = 4))
|
||||||
|
return herringboneGearSketch
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw a gear sketch on the base plane
|
||||||
|
gearSketch001 = herringboneGearSketch(offsetHeight = 0)
|
||||||
|
|
||||||
|
// Draw a gear sketch that has been rotated by the helix angle
|
||||||
|
gearSketch002 = herringboneGearSketch(offsetHeight = gearHeight / 2)
|
||||||
|
|
||||||
|
// Draw a gear sketch at the total gear height that reverses the angle direction
|
||||||
|
gearSketch003 = clone(gearSketch001)
|
||||||
|
|> translate(z = gearHeight)
|
||||||
|
|
||||||
|
// Loft each rotated gear sketch together to form a herringbone gear
|
||||||
|
herringboneGear = loft(
|
||||||
|
[
|
||||||
|
gearSketch001,
|
||||||
|
gearSketch002,
|
||||||
|
gearSketch003
|
||||||
|
],
|
||||||
|
vDegree = 1,
|
||||||
|
)
|
||||||
|
|
||||||
|
return herringboneGear
|
||||||
|
}
|
||||||
|
|
||||||
|
herringboneGear(
|
||||||
|
nTeeth = 25,
|
||||||
|
module = 1,
|
||||||
|
pressureAngle = 14,
|
||||||
|
helixAngle = 40,
|
||||||
|
gearHeight = 8,
|
||||||
|
)
|
||||||
186
public/kcl-samples/herringbone-planetary-gearset/main.kcl
Normal file
@ -0,0 +1,186 @@
|
|||||||
|
// Herringbone Planetary Gearset
|
||||||
|
// A herringbone planetary gearset is a type of planetary gear system where the teeth of the sun gear, planet gears, and/or ring gear are herringbone rather than straight. This design allows for smoother, quieter operation, greater load-carrying capacity, and more flexible shaft alignment.
|
||||||
|
|
||||||
|
// Set units
|
||||||
|
@settings(defaultLengthUnit = mm)
|
||||||
|
|
||||||
|
// Define a function to create a herringbone gear
|
||||||
|
fn herringboneGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) {
|
||||||
|
// Calculate gear parameters
|
||||||
|
pitchDiameter = module * nTeeth
|
||||||
|
addendum = module
|
||||||
|
deddendum = 1.25 * module
|
||||||
|
baseDiameter = pitchDiameter * cos(pressureAngle)
|
||||||
|
tipDiameter = pitchDiameter + 2 * module
|
||||||
|
|
||||||
|
// Define a function to create a rotated gear sketch on an offset plane
|
||||||
|
fn herringboneGearSketch(offsetHeight) {
|
||||||
|
// Calculate the amount to rotate each planar sketch of the gear given the gear helix angle and total gear height
|
||||||
|
helixCalc = acos(offsetHeight * tan(helixAngle) / (tipDiameter / 2))
|
||||||
|
|
||||||
|
// Using the gear parameters, sketch an involute tooth spanning from the base diameter to the tip diameter
|
||||||
|
herringboneGearSketch = startSketchOn(offsetPlane(XY, offset = offsetHeight))
|
||||||
|
|> startProfile(at = polar(angle = helixCalc, length = baseDiameter / 2))
|
||||||
|
|> involuteCircular(
|
||||||
|
startRadius = baseDiameter / 2,
|
||||||
|
endRadius = tipDiameter / 2,
|
||||||
|
angle = helixCalc,
|
||||||
|
tag = $seg01,
|
||||||
|
)
|
||||||
|
|> line(endAbsolute = polar(angle = 160 / nTeeth + helixCalc, length = tipDiameter / 2))
|
||||||
|
|> involuteCircular(
|
||||||
|
startRadius = baseDiameter / 2,
|
||||||
|
endRadius = tipDiameter / 2,
|
||||||
|
angle = -(4 * atan(segEndY(seg01) / segEndX(seg01)) - (3 * helixCalc)),
|
||||||
|
reverse = true,
|
||||||
|
)
|
||||||
|
|
||||||
|
// Position the end line of the sketch at the start of the next tooth
|
||||||
|
|> line(endAbsolute = polar(angle = 360 / nTeeth + helixCalc, length = baseDiameter / 2))
|
||||||
|
|
||||||
|
// Pattern the sketch about the center by the specified number of teeth, then close the sketch
|
||||||
|
|> patternCircular2d(
|
||||||
|
%,
|
||||||
|
instances = nTeeth,
|
||||||
|
center = [0, 0],
|
||||||
|
arcDegrees = 360,
|
||||||
|
rotateDuplicates = true,
|
||||||
|
)
|
||||||
|
|> close()
|
||||||
|
// Create a center hole with an 8mm diameter
|
||||||
|
|> subtract2d(tool = circle(center = [0, 0], radius = 4))
|
||||||
|
return herringboneGearSketch
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw a gear sketch on the base plane
|
||||||
|
gearSketch001 = herringboneGearSketch(offsetHeight = 0)
|
||||||
|
|
||||||
|
// Draw a gear sketch that has been rotated by the helix angle
|
||||||
|
gearSketch002 = herringboneGearSketch(offsetHeight = gearHeight / 2)
|
||||||
|
|
||||||
|
// Draw a gear sketch at the total gear height that reverses the angle direction
|
||||||
|
gearSketch003 = clone(gearSketch001)
|
||||||
|
|> translate(z = gearHeight)
|
||||||
|
|
||||||
|
// Loft each rotated gear sketch together to form a herringbone gear
|
||||||
|
herringboneGear = loft(
|
||||||
|
[
|
||||||
|
gearSketch001,
|
||||||
|
gearSketch002,
|
||||||
|
gearSketch003
|
||||||
|
],
|
||||||
|
vDegree = 1,
|
||||||
|
)
|
||||||
|
|
||||||
|
return herringboneGear
|
||||||
|
}
|
||||||
|
|
||||||
|
// Define a function to create a ring gear
|
||||||
|
fn ringGear(nTeeth, module, pressureAngle, helixAngle, gearHeight) {
|
||||||
|
// Calculate gear parameters
|
||||||
|
pitchDiameter = module * nTeeth
|
||||||
|
addendum = module
|
||||||
|
deddendum = 1.25 * module
|
||||||
|
baseDiameter = pitchDiameter * cos(pressureAngle)
|
||||||
|
tipDiameter = pitchDiameter + 2 * module
|
||||||
|
|
||||||
|
// Define a function to create a rotated gear sketch on an offset plane
|
||||||
|
fn ringGearSketch(offsetHeight) {
|
||||||
|
// Calculate the amount to rotate each planar sketch of the gear given the gear helix angle and total gear height
|
||||||
|
helixCalc = acos(offsetHeight * tan(helixAngle) / (tipDiameter / 2))
|
||||||
|
|
||||||
|
// Using the gear parameters, sketch an involute tooth spanning from the base diameter to the tip diameter
|
||||||
|
ringTeeth = startSketchOn(offsetPlane(XY, offset = offsetHeight))
|
||||||
|
|> startProfile(at = polar(angle = helixCalc, length = baseDiameter / 2))
|
||||||
|
|> involuteCircular(
|
||||||
|
startRadius = baseDiameter / 2,
|
||||||
|
endRadius = tipDiameter / 2,
|
||||||
|
angle = helixCalc,
|
||||||
|
tag = $seg01,
|
||||||
|
)
|
||||||
|
|> line(endAbsolute = polar(angle = 220 / nTeeth + helixCalc, length = tipDiameter / 2))
|
||||||
|
|> involuteCircular(
|
||||||
|
startRadius = baseDiameter / 2,
|
||||||
|
endRadius = tipDiameter / 2,
|
||||||
|
angle = -(4 * atan(segEndY(seg01) / segEndX(seg01)) - (3 * helixCalc)),
|
||||||
|
reverse = true,
|
||||||
|
)
|
||||||
|
|
||||||
|
// Position the end line of the sketch at the start of the next tooth
|
||||||
|
|> line(endAbsolute = polar(angle = 360 / nTeeth + helixCalc, length = baseDiameter / 2))
|
||||||
|
|
||||||
|
// Pattern the sketch about the center by the specified number of teeth, then close the sketch
|
||||||
|
|> patternCircular2d(
|
||||||
|
%,
|
||||||
|
instances = nTeeth,
|
||||||
|
center = [0, 0],
|
||||||
|
arcDegrees = 360,
|
||||||
|
rotateDuplicates = true,
|
||||||
|
)
|
||||||
|
|> close()
|
||||||
|
|
||||||
|
// Create a circular body that is larger than the tip diameter of the gear, then subtract the gear profile from the body
|
||||||
|
ringGearSketch = startSketchOn(offsetPlane(XY, offset = offsetHeight))
|
||||||
|
|> circle(center = [0, 0], radius = tipDiameter / 1.8)
|
||||||
|
|> subtract2d(tool = ringTeeth)
|
||||||
|
return ringGearSketch
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw a gear sketch on the base plane
|
||||||
|
gearSketch001 = ringGearSketch(offsetHeight = 0)
|
||||||
|
|
||||||
|
// Draw a rotated gear sketch on a middle interstitial plane
|
||||||
|
gearSketch002 = ringGearSketch(offsetHeight = gearHeight / 2)
|
||||||
|
|
||||||
|
// Draw a gear sketch at the total gear height that reverses the angle direction
|
||||||
|
gearSketch003 = clone(gearSketch001)
|
||||||
|
|> translate(z = gearHeight)
|
||||||
|
|
||||||
|
// Loft each rotated gear sketch together to form a ring gear
|
||||||
|
ringGear = loft(
|
||||||
|
[
|
||||||
|
gearSketch001,
|
||||||
|
gearSketch002,
|
||||||
|
gearSketch003
|
||||||
|
],
|
||||||
|
vDegree = 1,
|
||||||
|
)
|
||||||
|
|
||||||
|
return ringGear
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create the outer ring gear for the planetary gearset
|
||||||
|
ringGear(
|
||||||
|
nTeeth = 58,
|
||||||
|
module = 1.5,
|
||||||
|
pressureAngle = 14,
|
||||||
|
helixAngle = -35,
|
||||||
|
gearHeight = 8,
|
||||||
|
)
|
||||||
|
|
||||||
|
// Create a central sun gear using a small herringbone gear
|
||||||
|
herringboneGear(
|
||||||
|
nTeeth = 18,
|
||||||
|
module = 1.5,
|
||||||
|
pressureAngle = 14,
|
||||||
|
helixAngle = 35,
|
||||||
|
gearHeight = 8,
|
||||||
|
)
|
||||||
|
|
||||||
|
// Create the herringbone planet gears
|
||||||
|
numPlanetGears = 4
|
||||||
|
herringboneGear(
|
||||||
|
nTeeth = 18,
|
||||||
|
module = 1.5,
|
||||||
|
pressureAngle = 14,
|
||||||
|
helixAngle = -35,
|
||||||
|
gearHeight = 8,
|
||||||
|
)
|
||||||
|
|> translate(y = 18 * 1.5 + 1.95)
|
||||||
|
|> patternCircular3d(
|
||||||
|
instances = numPlanetGears,
|
||||||
|
axis = [0, 0, 1],
|
||||||
|
center = [0, 0, 0],
|
||||||
|
arcDegrees = 360,
|
||||||
|
rotateDuplicates = false,
|
||||||
|
)
|
||||||
@ -170,16 +170,6 @@
|
|||||||
"main.kcl"
|
"main.kcl"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"file": "main.kcl",
|
|
||||||
"pathFromProjectDirectoryToFirstFile": "gear/main.kcl",
|
|
||||||
"multipleFiles": false,
|
|
||||||
"title": "Spur Gear",
|
|
||||||
"description": "A rotating machine part having cut teeth or, in the case of a cogwheel, inserted teeth (called cogs), which mesh with another toothed part to transmit torque. Geared devices can change the speed, torque, and direction of a power source. The two elements that define a gear are its circular shape and the teeth that are integrated into its outer edge, which are designed to fit into the teeth of another gear.",
|
|
||||||
"files": [
|
|
||||||
"main.kcl"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"file": "main.kcl",
|
"file": "main.kcl",
|
||||||
"pathFromProjectDirectoryToFirstFile": "gear-rack/main.kcl",
|
"pathFromProjectDirectoryToFirstFile": "gear-rack/main.kcl",
|
||||||
@ -230,6 +220,46 @@
|
|||||||
"main.kcl"
|
"main.kcl"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"file": "main.kcl",
|
||||||
|
"pathFromProjectDirectoryToFirstFile": "helical-gear/main.kcl",
|
||||||
|
"multipleFiles": false,
|
||||||
|
"title": "Helical Gear",
|
||||||
|
"description": "A helical gear is a type of cylindrical gear where the teeth are slanted at an angle relative to the axis of rotation. This greatly reduces noise and wear when transmitting torque across meshed spinning gears",
|
||||||
|
"files": [
|
||||||
|
"main.kcl"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "main.kcl",
|
||||||
|
"pathFromProjectDirectoryToFirstFile": "helical-planetary-gearset/main.kcl",
|
||||||
|
"multipleFiles": false,
|
||||||
|
"title": "Helical Planetary Gearset",
|
||||||
|
"description": "A helical planetary gearset is a type of planetary gear system where the teeth of the sun gear, planet gears, and/or ring gear are helical rather than straight. This design allows for smoother, quieter operation, greater load-carrying capacity, and more flexible shaft alignment.",
|
||||||
|
"files": [
|
||||||
|
"main.kcl"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "main.kcl",
|
||||||
|
"pathFromProjectDirectoryToFirstFile": "herringbone-gear/main.kcl",
|
||||||
|
"multipleFiles": false,
|
||||||
|
"title": "Herringbone Gear",
|
||||||
|
"description": "A herringbone, or double-helical gear, is a cylindrical gear type with angled teeth in opposing directions. This allows the quietness and smoothness of a helical gear, without applying a directional load while turning",
|
||||||
|
"files": [
|
||||||
|
"main.kcl"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "main.kcl",
|
||||||
|
"pathFromProjectDirectoryToFirstFile": "herringbone-planetary-gearset/main.kcl",
|
||||||
|
"multipleFiles": false,
|
||||||
|
"title": "Herringbone Planetary Gearset",
|
||||||
|
"description": "A herringbone planetary gearset is a type of planetary gear system where the teeth of the sun gear, planet gears, and/or ring gear are herringbone rather than straight. This design allows for smoother, quieter operation, greater load-carrying capacity, and more flexible shaft alignment.",
|
||||||
|
"files": [
|
||||||
|
"main.kcl"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"file": "main.kcl",
|
"file": "main.kcl",
|
||||||
"pathFromProjectDirectoryToFirstFile": "hex-nut/main.kcl",
|
"pathFromProjectDirectoryToFirstFile": "hex-nut/main.kcl",
|
||||||
@ -412,6 +442,26 @@
|
|||||||
"main.kcl"
|
"main.kcl"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"file": "main.kcl",
|
||||||
|
"pathFromProjectDirectoryToFirstFile": "spur-gear/main.kcl",
|
||||||
|
"multipleFiles": false,
|
||||||
|
"title": "Spur Gear",
|
||||||
|
"description": "A rotating machine part having cut teeth or, in the case of a cogwheel, inserted teeth (called cogs), which mesh with another toothed part to transmit torque. Geared devices can change the speed, torque, and direction of a power source. The two elements that define a gear are its circular shape and the teeth that are integrated into its outer edge, which are designed to fit into the teeth of another gear.",
|
||||||
|
"files": [
|
||||||
|
"main.kcl"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "main.kcl",
|
||||||
|
"pathFromProjectDirectoryToFirstFile": "spur-reduction-gearset/main.kcl",
|
||||||
|
"multipleFiles": false,
|
||||||
|
"title": "Spur Reduction Gearset",
|
||||||
|
"description": "A pair of spur gears meshed together, with an equal module and different number of teeth",
|
||||||
|
"files": [
|
||||||
|
"main.kcl"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"file": "main.kcl",
|
"file": "main.kcl",
|
||||||
"pathFromProjectDirectoryToFirstFile": "utility-sink/main.kcl",
|
"pathFromProjectDirectoryToFirstFile": "utility-sink/main.kcl",
|
||||||
|
|||||||
BIN
public/kcl-samples/screenshots/helical-gear.png
Normal file
|
After Width: | Height: | Size: 101 KiB |
BIN
public/kcl-samples/screenshots/helical-planetary-gearset.png
Normal file
|
After Width: | Height: | Size: 139 KiB |
BIN
public/kcl-samples/screenshots/herringbone-gear.png
Normal file
|
After Width: | Height: | Size: 147 KiB |
BIN
public/kcl-samples/screenshots/herringbone-planetary-gearset.png
Normal file
|
After Width: | Height: | Size: 157 KiB |
BIN
public/kcl-samples/screenshots/spur-gear.png
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
public/kcl-samples/screenshots/spur-reduction-gearset.png
Normal file
|
After Width: | Height: | Size: 62 KiB |
76
public/kcl-samples/spur-gear/main.kcl
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
// Spur Gear
|
||||||
|
// A rotating machine part having cut teeth or, in the case of a cogwheel, inserted teeth (called cogs), which mesh with another toothed part to transmit torque. Geared devices can change the speed, torque, and direction of a power source. The two elements that define a gear are its circular shape and the teeth that are integrated into its outer edge, which are designed to fit into the teeth of another gear.
|
||||||
|
|
||||||
|
// Set units
|
||||||
|
@settings(defaultLengthUnit = mm)
|
||||||
|
|
||||||
|
// Define a function to create a spur gear
|
||||||
|
fn spurGear(nTeeth, module, pressureAngle, gearHeight) {
|
||||||
|
// Define gear parameters
|
||||||
|
pitchDiameter = module * nTeeth
|
||||||
|
addendum = module
|
||||||
|
deddendum = 1.25 * module
|
||||||
|
baseDiameter = pitchDiameter * cos(pressureAngle)
|
||||||
|
tipDiameter = pitchDiameter + 2 * module
|
||||||
|
|
||||||
|
// Define the constants of the keyway and the bore hole
|
||||||
|
keywayWidth = 2
|
||||||
|
keywayDepth = keywayWidth / 2
|
||||||
|
holeDiam = 5
|
||||||
|
holeRadius = holeDiam / 2
|
||||||
|
startAngle = asin(keywayWidth / 2 / holeRadius)
|
||||||
|
|
||||||
|
// Sketch the keyway and center hole
|
||||||
|
holeWithKeyway = startSketchOn(XY)
|
||||||
|
|> startProfile(at = [
|
||||||
|
holeRadius * cos(startAngle),
|
||||||
|
holeRadius * sin(startAngle)
|
||||||
|
])
|
||||||
|
|> xLine(length = keywayDepth)
|
||||||
|
|> yLine(length = -keywayWidth)
|
||||||
|
|> xLine(length = -keywayDepth)
|
||||||
|
|> arc(angleStart = -1 * startAngle + 360, angleEnd = 180, radius = holeRadius)
|
||||||
|
|> arc(angleStart = 180, angleEnd = startAngle, radius = holeRadius)
|
||||||
|
|> close()
|
||||||
|
|
||||||
|
// Using the gear parameters, sketch an involute tooth spanning from the base diameter to the tip diameter
|
||||||
|
gearSketch = startSketchOn(XY)
|
||||||
|
|> startProfile(at = polar(angle = 0, length = baseDiameter / 2))
|
||||||
|
|> involuteCircular(
|
||||||
|
startRadius = baseDiameter / 2,
|
||||||
|
endRadius = tipDiameter / 2,
|
||||||
|
angle = 0,
|
||||||
|
tag = $seg01,
|
||||||
|
)
|
||||||
|
|> line(endAbsolute = polar(angle = 160 / nTeeth, length = tipDiameter / 2))
|
||||||
|
|> involuteCircular(
|
||||||
|
startRadius = baseDiameter / 2,
|
||||||
|
endRadius = tipDiameter / 2,
|
||||||
|
angle = -atan(segEndY(seg01) / segEndX(seg01)) - (180 / nTeeth),
|
||||||
|
reverse = true,
|
||||||
|
)
|
||||||
|
// Position the end line of the sketch at the start of the next tooth
|
||||||
|
|> line(endAbsolute = polar(angle = 360 / nTeeth, length = baseDiameter / 2))
|
||||||
|
// Pattern the sketch about the center by the specified number of teeth, then close the sketch
|
||||||
|
|> patternCircular2d(
|
||||||
|
%,
|
||||||
|
instances = nTeeth,
|
||||||
|
center = [0, 0],
|
||||||
|
arcDegrees = 360,
|
||||||
|
rotateDuplicates = true,
|
||||||
|
)
|
||||||
|
|> close()
|
||||||
|
// Subtract the keyway sketch from the gear sketch
|
||||||
|
|> subtract2d(tool = holeWithKeyway)
|
||||||
|
// Extrude the gear to the specified height
|
||||||
|
|> extrude(length = gearHeight)
|
||||||
|
|
||||||
|
return gearSketch
|
||||||
|
}
|
||||||
|
|
||||||
|
spurGear(
|
||||||
|
nTeeth = 21,
|
||||||
|
module = 1.5,
|
||||||
|
pressureAngle = 14,
|
||||||
|
gearHeight = 6,
|
||||||
|
)
|
||||||
70
public/kcl-samples/spur-reduction-gearset/main.kcl
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
// Spur Reduction Gearset
|
||||||
|
// A pair of spur gears meshed together, with an equal module and different number of teeth
|
||||||
|
|
||||||
|
// Set units
|
||||||
|
@settings(defaultLengthUnit = mm)
|
||||||
|
|
||||||
|
// Define a function to create a spur gear
|
||||||
|
fn spurGear(nTeeth, module, pressureAngle, gearHeight) {
|
||||||
|
// Calculate gear parameters
|
||||||
|
pitchDiameter = module * nTeeth
|
||||||
|
addendum = module
|
||||||
|
deddendum = 1.25 * module
|
||||||
|
baseDiameter = pitchDiameter * cos(pressureAngle)
|
||||||
|
tipDiameter = pitchDiameter + 2 * module
|
||||||
|
|
||||||
|
// Using the gear parameters, sketch an involute tooth spanning from the base diameter to the tip diameter
|
||||||
|
gearSketch = startSketchOn(XY)
|
||||||
|
|> startProfile(at = polar(angle = 0, length = baseDiameter / 2))
|
||||||
|
|> involuteCircular(
|
||||||
|
startRadius = baseDiameter / 2,
|
||||||
|
endRadius = tipDiameter / 2,
|
||||||
|
angle = 0,
|
||||||
|
tag = $seg01,
|
||||||
|
)
|
||||||
|
|> line(endAbsolute = polar(angle = 160 / nTeeth, length = tipDiameter / 2))
|
||||||
|
|> involuteCircular(
|
||||||
|
startRadius = baseDiameter / 2,
|
||||||
|
endRadius = tipDiameter / 2,
|
||||||
|
angle = -atan(segEndY(seg01) / segEndX(seg01)) - (180 / nTeeth),
|
||||||
|
reverse = true,
|
||||||
|
)
|
||||||
|
// Position the end line of the sketch at the start of the next tooth
|
||||||
|
|> line(endAbsolute = polar(angle = 360 / nTeeth, length = baseDiameter / 2))
|
||||||
|
// Pattern the sketch about the center by the specified number of teeth, then close the sketch
|
||||||
|
|> patternCircular2d(
|
||||||
|
%,
|
||||||
|
instances = nTeeth,
|
||||||
|
center = [0, 0],
|
||||||
|
arcDegrees = 360,
|
||||||
|
rotateDuplicates = true,
|
||||||
|
)
|
||||||
|
|> close()
|
||||||
|
// Subtract a 10mm diameter center hole from the gear
|
||||||
|
|> subtract2d(tool = circle(center = [0, 0], radius = 5))
|
||||||
|
// Extrude the gear to the specified height
|
||||||
|
|> extrude(length = gearHeight)
|
||||||
|
|
||||||
|
return gearSketch
|
||||||
|
}
|
||||||
|
|
||||||
|
// Model a small gear
|
||||||
|
spurGear(
|
||||||
|
nTeeth = 17,
|
||||||
|
module = 1.5,
|
||||||
|
pressureAngle = 14,
|
||||||
|
gearHeight = 9,
|
||||||
|
)
|
||||||
|
|
||||||
|
// Model a larger gear with the same module
|
||||||
|
spurGear(
|
||||||
|
nTeeth = 51,
|
||||||
|
module = 1.5,
|
||||||
|
pressureAngle = 14,
|
||||||
|
gearHeight = 7,
|
||||||
|
)
|
||||||
|
// Translate the larger gear by the combined pitch radius of both gears, plus a small gap
|
||||||
|
|> translate(x = (51 + 17) / 2 * 1.5 + 1.3)
|
||||||
|
|
||||||
|
// Rotate the gear so that the teeth mesh but do not intersect
|
||||||
|
|> rotate(yaw = 3)
|
||||||
@ -605,19 +605,19 @@ flowchart LR
|
|||||||
84 --- 144
|
84 --- 144
|
||||||
84 --- 234
|
84 --- 234
|
||||||
87 --- 161
|
87 --- 161
|
||||||
87 x--> 186
|
87 x--> 187
|
||||||
87 --- 206
|
87 --- 206
|
||||||
87 --- 249
|
87 --- 249
|
||||||
89 --- 160
|
89 --- 160
|
||||||
89 x--> 186
|
89 x--> 187
|
||||||
89 --- 207
|
89 --- 207
|
||||||
89 --- 250
|
89 --- 250
|
||||||
91 --- 162
|
91 --- 162
|
||||||
91 x--> 186
|
91 x--> 187
|
||||||
91 --- 204
|
91 --- 204
|
||||||
91 --- 252
|
91 --- 252
|
||||||
93 --- 159
|
93 --- 159
|
||||||
93 x--> 186
|
93 x--> 187
|
||||||
93 --- 205
|
93 --- 205
|
||||||
93 --- 251
|
93 --- 251
|
||||||
119 --- 133
|
119 --- 133
|
||||||
@ -879,10 +879,10 @@ flowchart LR
|
|||||||
200 <--x 185
|
200 <--x 185
|
||||||
201 <--x 185
|
201 <--x 185
|
||||||
202 <--x 185
|
202 <--x 185
|
||||||
204 <--x 187
|
204 <--x 186
|
||||||
205 <--x 187
|
205 <--x 186
|
||||||
206 <--x 187
|
206 <--x 186
|
||||||
207 <--x 187
|
207 <--x 186
|
||||||
219 <--x 188
|
219 <--x 188
|
||||||
220 <--x 188
|
220 <--x 188
|
||||||
221 <--x 188
|
221 <--x 188
|
||||||
|
|||||||
@ -1,526 +0,0 @@
|
|||||||
```mermaid
|
|
||||||
flowchart LR
|
|
||||||
subgraph path4 [Path]
|
|
||||||
4["Path<br>[1436, 1486, 0]"]
|
|
||||||
7["Segment<br>[1436, 1486, 0]"]
|
|
||||||
219[Solid2d]
|
|
||||||
end
|
|
||||||
subgraph path5 [Path]
|
|
||||||
5["Path<br>[1969, 2006, 0]"]
|
|
||||||
8["Segment<br>[1655, 1696, 0]"]
|
|
||||||
9["Segment<br>[1655, 1696, 0]"]
|
|
||||||
10["Segment<br>[1655, 1696, 0]"]
|
|
||||||
11["Segment<br>[1655, 1696, 0]"]
|
|
||||||
12["Segment<br>[1655, 1696, 0]"]
|
|
||||||
13["Segment<br>[1655, 1696, 0]"]
|
|
||||||
14["Segment<br>[1655, 1696, 0]"]
|
|
||||||
15["Segment<br>[1655, 1696, 0]"]
|
|
||||||
16["Segment<br>[1655, 1696, 0]"]
|
|
||||||
17["Segment<br>[1655, 1696, 0]"]
|
|
||||||
18["Segment<br>[1655, 1696, 0]"]
|
|
||||||
19["Segment<br>[1655, 1696, 0]"]
|
|
||||||
20["Segment<br>[1655, 1696, 0]"]
|
|
||||||
21["Segment<br>[1655, 1696, 0]"]
|
|
||||||
22["Segment<br>[1655, 1696, 0]"]
|
|
||||||
23["Segment<br>[1655, 1696, 0]"]
|
|
||||||
24["Segment<br>[1655, 1696, 0]"]
|
|
||||||
25["Segment<br>[1655, 1696, 0]"]
|
|
||||||
26["Segment<br>[1655, 1696, 0]"]
|
|
||||||
27["Segment<br>[1655, 1696, 0]"]
|
|
||||||
28["Segment<br>[1655, 1696, 0]"]
|
|
||||||
29["Segment<br>[1655, 1696, 0]"]
|
|
||||||
30["Segment<br>[1655, 1696, 0]"]
|
|
||||||
31["Segment<br>[1655, 1696, 0]"]
|
|
||||||
32["Segment<br>[1655, 1696, 0]"]
|
|
||||||
33["Segment<br>[1655, 1696, 0]"]
|
|
||||||
34["Segment<br>[1655, 1696, 0]"]
|
|
||||||
35["Segment<br>[1655, 1696, 0]"]
|
|
||||||
36["Segment<br>[1655, 1696, 0]"]
|
|
||||||
37["Segment<br>[1655, 1696, 0]"]
|
|
||||||
38["Segment<br>[1655, 1696, 0]"]
|
|
||||||
39["Segment<br>[1655, 1696, 0]"]
|
|
||||||
40["Segment<br>[1655, 1696, 0]"]
|
|
||||||
41["Segment<br>[1655, 1696, 0]"]
|
|
||||||
42["Segment<br>[1655, 1696, 0]"]
|
|
||||||
43["Segment<br>[1655, 1696, 0]"]
|
|
||||||
44["Segment<br>[1655, 1696, 0]"]
|
|
||||||
45["Segment<br>[1655, 1696, 0]"]
|
|
||||||
46["Segment<br>[1655, 1696, 0]"]
|
|
||||||
47["Segment<br>[1655, 1696, 0]"]
|
|
||||||
48["Segment<br>[1655, 1696, 0]"]
|
|
||||||
49["Segment<br>[1655, 1696, 0]"]
|
|
||||||
50["Segment<br>[1655, 1696, 0]"]
|
|
||||||
51["Segment<br>[1655, 1696, 0]"]
|
|
||||||
52["Segment<br>[1655, 1696, 0]"]
|
|
||||||
53["Segment<br>[1655, 1696, 0]"]
|
|
||||||
54["Segment<br>[1655, 1696, 0]"]
|
|
||||||
55["Segment<br>[1655, 1696, 0]"]
|
|
||||||
56["Segment<br>[1655, 1696, 0]"]
|
|
||||||
57["Segment<br>[1655, 1696, 0]"]
|
|
||||||
58["Segment<br>[1655, 1696, 0]"]
|
|
||||||
59["Segment<br>[1655, 1696, 0]"]
|
|
||||||
60["Segment<br>[1655, 1696, 0]"]
|
|
||||||
61["Segment<br>[1655, 1696, 0]"]
|
|
||||||
62["Segment<br>[1655, 1696, 0]"]
|
|
||||||
63["Segment<br>[1655, 1696, 0]"]
|
|
||||||
64["Segment<br>[1655, 1696, 0]"]
|
|
||||||
65["Segment<br>[1655, 1696, 0]"]
|
|
||||||
66["Segment<br>[1655, 1696, 0]"]
|
|
||||||
67["Segment<br>[1655, 1696, 0]"]
|
|
||||||
68["Segment<br>[1655, 1696, 0]"]
|
|
||||||
69["Segment<br>[1655, 1696, 0]"]
|
|
||||||
70["Segment<br>[1655, 1696, 0]"]
|
|
||||||
71["Segment<br>[1655, 1696, 0]"]
|
|
||||||
72["Segment<br>[1655, 1696, 0]"]
|
|
||||||
73["Segment<br>[1655, 1696, 0]"]
|
|
||||||
74["Segment<br>[1655, 1696, 0]"]
|
|
||||||
75["Segment<br>[1655, 1696, 0]"]
|
|
||||||
76["Segment<br>[1655, 1696, 0]"]
|
|
||||||
77["Segment<br>[1655, 1696, 0]"]
|
|
||||||
78["Segment<br>[1655, 1696, 0]"]
|
|
||||||
79["Segment<br>[1655, 1696, 0]"]
|
|
||||||
80["Segment<br>[1655, 1696, 0]"]
|
|
||||||
81["Segment<br>[1655, 1696, 0]"]
|
|
||||||
82["Segment<br>[1655, 1696, 0]"]
|
|
||||||
83["Segment<br>[1655, 1696, 0]"]
|
|
||||||
84["Segment<br>[1655, 1696, 0]"]
|
|
||||||
85["Segment<br>[1655, 1696, 0]"]
|
|
||||||
86["Segment<br>[1655, 1696, 0]"]
|
|
||||||
87["Segment<br>[1655, 1696, 0]"]
|
|
||||||
88["Segment<br>[1655, 1696, 0]"]
|
|
||||||
89["Segment<br>[1655, 1696, 0]"]
|
|
||||||
90["Segment<br>[1655, 1696, 0]"]
|
|
||||||
91["Segment<br>[1655, 1696, 0]"]
|
|
||||||
92["Segment<br>[1655, 1696, 0]"]
|
|
||||||
93["Segment<br>[1655, 1696, 0]"]
|
|
||||||
94["Segment<br>[1655, 1696, 0]"]
|
|
||||||
95["Segment<br>[1655, 1696, 0]"]
|
|
||||||
96["Segment<br>[1655, 1696, 0]"]
|
|
||||||
97["Segment<br>[1655, 1696, 0]"]
|
|
||||||
98["Segment<br>[1655, 1696, 0]"]
|
|
||||||
99["Segment<br>[1655, 1696, 0]"]
|
|
||||||
100["Segment<br>[1655, 1696, 0]"]
|
|
||||||
101["Segment<br>[1655, 1696, 0]"]
|
|
||||||
102["Segment<br>[1655, 1696, 0]"]
|
|
||||||
103["Segment<br>[1655, 1696, 0]"]
|
|
||||||
104["Segment<br>[1655, 1696, 0]"]
|
|
||||||
105["Segment<br>[1655, 1696, 0]"]
|
|
||||||
106["Segment<br>[1655, 1696, 0]"]
|
|
||||||
107["Segment<br>[1655, 1696, 0]"]
|
|
||||||
108["Segment<br>[1655, 1696, 0]"]
|
|
||||||
109["Segment<br>[1882, 1915, 0]"]
|
|
||||||
110["Segment<br>[1882, 1915, 0]"]
|
|
||||||
111["Segment<br>[1882, 1915, 0]"]
|
|
||||||
112["Segment<br>[1882, 1915, 0]"]
|
|
||||||
113["Segment<br>[1882, 1915, 0]"]
|
|
||||||
114["Segment<br>[1882, 1915, 0]"]
|
|
||||||
115["Segment<br>[1882, 1915, 0]"]
|
|
||||||
116["Segment<br>[1882, 1915, 0]"]
|
|
||||||
117["Segment<br>[1882, 1915, 0]"]
|
|
||||||
118["Segment<br>[1882, 1915, 0]"]
|
|
||||||
119["Segment<br>[1882, 1915, 0]"]
|
|
||||||
120["Segment<br>[1882, 1915, 0]"]
|
|
||||||
121["Segment<br>[1882, 1915, 0]"]
|
|
||||||
122["Segment<br>[1882, 1915, 0]"]
|
|
||||||
123["Segment<br>[1882, 1915, 0]"]
|
|
||||||
124["Segment<br>[1882, 1915, 0]"]
|
|
||||||
125["Segment<br>[1882, 1915, 0]"]
|
|
||||||
126["Segment<br>[1882, 1915, 0]"]
|
|
||||||
127["Segment<br>[1882, 1915, 0]"]
|
|
||||||
128["Segment<br>[1882, 1915, 0]"]
|
|
||||||
129["Segment<br>[1882, 1915, 0]"]
|
|
||||||
130["Segment<br>[1882, 1915, 0]"]
|
|
||||||
131["Segment<br>[1882, 1915, 0]"]
|
|
||||||
132["Segment<br>[1882, 1915, 0]"]
|
|
||||||
133["Segment<br>[1882, 1915, 0]"]
|
|
||||||
134["Segment<br>[1882, 1915, 0]"]
|
|
||||||
135["Segment<br>[1882, 1915, 0]"]
|
|
||||||
136["Segment<br>[1882, 1915, 0]"]
|
|
||||||
137["Segment<br>[1882, 1915, 0]"]
|
|
||||||
138["Segment<br>[1882, 1915, 0]"]
|
|
||||||
139["Segment<br>[1882, 1915, 0]"]
|
|
||||||
140["Segment<br>[1882, 1915, 0]"]
|
|
||||||
141["Segment<br>[1882, 1915, 0]"]
|
|
||||||
142["Segment<br>[1882, 1915, 0]"]
|
|
||||||
143["Segment<br>[1882, 1915, 0]"]
|
|
||||||
144["Segment<br>[1882, 1915, 0]"]
|
|
||||||
145["Segment<br>[1882, 1915, 0]"]
|
|
||||||
146["Segment<br>[1882, 1915, 0]"]
|
|
||||||
147["Segment<br>[1882, 1915, 0]"]
|
|
||||||
148["Segment<br>[1882, 1915, 0]"]
|
|
||||||
149["Segment<br>[1882, 1915, 0]"]
|
|
||||||
150["Segment<br>[1882, 1915, 0]"]
|
|
||||||
151["Segment<br>[1882, 1915, 0]"]
|
|
||||||
152["Segment<br>[1882, 1915, 0]"]
|
|
||||||
153["Segment<br>[1882, 1915, 0]"]
|
|
||||||
154["Segment<br>[1882, 1915, 0]"]
|
|
||||||
155["Segment<br>[1882, 1915, 0]"]
|
|
||||||
156["Segment<br>[1882, 1915, 0]"]
|
|
||||||
157["Segment<br>[1882, 1915, 0]"]
|
|
||||||
158["Segment<br>[1882, 1915, 0]"]
|
|
||||||
159["Segment<br>[1882, 1915, 0]"]
|
|
||||||
160["Segment<br>[1882, 1915, 0]"]
|
|
||||||
161["Segment<br>[1882, 1915, 0]"]
|
|
||||||
162["Segment<br>[1882, 1915, 0]"]
|
|
||||||
163["Segment<br>[1882, 1915, 0]"]
|
|
||||||
164["Segment<br>[1882, 1915, 0]"]
|
|
||||||
165["Segment<br>[1882, 1915, 0]"]
|
|
||||||
166["Segment<br>[1882, 1915, 0]"]
|
|
||||||
167["Segment<br>[1882, 1915, 0]"]
|
|
||||||
168["Segment<br>[1882, 1915, 0]"]
|
|
||||||
169["Segment<br>[1882, 1915, 0]"]
|
|
||||||
170["Segment<br>[1882, 1915, 0]"]
|
|
||||||
171["Segment<br>[1882, 1915, 0]"]
|
|
||||||
172["Segment<br>[1882, 1915, 0]"]
|
|
||||||
173["Segment<br>[1882, 1915, 0]"]
|
|
||||||
174["Segment<br>[1882, 1915, 0]"]
|
|
||||||
175["Segment<br>[1882, 1915, 0]"]
|
|
||||||
176["Segment<br>[1882, 1915, 0]"]
|
|
||||||
177["Segment<br>[1882, 1915, 0]"]
|
|
||||||
178["Segment<br>[1882, 1915, 0]"]
|
|
||||||
179["Segment<br>[1882, 1915, 0]"]
|
|
||||||
180["Segment<br>[1882, 1915, 0]"]
|
|
||||||
181["Segment<br>[1882, 1915, 0]"]
|
|
||||||
182["Segment<br>[1882, 1915, 0]"]
|
|
||||||
183["Segment<br>[1882, 1915, 0]"]
|
|
||||||
184["Segment<br>[1882, 1915, 0]"]
|
|
||||||
185["Segment<br>[1882, 1915, 0]"]
|
|
||||||
186["Segment<br>[1882, 1915, 0]"]
|
|
||||||
187["Segment<br>[1882, 1915, 0]"]
|
|
||||||
188["Segment<br>[1882, 1915, 0]"]
|
|
||||||
189["Segment<br>[1882, 1915, 0]"]
|
|
||||||
190["Segment<br>[1882, 1915, 0]"]
|
|
||||||
191["Segment<br>[1882, 1915, 0]"]
|
|
||||||
192["Segment<br>[1882, 1915, 0]"]
|
|
||||||
193["Segment<br>[1882, 1915, 0]"]
|
|
||||||
194["Segment<br>[1882, 1915, 0]"]
|
|
||||||
195["Segment<br>[1882, 1915, 0]"]
|
|
||||||
196["Segment<br>[1882, 1915, 0]"]
|
|
||||||
197["Segment<br>[1882, 1915, 0]"]
|
|
||||||
198["Segment<br>[1882, 1915, 0]"]
|
|
||||||
199["Segment<br>[1882, 1915, 0]"]
|
|
||||||
200["Segment<br>[1882, 1915, 0]"]
|
|
||||||
201["Segment<br>[1882, 1915, 0]"]
|
|
||||||
202["Segment<br>[1882, 1915, 0]"]
|
|
||||||
203["Segment<br>[1882, 1915, 0]"]
|
|
||||||
204["Segment<br>[1882, 1915, 0]"]
|
|
||||||
205["Segment<br>[1882, 1915, 0]"]
|
|
||||||
206["Segment<br>[1882, 1915, 0]"]
|
|
||||||
207["Segment<br>[1882, 1915, 0]"]
|
|
||||||
208["Segment<br>[1882, 1915, 0]"]
|
|
||||||
209["Segment<br>[1882, 1915, 0]"]
|
|
||||||
210["Segment<br>[2072, 2141, 0]"]
|
|
||||||
211["Segment<br>[2201, 2208, 0]"]
|
|
||||||
218[Solid2d]
|
|
||||||
end
|
|
||||||
subgraph path6 [Path]
|
|
||||||
6["Path<br>[2689, 2789, 0]"]
|
|
||||||
212["Segment<br>[2795, 2822, 0]"]
|
|
||||||
213["Segment<br>[2828, 2856, 0]"]
|
|
||||||
214["Segment<br>[2862, 2890, 0]"]
|
|
||||||
215["Segment<br>[2896, 2990, 0]"]
|
|
||||||
216["Segment<br>[2996, 3079, 0]"]
|
|
||||||
217["Segment<br>[3085, 3092, 0]"]
|
|
||||||
220[Solid2d]
|
|
||||||
end
|
|
||||||
1["Plane<br>[1413, 1430, 0]"]
|
|
||||||
2["Plane<br>[1946, 1963, 0]"]
|
|
||||||
3["StartSketchOnFace<br>[2652, 2683, 0]"]
|
|
||||||
221["Sweep Extrusion<br>[1492, 1520, 0]"]
|
|
||||||
222["Sweep Extrusion<br>[2214, 2242, 0]"]
|
|
||||||
223["Sweep Extrusion<br>[3098, 3127, 0]"]
|
|
||||||
224[Wall]
|
|
||||||
225[Wall]
|
|
||||||
226[Wall]
|
|
||||||
227[Wall]
|
|
||||||
228[Wall]
|
|
||||||
229["Cap Start"]
|
|
||||||
230["Cap End"]
|
|
||||||
231["SweepEdge Opposite"]
|
|
||||||
232["SweepEdge Opposite"]
|
|
||||||
233["SweepEdge Opposite"]
|
|
||||||
234["SweepEdge Opposite"]
|
|
||||||
235["SweepEdge Opposite"]
|
|
||||||
236["SweepEdge Adjacent"]
|
|
||||||
237["SweepEdge Adjacent"]
|
|
||||||
238["SweepEdge Adjacent"]
|
|
||||||
239["SweepEdge Adjacent"]
|
|
||||||
240["SweepEdge Adjacent"]
|
|
||||||
1 --- 4
|
|
||||||
2 --- 5
|
|
||||||
230 x--> 3
|
|
||||||
4 --- 7
|
|
||||||
4 --- 219
|
|
||||||
4 ---- 221
|
|
||||||
5 --- 8
|
|
||||||
5 --- 9
|
|
||||||
5 --- 10
|
|
||||||
5 --- 11
|
|
||||||
5 --- 12
|
|
||||||
5 --- 13
|
|
||||||
5 --- 14
|
|
||||||
5 --- 15
|
|
||||||
5 --- 16
|
|
||||||
5 --- 17
|
|
||||||
5 --- 18
|
|
||||||
5 --- 19
|
|
||||||
5 --- 20
|
|
||||||
5 --- 21
|
|
||||||
5 --- 22
|
|
||||||
5 --- 23
|
|
||||||
5 --- 24
|
|
||||||
5 --- 25
|
|
||||||
5 --- 26
|
|
||||||
5 --- 27
|
|
||||||
5 --- 28
|
|
||||||
5 --- 29
|
|
||||||
5 --- 30
|
|
||||||
5 --- 31
|
|
||||||
5 --- 32
|
|
||||||
5 --- 33
|
|
||||||
5 --- 34
|
|
||||||
5 --- 35
|
|
||||||
5 --- 36
|
|
||||||
5 --- 37
|
|
||||||
5 --- 38
|
|
||||||
5 --- 39
|
|
||||||
5 --- 40
|
|
||||||
5 --- 41
|
|
||||||
5 --- 42
|
|
||||||
5 --- 43
|
|
||||||
5 --- 44
|
|
||||||
5 --- 45
|
|
||||||
5 --- 46
|
|
||||||
5 --- 47
|
|
||||||
5 --- 48
|
|
||||||
5 --- 49
|
|
||||||
5 --- 50
|
|
||||||
5 --- 51
|
|
||||||
5 --- 52
|
|
||||||
5 --- 53
|
|
||||||
5 --- 54
|
|
||||||
5 --- 55
|
|
||||||
5 --- 56
|
|
||||||
5 --- 57
|
|
||||||
5 --- 58
|
|
||||||
5 --- 59
|
|
||||||
5 --- 60
|
|
||||||
5 --- 61
|
|
||||||
5 --- 62
|
|
||||||
5 --- 63
|
|
||||||
5 --- 64
|
|
||||||
5 --- 65
|
|
||||||
5 --- 66
|
|
||||||
5 --- 67
|
|
||||||
5 --- 68
|
|
||||||
5 --- 69
|
|
||||||
5 --- 70
|
|
||||||
5 --- 71
|
|
||||||
5 --- 72
|
|
||||||
5 --- 73
|
|
||||||
5 --- 74
|
|
||||||
5 --- 75
|
|
||||||
5 --- 76
|
|
||||||
5 --- 77
|
|
||||||
5 --- 78
|
|
||||||
5 --- 79
|
|
||||||
5 --- 80
|
|
||||||
5 --- 81
|
|
||||||
5 --- 82
|
|
||||||
5 --- 83
|
|
||||||
5 --- 84
|
|
||||||
5 --- 85
|
|
||||||
5 --- 86
|
|
||||||
5 --- 87
|
|
||||||
5 --- 88
|
|
||||||
5 --- 89
|
|
||||||
5 --- 90
|
|
||||||
5 --- 91
|
|
||||||
5 --- 92
|
|
||||||
5 --- 93
|
|
||||||
5 --- 94
|
|
||||||
5 --- 95
|
|
||||||
5 --- 96
|
|
||||||
5 --- 97
|
|
||||||
5 --- 98
|
|
||||||
5 --- 99
|
|
||||||
5 --- 100
|
|
||||||
5 --- 101
|
|
||||||
5 --- 102
|
|
||||||
5 --- 103
|
|
||||||
5 --- 104
|
|
||||||
5 --- 105
|
|
||||||
5 --- 106
|
|
||||||
5 --- 107
|
|
||||||
5 --- 108
|
|
||||||
5 --- 109
|
|
||||||
5 --- 110
|
|
||||||
5 --- 111
|
|
||||||
5 --- 112
|
|
||||||
5 --- 113
|
|
||||||
5 --- 114
|
|
||||||
5 --- 115
|
|
||||||
5 --- 116
|
|
||||||
5 --- 117
|
|
||||||
5 --- 118
|
|
||||||
5 --- 119
|
|
||||||
5 --- 120
|
|
||||||
5 --- 121
|
|
||||||
5 --- 122
|
|
||||||
5 --- 123
|
|
||||||
5 --- 124
|
|
||||||
5 --- 125
|
|
||||||
5 --- 126
|
|
||||||
5 --- 127
|
|
||||||
5 --- 128
|
|
||||||
5 --- 129
|
|
||||||
5 --- 130
|
|
||||||
5 --- 131
|
|
||||||
5 --- 132
|
|
||||||
5 --- 133
|
|
||||||
5 --- 134
|
|
||||||
5 --- 135
|
|
||||||
5 --- 136
|
|
||||||
5 --- 137
|
|
||||||
5 --- 138
|
|
||||||
5 --- 139
|
|
||||||
5 --- 140
|
|
||||||
5 --- 141
|
|
||||||
5 --- 142
|
|
||||||
5 --- 143
|
|
||||||
5 --- 144
|
|
||||||
5 --- 145
|
|
||||||
5 --- 146
|
|
||||||
5 --- 147
|
|
||||||
5 --- 148
|
|
||||||
5 --- 149
|
|
||||||
5 --- 150
|
|
||||||
5 --- 151
|
|
||||||
5 --- 152
|
|
||||||
5 --- 153
|
|
||||||
5 --- 154
|
|
||||||
5 --- 155
|
|
||||||
5 --- 156
|
|
||||||
5 --- 157
|
|
||||||
5 --- 158
|
|
||||||
5 --- 159
|
|
||||||
5 --- 160
|
|
||||||
5 --- 161
|
|
||||||
5 --- 162
|
|
||||||
5 --- 163
|
|
||||||
5 --- 164
|
|
||||||
5 --- 165
|
|
||||||
5 --- 166
|
|
||||||
5 --- 167
|
|
||||||
5 --- 168
|
|
||||||
5 --- 169
|
|
||||||
5 --- 170
|
|
||||||
5 --- 171
|
|
||||||
5 --- 172
|
|
||||||
5 --- 173
|
|
||||||
5 --- 174
|
|
||||||
5 --- 175
|
|
||||||
5 --- 176
|
|
||||||
5 --- 177
|
|
||||||
5 --- 178
|
|
||||||
5 --- 179
|
|
||||||
5 --- 180
|
|
||||||
5 --- 181
|
|
||||||
5 --- 182
|
|
||||||
5 --- 183
|
|
||||||
5 --- 184
|
|
||||||
5 --- 185
|
|
||||||
5 --- 186
|
|
||||||
5 --- 187
|
|
||||||
5 --- 188
|
|
||||||
5 --- 189
|
|
||||||
5 --- 190
|
|
||||||
5 --- 191
|
|
||||||
5 --- 192
|
|
||||||
5 --- 193
|
|
||||||
5 --- 194
|
|
||||||
5 --- 195
|
|
||||||
5 --- 196
|
|
||||||
5 --- 197
|
|
||||||
5 --- 198
|
|
||||||
5 --- 199
|
|
||||||
5 --- 200
|
|
||||||
5 --- 201
|
|
||||||
5 --- 202
|
|
||||||
5 --- 203
|
|
||||||
5 --- 204
|
|
||||||
5 --- 205
|
|
||||||
5 --- 206
|
|
||||||
5 --- 207
|
|
||||||
5 --- 208
|
|
||||||
5 --- 209
|
|
||||||
5 --- 210
|
|
||||||
5 --- 211
|
|
||||||
5 --- 218
|
|
||||||
5 ---- 222
|
|
||||||
6 --- 212
|
|
||||||
6 --- 213
|
|
||||||
6 --- 214
|
|
||||||
6 --- 215
|
|
||||||
6 --- 216
|
|
||||||
6 --- 217
|
|
||||||
6 --- 220
|
|
||||||
6 ---- 223
|
|
||||||
230 --- 6
|
|
||||||
7 --- 224
|
|
||||||
7 x--> 229
|
|
||||||
7 --- 231
|
|
||||||
7 --- 236
|
|
||||||
212 --- 227
|
|
||||||
212 x--> 230
|
|
||||||
212 --- 232
|
|
||||||
212 --- 238
|
|
||||||
213 --- 228
|
|
||||||
213 x--> 230
|
|
||||||
213 --- 235
|
|
||||||
213 --- 239
|
|
||||||
214 --- 225
|
|
||||||
214 x--> 230
|
|
||||||
214 --- 234
|
|
||||||
214 --- 240
|
|
||||||
216 --- 226
|
|
||||||
216 x--> 230
|
|
||||||
216 --- 233
|
|
||||||
216 --- 237
|
|
||||||
221 --- 224
|
|
||||||
221 --- 229
|
|
||||||
221 --- 230
|
|
||||||
221 --- 231
|
|
||||||
221 --- 236
|
|
||||||
223 --- 225
|
|
||||||
223 --- 226
|
|
||||||
223 --- 227
|
|
||||||
223 --- 228
|
|
||||||
223 --- 232
|
|
||||||
223 --- 233
|
|
||||||
223 --- 234
|
|
||||||
223 --- 235
|
|
||||||
223 --- 237
|
|
||||||
223 --- 238
|
|
||||||
223 --- 239
|
|
||||||
223 --- 240
|
|
||||||
231 <--x 224
|
|
||||||
236 <--x 224
|
|
||||||
234 <--x 225
|
|
||||||
239 <--x 225
|
|
||||||
240 <--x 225
|
|
||||||
233 <--x 226
|
|
||||||
237 <--x 226
|
|
||||||
240 <--x 226
|
|
||||||
232 <--x 227
|
|
||||||
237 <--x 227
|
|
||||||
238 <--x 227
|
|
||||||
235 <--x 228
|
|
||||||
238 <--x 228
|
|
||||||
239 <--x 228
|
|
||||||
232 <--x 229
|
|
||||||
233 <--x 229
|
|
||||||
234 <--x 229
|
|
||||||
235 <--x 229
|
|
||||||
231 <--x 230
|
|
||||||
```
|
|
||||||
|
Before Width: | Height: | Size: 88 KiB |
4814
rust/kcl-lib/tests/kcl_samples/helical-gear/artifact_commands.snap
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
source: kcl-lib/src/simulation_tests.rs
|
||||||
|
description: Artifact graph flowchart helical-gear.kcl
|
||||||
|
extension: md
|
||||||
|
snapshot_kind: binary
|
||||||
|
---
|
||||||
@ -0,0 +1,138 @@
|
|||||||
|
```mermaid
|
||||||
|
flowchart LR
|
||||||
|
subgraph path8 [Path]
|
||||||
|
8["Path<br>[889, 995, 0]"]
|
||||||
|
12["Segment<br>[1003, 1030, 0]"]
|
||||||
|
13["Segment<br>[1038, 1066, 0]"]
|
||||||
|
14["Segment<br>[1074, 1102, 0]"]
|
||||||
|
15["Segment<br>[1110, 1186, 0]"]
|
||||||
|
16["Segment<br>[1194, 1259, 0]"]
|
||||||
|
17["Segment<br>[1267, 1274, 0]"]
|
||||||
|
30[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path9 [Path]
|
||||||
|
9["Path<br>[1779, 1849, 0]"]
|
||||||
|
26["Segment<br>[2813, 2820, 0]"]
|
||||||
|
29[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path10 [Path]
|
||||||
|
10["Path<br>[1779, 1849, 0]"]
|
||||||
|
19["Segment<br>[1859, 2025, 0]"]
|
||||||
|
20["Segment<br>[2035, 2120, 0]"]
|
||||||
|
23["Segment<br>[2130, 2351, 0]"]
|
||||||
|
24["Segment<br>[2438, 2524, 0]"]
|
||||||
|
28["Segment<br>[2813, 2820, 0]"]
|
||||||
|
31[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path11 [Path]
|
||||||
|
11["Path<br>[1779, 1849, 0]"]
|
||||||
|
18["Segment<br>[1859, 2025, 0]"]
|
||||||
|
21["Segment<br>[2035, 2120, 0]"]
|
||||||
|
22["Segment<br>[2130, 2351, 0]"]
|
||||||
|
25["Segment<br>[2438, 2524, 0]"]
|
||||||
|
27["Segment<br>[2813, 2820, 0]"]
|
||||||
|
32[Solid2d]
|
||||||
|
end
|
||||||
|
1["Plane<br>[864, 881, 0]"]
|
||||||
|
2["Plane<br>[1730, 1768, 0]"]
|
||||||
|
3["Plane<br>[1730, 1768, 0]"]
|
||||||
|
4["Plane<br>[1730, 1768, 0]"]
|
||||||
|
5["StartSketchOnPlane<br>[1716, 1769, 0]"]
|
||||||
|
6["StartSketchOnPlane<br>[1716, 1769, 0]"]
|
||||||
|
7["StartSketchOnPlane<br>[1716, 1769, 0]"]
|
||||||
|
33["Sweep Loft<br>[3337, 3404, 0]"]
|
||||||
|
34[Wall]
|
||||||
|
35[Wall]
|
||||||
|
36[Wall]
|
||||||
|
37[Wall]
|
||||||
|
38["Cap Start"]
|
||||||
|
39["Cap End"]
|
||||||
|
40["SweepEdge Opposite"]
|
||||||
|
41["SweepEdge Opposite"]
|
||||||
|
42["SweepEdge Opposite"]
|
||||||
|
43["SweepEdge Opposite"]
|
||||||
|
44["SweepEdge Adjacent"]
|
||||||
|
45["SweepEdge Adjacent"]
|
||||||
|
46["SweepEdge Adjacent"]
|
||||||
|
47["SweepEdge Adjacent"]
|
||||||
|
1 --- 8
|
||||||
|
2 <--x 7
|
||||||
|
2 --- 9
|
||||||
|
3 <--x 5
|
||||||
|
3 --- 10
|
||||||
|
4 <--x 6
|
||||||
|
4 --- 11
|
||||||
|
8 --- 12
|
||||||
|
8 --- 13
|
||||||
|
8 --- 14
|
||||||
|
8 --- 15
|
||||||
|
8 --- 16
|
||||||
|
8 --- 17
|
||||||
|
8 --- 30
|
||||||
|
9 --- 26
|
||||||
|
9 --- 29
|
||||||
|
9 x---> 33
|
||||||
|
9 x--> 40
|
||||||
|
9 x--> 41
|
||||||
|
9 x--> 42
|
||||||
|
9 x--> 43
|
||||||
|
10 --- 19
|
||||||
|
10 --- 20
|
||||||
|
10 --- 23
|
||||||
|
10 --- 24
|
||||||
|
10 --- 28
|
||||||
|
10 --- 31
|
||||||
|
10 x---> 33
|
||||||
|
11 --- 18
|
||||||
|
11 --- 21
|
||||||
|
11 --- 22
|
||||||
|
11 --- 25
|
||||||
|
11 --- 27
|
||||||
|
11 --- 32
|
||||||
|
11 ---- 33
|
||||||
|
18 --- 34
|
||||||
|
18 x--> 38
|
||||||
|
18 --- 41
|
||||||
|
18 --- 47
|
||||||
|
21 --- 36
|
||||||
|
21 x--> 38
|
||||||
|
21 --- 42
|
||||||
|
21 --- 44
|
||||||
|
22 --- 35
|
||||||
|
22 x--> 38
|
||||||
|
22 --- 40
|
||||||
|
22 --- 46
|
||||||
|
25 --- 37
|
||||||
|
25 x--> 38
|
||||||
|
25 --- 43
|
||||||
|
25 --- 45
|
||||||
|
33 --- 34
|
||||||
|
33 --- 35
|
||||||
|
33 --- 36
|
||||||
|
33 --- 37
|
||||||
|
33 --- 38
|
||||||
|
33 --- 39
|
||||||
|
33 --- 40
|
||||||
|
33 --- 41
|
||||||
|
33 --- 42
|
||||||
|
33 --- 43
|
||||||
|
33 --- 44
|
||||||
|
33 --- 45
|
||||||
|
33 --- 46
|
||||||
|
33 --- 47
|
||||||
|
41 <--x 34
|
||||||
|
44 <--x 34
|
||||||
|
47 <--x 34
|
||||||
|
40 <--x 35
|
||||||
|
45 <--x 35
|
||||||
|
46 <--x 35
|
||||||
|
42 <--x 36
|
||||||
|
44 <--x 36
|
||||||
|
46 <--x 36
|
||||||
|
43 <--x 37
|
||||||
|
45 <--x 37
|
||||||
|
40 <--x 39
|
||||||
|
41 <--x 39
|
||||||
|
42 <--x 39
|
||||||
|
43 <--x 39
|
||||||
|
```
|
||||||
3582
rust/kcl-lib/tests/kcl_samples/helical-gear/ast.snap
Normal file
830
rust/kcl-lib/tests/kcl_samples/helical-gear/ops.snap
Normal file
@ -0,0 +1,830 @@
|
|||||||
|
---
|
||||||
|
source: kcl-lib/src/simulation_tests.rs
|
||||||
|
description: Operations executed helical-gear.kcl
|
||||||
|
---
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"labeledArgs": {},
|
||||||
|
"name": "startSketchOn",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Plane",
|
||||||
|
"artifact_id": "[uuid]"
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {},
|
||||||
|
"name": "startSketchOn",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Plane",
|
||||||
|
"artifact_id": "[uuid]"
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {},
|
||||||
|
"name": "startSketchOn",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Plane",
|
||||||
|
"artifact_id": "[uuid]"
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {},
|
||||||
|
"name": "startSketchOn",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Plane",
|
||||||
|
"artifact_id": "[uuid]"
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "KclStdLibCall",
|
||||||
|
"name": "offsetPlane",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Plane",
|
||||||
|
"artifact_id": "[uuid]"
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"labeledArgs": {
|
||||||
|
"offset": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 0.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "KclStdLibCall",
|
||||||
|
"name": "offsetPlane",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Plane",
|
||||||
|
"artifact_id": "[uuid]"
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"labeledArgs": {
|
||||||
|
"offset": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 3.5,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "KclStdLibCall",
|
||||||
|
"name": "offsetPlane",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Plane",
|
||||||
|
"artifact_id": "[uuid]"
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"labeledArgs": {
|
||||||
|
"offset": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 7.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "polar",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"angle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 1.5707963267948966,
|
||||||
|
"ty": {
|
||||||
|
"type": "Known",
|
||||||
|
"type": "Angle",
|
||||||
|
"type": "Radians"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 19.733545036504076,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "polar",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"angle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 1.4640403411278755,
|
||||||
|
"ty": {
|
||||||
|
"type": "Known",
|
||||||
|
"type": "Angle",
|
||||||
|
"type": "Radians"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 19.733545036504076,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "polar",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"angle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 1.3560427808151838,
|
||||||
|
"ty": {
|
||||||
|
"type": "Known",
|
||||||
|
"type": "Angle",
|
||||||
|
"type": "Radians"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 19.733545036504076,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "polar",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"angle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 1.7037737936135122,
|
||||||
|
"ty": {
|
||||||
|
"type": "Known",
|
||||||
|
"type": "Angle",
|
||||||
|
"type": "Radians"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 23.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "polar",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"angle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 1.5970178079464912,
|
||||||
|
"ty": {
|
||||||
|
"type": "Known",
|
||||||
|
"type": "Angle",
|
||||||
|
"type": "Radians"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 23.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "polar",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"angle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 1.4890202476337995,
|
||||||
|
"ty": {
|
||||||
|
"type": "Known",
|
||||||
|
"type": "Angle",
|
||||||
|
"type": "Radians"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 23.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "polar",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"angle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 1.8699956271367815,
|
||||||
|
"ty": {
|
||||||
|
"type": "Known",
|
||||||
|
"type": "Angle",
|
||||||
|
"type": "Radians"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 19.733545036504076,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "polar",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"angle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 1.7632396414697604,
|
||||||
|
"ty": {
|
||||||
|
"type": "Known",
|
||||||
|
"type": "Angle",
|
||||||
|
"type": "Radians"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 19.733545036504076,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "polar",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"angle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 1.655242081157069,
|
||||||
|
"ty": {
|
||||||
|
"type": "Known",
|
||||||
|
"type": "Angle",
|
||||||
|
"type": "Radians"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 19.733545036504076,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {
|
||||||
|
"tool": {
|
||||||
|
"value": {
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": "subtract2d",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {
|
||||||
|
"tool": {
|
||||||
|
"value": {
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": "subtract2d",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {
|
||||||
|
"tool": {
|
||||||
|
"value": {
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": "subtract2d",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "helicalGearSketch",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"offsetHeight": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 0.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "helicalGearSketch",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"offsetHeight": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 3.5,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "helicalGearSketch",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"offsetHeight": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 7.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {},
|
||||||
|
"name": "loft",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Array",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "helicalGear",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"gearHeight": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 7.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"helixAngle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 35.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"module": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 2.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"nTeeth": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 21.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"pressureAngle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 20.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
}
|
||||||
|
]
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
source: kcl-lib/src/simulation_tests.rs
|
||||||
|
description: Variables in memory after executing helical-gear.kcl
|
||||||
|
---
|
||||||
|
{
|
||||||
|
"helicalGear": {
|
||||||
|
"type": "Function",
|
||||||
|
"value": null
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
rust/kcl-lib/tests/kcl_samples/helical-gear/rendered_model.png
Normal file
|
After Width: | Height: | Size: 101 KiB |
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
source: kcl-lib/src/simulation_tests.rs
|
||||||
|
description: Artifact graph flowchart helical-planetary-gearset.kcl
|
||||||
|
extension: md
|
||||||
|
snapshot_kind: binary
|
||||||
|
---
|
||||||
@ -0,0 +1,383 @@
|
|||||||
|
```mermaid
|
||||||
|
flowchart LR
|
||||||
|
subgraph path27 [Path]
|
||||||
|
27["Path<br>[973, 1079, 0]"]
|
||||||
|
41["Segment<br>[1087, 1114, 0]"]
|
||||||
|
44["Segment<br>[1122, 1150, 0]"]
|
||||||
|
45["Segment<br>[1158, 1186, 0]"]
|
||||||
|
47["Segment<br>[1194, 1270, 0]"]
|
||||||
|
49["Segment<br>[1278, 1343, 0]"]
|
||||||
|
52["Segment<br>[1351, 1358, 0]"]
|
||||||
|
93[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path28 [Path]
|
||||||
|
28["Path<br>[973, 1079, 0]"]
|
||||||
|
42["Segment<br>[1087, 1114, 0]"]
|
||||||
|
43["Segment<br>[1122, 1150, 0]"]
|
||||||
|
46["Segment<br>[1158, 1186, 0]"]
|
||||||
|
48["Segment<br>[1194, 1270, 0]"]
|
||||||
|
50["Segment<br>[1278, 1343, 0]"]
|
||||||
|
51["Segment<br>[1351, 1358, 0]"]
|
||||||
|
95[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path29 [Path]
|
||||||
|
29["Path<br>[1863, 1933, 0]"]
|
||||||
|
55["Segment<br>[1943, 2109, 0]"]
|
||||||
|
58["Segment<br>[2119, 2204, 0]"]
|
||||||
|
64["Segment<br>[2214, 2435, 0]"]
|
||||||
|
67["Segment<br>[2522, 2608, 0]"]
|
||||||
|
69["Segment<br>[2897, 2904, 0]"]
|
||||||
|
92[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path30 [Path]
|
||||||
|
30["Path<br>[1863, 1933, 0]"]
|
||||||
|
70["Segment<br>[2897, 2904, 0]"]
|
||||||
|
98[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path31 [Path]
|
||||||
|
31["Path<br>[1863, 1933, 0]"]
|
||||||
|
53["Segment<br>[1943, 2109, 0]"]
|
||||||
|
57["Segment<br>[2119, 2204, 0]"]
|
||||||
|
62["Segment<br>[2214, 2435, 0]"]
|
||||||
|
66["Segment<br>[2522, 2608, 0]"]
|
||||||
|
71["Segment<br>[2897, 2904, 0]"]
|
||||||
|
99[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path32 [Path]
|
||||||
|
32["Path<br>[1863, 1933, 0]"]
|
||||||
|
56["Segment<br>[1943, 2109, 0]"]
|
||||||
|
60["Segment<br>[2119, 2204, 0]"]
|
||||||
|
61["Segment<br>[2214, 2435, 0]"]
|
||||||
|
65["Segment<br>[2522, 2608, 0]"]
|
||||||
|
74["Segment<br>[2897, 2904, 0]"]
|
||||||
|
100[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path33 [Path]
|
||||||
|
33["Path<br>[1863, 1933, 0]"]
|
||||||
|
73["Segment<br>[2897, 2904, 0]"]
|
||||||
|
102[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path34 [Path]
|
||||||
|
34["Path<br>[1863, 1933, 0]"]
|
||||||
|
54["Segment<br>[1943, 2109, 0]"]
|
||||||
|
59["Segment<br>[2119, 2204, 0]"]
|
||||||
|
63["Segment<br>[2214, 2435, 0]"]
|
||||||
|
68["Segment<br>[2522, 2608, 0]"]
|
||||||
|
72["Segment<br>[2897, 2904, 0]"]
|
||||||
|
103[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path35 [Path]
|
||||||
|
35["Path<br>[4327, 4397, 0]"]
|
||||||
|
77["Segment<br>[4407, 4573, 0]"]
|
||||||
|
79["Segment<br>[4583, 4668, 0]"]
|
||||||
|
83["Segment<br>[4678, 4899, 0]"]
|
||||||
|
84["Segment<br>[4986, 5072, 0]"]
|
||||||
|
88["Segment<br>[5361, 5368, 0]"]
|
||||||
|
96[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path36 [Path]
|
||||||
|
36["Path<br>[4327, 4397, 0]"]
|
||||||
|
75["Segment<br>[4407, 4573, 0]"]
|
||||||
|
80["Segment<br>[4583, 4668, 0]"]
|
||||||
|
82["Segment<br>[4678, 4899, 0]"]
|
||||||
|
85["Segment<br>[4986, 5072, 0]"]
|
||||||
|
87["Segment<br>[5361, 5368, 0]"]
|
||||||
|
101[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path37 [Path]
|
||||||
|
37["Path<br>[4327, 4397, 0]"]
|
||||||
|
76["Segment<br>[4407, 4573, 0]"]
|
||||||
|
78["Segment<br>[4583, 4668, 0]"]
|
||||||
|
81["Segment<br>[4678, 4899, 0]"]
|
||||||
|
86["Segment<br>[4986, 5072, 0]"]
|
||||||
|
89["Segment<br>[5361, 5368, 0]"]
|
||||||
|
105[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path38 [Path]
|
||||||
|
38["Path<br>[5579, 5631, 0]"]
|
||||||
|
91["Segment<br>[5579, 5631, 0]"]
|
||||||
|
94[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path39 [Path]
|
||||||
|
39["Path<br>[5579, 5631, 0]"]
|
||||||
|
97[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path40 [Path]
|
||||||
|
40["Path<br>[5579, 5631, 0]"]
|
||||||
|
90["Segment<br>[5579, 5631, 0]"]
|
||||||
|
104[Solid2d]
|
||||||
|
end
|
||||||
|
1["Plane<br>[948, 965, 0]"]
|
||||||
|
2["Plane<br>[948, 965, 0]"]
|
||||||
|
3["Plane<br>[1814, 1852, 0]"]
|
||||||
|
4["Plane<br>[1814, 1852, 0]"]
|
||||||
|
5["Plane<br>[1814, 1852, 0]"]
|
||||||
|
6["Plane<br>[1814, 1852, 0]"]
|
||||||
|
7["Plane<br>[1814, 1852, 0]"]
|
||||||
|
8["Plane<br>[1814, 1852, 0]"]
|
||||||
|
9["Plane<br>[4278, 4316, 0]"]
|
||||||
|
10["Plane<br>[4278, 4316, 0]"]
|
||||||
|
11["Plane<br>[4278, 4316, 0]"]
|
||||||
|
12["Plane<br>[5530, 5568, 0]"]
|
||||||
|
13["Plane<br>[5530, 5568, 0]"]
|
||||||
|
14["Plane<br>[5530, 5568, 0]"]
|
||||||
|
15["StartSketchOnPlane<br>[4264, 4317, 0]"]
|
||||||
|
16["StartSketchOnPlane<br>[1800, 1853, 0]"]
|
||||||
|
17["StartSketchOnPlane<br>[1800, 1853, 0]"]
|
||||||
|
18["StartSketchOnPlane<br>[1800, 1853, 0]"]
|
||||||
|
19["StartSketchOnPlane<br>[1800, 1853, 0]"]
|
||||||
|
20["StartSketchOnPlane<br>[4264, 4317, 0]"]
|
||||||
|
21["StartSketchOnPlane<br>[5516, 5569, 0]"]
|
||||||
|
22["StartSketchOnPlane<br>[4264, 4317, 0]"]
|
||||||
|
23["StartSketchOnPlane<br>[1800, 1853, 0]"]
|
||||||
|
24["StartSketchOnPlane<br>[1800, 1853, 0]"]
|
||||||
|
25["StartSketchOnPlane<br>[5516, 5569, 0]"]
|
||||||
|
26["StartSketchOnPlane<br>[5516, 5569, 0]"]
|
||||||
|
106["Sweep Loft<br>[3421, 3488, 0]"]
|
||||||
|
107["Sweep Loft<br>[3421, 3488, 0]"]
|
||||||
|
108["Sweep Loft<br>[6125, 6192, 0]"]
|
||||||
|
109[Wall]
|
||||||
|
110[Wall]
|
||||||
|
111[Wall]
|
||||||
|
112[Wall]
|
||||||
|
113[Wall]
|
||||||
|
114[Wall]
|
||||||
|
115[Wall]
|
||||||
|
116[Wall]
|
||||||
|
117[Wall]
|
||||||
|
118["Cap Start"]
|
||||||
|
119["Cap Start"]
|
||||||
|
120["Cap Start"]
|
||||||
|
121["Cap End"]
|
||||||
|
122["Cap End"]
|
||||||
|
123["Cap End"]
|
||||||
|
124["SweepEdge Opposite"]
|
||||||
|
125["SweepEdge Opposite"]
|
||||||
|
126["SweepEdge Opposite"]
|
||||||
|
127["SweepEdge Opposite"]
|
||||||
|
128["SweepEdge Opposite"]
|
||||||
|
129["SweepEdge Opposite"]
|
||||||
|
130["SweepEdge Opposite"]
|
||||||
|
131["SweepEdge Opposite"]
|
||||||
|
132["SweepEdge Opposite"]
|
||||||
|
133["SweepEdge Adjacent"]
|
||||||
|
134["SweepEdge Adjacent"]
|
||||||
|
135["SweepEdge Adjacent"]
|
||||||
|
136["SweepEdge Adjacent"]
|
||||||
|
137["SweepEdge Adjacent"]
|
||||||
|
138["SweepEdge Adjacent"]
|
||||||
|
139["SweepEdge Adjacent"]
|
||||||
|
140["SweepEdge Adjacent"]
|
||||||
|
141["SweepEdge Adjacent"]
|
||||||
|
1 --- 28
|
||||||
|
2 --- 27
|
||||||
|
3 <--x 24
|
||||||
|
3 --- 34
|
||||||
|
4 <--x 17
|
||||||
|
4 --- 33
|
||||||
|
5 <--x 19
|
||||||
|
5 --- 32
|
||||||
|
6 <--x 18
|
||||||
|
6 --- 30
|
||||||
|
7 <--x 16
|
||||||
|
7 --- 31
|
||||||
|
8 <--x 23
|
||||||
|
8 --- 29
|
||||||
|
9 <--x 22
|
||||||
|
9 --- 36
|
||||||
|
10 <--x 15
|
||||||
|
10 --- 35
|
||||||
|
11 <--x 20
|
||||||
|
11 --- 37
|
||||||
|
12 <--x 26
|
||||||
|
12 --- 38
|
||||||
|
13 <--x 25
|
||||||
|
13 --- 39
|
||||||
|
14 <--x 21
|
||||||
|
14 --- 40
|
||||||
|
27 --- 41
|
||||||
|
27 --- 44
|
||||||
|
27 --- 45
|
||||||
|
27 --- 47
|
||||||
|
27 --- 49
|
||||||
|
27 --- 52
|
||||||
|
27 --- 93
|
||||||
|
28 --- 42
|
||||||
|
28 --- 43
|
||||||
|
28 --- 46
|
||||||
|
28 --- 48
|
||||||
|
28 --- 50
|
||||||
|
28 --- 51
|
||||||
|
28 --- 95
|
||||||
|
29 --- 55
|
||||||
|
29 --- 58
|
||||||
|
29 --- 64
|
||||||
|
29 --- 67
|
||||||
|
29 --- 69
|
||||||
|
29 --- 92
|
||||||
|
29 ---- 107
|
||||||
|
30 --- 70
|
||||||
|
30 --- 98
|
||||||
|
30 x---> 107
|
||||||
|
30 x--> 128
|
||||||
|
30 x--> 129
|
||||||
|
30 x--> 130
|
||||||
|
30 x--> 131
|
||||||
|
31 --- 53
|
||||||
|
31 --- 57
|
||||||
|
31 --- 62
|
||||||
|
31 --- 66
|
||||||
|
31 --- 71
|
||||||
|
31 --- 99
|
||||||
|
31 ---- 106
|
||||||
|
32 --- 56
|
||||||
|
32 --- 60
|
||||||
|
32 --- 61
|
||||||
|
32 --- 65
|
||||||
|
32 --- 74
|
||||||
|
32 --- 100
|
||||||
|
32 x---> 107
|
||||||
|
33 --- 73
|
||||||
|
33 --- 102
|
||||||
|
33 x---> 106
|
||||||
|
33 x--> 124
|
||||||
|
33 x--> 125
|
||||||
|
33 x--> 126
|
||||||
|
33 x--> 127
|
||||||
|
34 --- 54
|
||||||
|
34 --- 59
|
||||||
|
34 --- 63
|
||||||
|
34 --- 68
|
||||||
|
34 --- 72
|
||||||
|
34 --- 103
|
||||||
|
34 x---> 106
|
||||||
|
35 --- 77
|
||||||
|
35 --- 79
|
||||||
|
35 --- 83
|
||||||
|
35 --- 84
|
||||||
|
35 --- 88
|
||||||
|
35 --- 96
|
||||||
|
36 --- 75
|
||||||
|
36 --- 80
|
||||||
|
36 --- 82
|
||||||
|
36 --- 85
|
||||||
|
36 --- 87
|
||||||
|
36 --- 101
|
||||||
|
37 --- 76
|
||||||
|
37 --- 78
|
||||||
|
37 --- 81
|
||||||
|
37 --- 86
|
||||||
|
37 --- 89
|
||||||
|
37 --- 105
|
||||||
|
38 --- 91
|
||||||
|
38 --- 94
|
||||||
|
38 ---- 108
|
||||||
|
39 --- 97
|
||||||
|
39 x---> 108
|
||||||
|
39 x--> 132
|
||||||
|
40 --- 90
|
||||||
|
40 --- 104
|
||||||
|
40 x---> 108
|
||||||
|
53 --- 111
|
||||||
|
53 x--> 119
|
||||||
|
53 --- 126
|
||||||
|
53 --- 135
|
||||||
|
55 --- 115
|
||||||
|
55 x--> 118
|
||||||
|
55 --- 130
|
||||||
|
55 --- 139
|
||||||
|
57 --- 109
|
||||||
|
57 x--> 119
|
||||||
|
57 --- 124
|
||||||
|
57 --- 134
|
||||||
|
58 --- 113
|
||||||
|
58 x--> 118
|
||||||
|
58 --- 131
|
||||||
|
58 --- 138
|
||||||
|
62 --- 110
|
||||||
|
62 x--> 119
|
||||||
|
62 --- 127
|
||||||
|
62 --- 136
|
||||||
|
64 --- 116
|
||||||
|
64 x--> 118
|
||||||
|
64 --- 129
|
||||||
|
64 --- 140
|
||||||
|
66 --- 112
|
||||||
|
66 x--> 119
|
||||||
|
66 --- 125
|
||||||
|
66 --- 133
|
||||||
|
67 --- 114
|
||||||
|
67 x--> 118
|
||||||
|
67 --- 128
|
||||||
|
67 --- 137
|
||||||
|
91 --- 117
|
||||||
|
91 x--> 120
|
||||||
|
91 --- 132
|
||||||
|
91 --- 141
|
||||||
|
106 --- 109
|
||||||
|
106 --- 110
|
||||||
|
106 --- 111
|
||||||
|
106 --- 112
|
||||||
|
106 --- 119
|
||||||
|
106 --- 122
|
||||||
|
106 --- 124
|
||||||
|
106 --- 125
|
||||||
|
106 --- 126
|
||||||
|
106 --- 127
|
||||||
|
106 --- 133
|
||||||
|
106 --- 134
|
||||||
|
106 --- 135
|
||||||
|
106 --- 136
|
||||||
|
107 --- 113
|
||||||
|
107 --- 114
|
||||||
|
107 --- 115
|
||||||
|
107 --- 116
|
||||||
|
107 --- 118
|
||||||
|
107 --- 121
|
||||||
|
107 --- 128
|
||||||
|
107 --- 129
|
||||||
|
107 --- 130
|
||||||
|
107 --- 131
|
||||||
|
107 --- 137
|
||||||
|
107 --- 138
|
||||||
|
107 --- 139
|
||||||
|
107 --- 140
|
||||||
|
108 --- 117
|
||||||
|
108 --- 120
|
||||||
|
108 --- 123
|
||||||
|
108 --- 132
|
||||||
|
108 --- 141
|
||||||
|
124 <--x 109
|
||||||
|
134 <--x 109
|
||||||
|
136 <--x 109
|
||||||
|
127 <--x 110
|
||||||
|
133 <--x 110
|
||||||
|
136 <--x 110
|
||||||
|
126 <--x 111
|
||||||
|
134 <--x 111
|
||||||
|
135 <--x 111
|
||||||
|
125 <--x 112
|
||||||
|
133 <--x 112
|
||||||
|
131 <--x 113
|
||||||
|
138 <--x 113
|
||||||
|
140 <--x 113
|
||||||
|
128 <--x 114
|
||||||
|
137 <--x 114
|
||||||
|
130 <--x 115
|
||||||
|
138 <--x 115
|
||||||
|
139 <--x 115
|
||||||
|
129 <--x 116
|
||||||
|
137 <--x 116
|
||||||
|
140 <--x 116
|
||||||
|
132 <--x 117
|
||||||
|
141 <--x 117
|
||||||
|
128 <--x 121
|
||||||
|
129 <--x 121
|
||||||
|
130 <--x 121
|
||||||
|
131 <--x 121
|
||||||
|
124 <--x 122
|
||||||
|
125 <--x 122
|
||||||
|
126 <--x 122
|
||||||
|
127 <--x 122
|
||||||
|
132 <--x 123
|
||||||
|
```
|
||||||
6871
rust/kcl-lib/tests/kcl_samples/helical-planetary-gearset/ast.snap
Normal file
2743
rust/kcl-lib/tests/kcl_samples/helical-planetary-gearset/ops.snap
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
source: kcl-lib/src/simulation_tests.rs
|
||||||
|
description: Variables in memory after executing helical-planetary-gearset.kcl
|
||||||
|
---
|
||||||
|
{
|
||||||
|
"helicalGear": {
|
||||||
|
"type": "Function",
|
||||||
|
"value": null
|
||||||
|
},
|
||||||
|
"numPlanetGears": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 3.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ringGear": {
|
||||||
|
"type": "Function",
|
||||||
|
"value": null
|
||||||
|
},
|
||||||
|
"seg01": {
|
||||||
|
"type": "TagIdentifier",
|
||||||
|
"type": "TagIdentifier",
|
||||||
|
"value": "seg01"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 139 KiB |
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
source: kcl-lib/src/simulation_tests.rs
|
||||||
|
description: Artifact graph flowchart herringbone-gear.kcl
|
||||||
|
extension: md
|
||||||
|
snapshot_kind: binary
|
||||||
|
---
|
||||||
@ -0,0 +1,119 @@
|
|||||||
|
```mermaid
|
||||||
|
flowchart LR
|
||||||
|
subgraph path5 [Path]
|
||||||
|
5["Path<br>[1136, 1206, 0]"]
|
||||||
|
9["Segment<br>[1216, 1382, 0]"]
|
||||||
|
11["Segment<br>[1392, 1477, 0]"]
|
||||||
|
14["Segment<br>[1487, 1708, 0]"]
|
||||||
|
15["Segment<br>[1795, 1881, 0]"]
|
||||||
|
17["Segment<br>[2170, 2177, 0]"]
|
||||||
|
22[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path6 [Path]
|
||||||
|
6["Path<br>[1136, 1206, 0]"]
|
||||||
|
10["Segment<br>[1216, 1382, 0]"]
|
||||||
|
12["Segment<br>[1392, 1477, 0]"]
|
||||||
|
13["Segment<br>[1487, 1708, 0]"]
|
||||||
|
16["Segment<br>[1795, 1881, 0]"]
|
||||||
|
18["Segment<br>[2170, 2177, 0]"]
|
||||||
|
23[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path7 [Path]
|
||||||
|
7["Path<br>[2256, 2291, 0]"]
|
||||||
|
20["Segment<br>[2256, 2291, 0]"]
|
||||||
|
21[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path8 [Path]
|
||||||
|
8["Path<br>[2256, 2291, 0]"]
|
||||||
|
19["Segment<br>[2256, 2291, 0]"]
|
||||||
|
24[Solid2d]
|
||||||
|
end
|
||||||
|
1["Plane<br>[1087, 1125, 0]"]
|
||||||
|
2["Plane<br>[1087, 1125, 0]"]
|
||||||
|
3["StartSketchOnPlane<br>[1073, 1126, 0]"]
|
||||||
|
4["StartSketchOnPlane<br>[1073, 1126, 0]"]
|
||||||
|
25["Sweep Loft<br>[2816, 2917, 0]"]
|
||||||
|
26[Wall]
|
||||||
|
27[Wall]
|
||||||
|
28[Wall]
|
||||||
|
29[Wall]
|
||||||
|
30["Cap Start"]
|
||||||
|
31["Cap End"]
|
||||||
|
32["SweepEdge Opposite"]
|
||||||
|
33["SweepEdge Opposite"]
|
||||||
|
34["SweepEdge Opposite"]
|
||||||
|
35["SweepEdge Opposite"]
|
||||||
|
36["SweepEdge Adjacent"]
|
||||||
|
37["SweepEdge Adjacent"]
|
||||||
|
38["SweepEdge Adjacent"]
|
||||||
|
39["SweepEdge Adjacent"]
|
||||||
|
1 <--x 4
|
||||||
|
1 --- 5
|
||||||
|
1 --- 7
|
||||||
|
2 <--x 3
|
||||||
|
2 --- 6
|
||||||
|
2 --- 8
|
||||||
|
5 --- 9
|
||||||
|
5 --- 11
|
||||||
|
5 --- 14
|
||||||
|
5 --- 15
|
||||||
|
5 --- 17
|
||||||
|
5 --- 22
|
||||||
|
5 x---> 25
|
||||||
|
6 --- 10
|
||||||
|
6 --- 12
|
||||||
|
6 --- 13
|
||||||
|
6 --- 16
|
||||||
|
6 --- 18
|
||||||
|
6 --- 23
|
||||||
|
6 ---- 25
|
||||||
|
7 --- 20
|
||||||
|
7 --- 21
|
||||||
|
8 --- 19
|
||||||
|
8 --- 24
|
||||||
|
10 --- 28
|
||||||
|
10 x--> 30
|
||||||
|
10 --- 35
|
||||||
|
10 --- 36
|
||||||
|
12 --- 27
|
||||||
|
12 x--> 30
|
||||||
|
12 --- 33
|
||||||
|
12 --- 39
|
||||||
|
13 --- 26
|
||||||
|
13 x--> 30
|
||||||
|
13 --- 32
|
||||||
|
13 --- 37
|
||||||
|
16 --- 29
|
||||||
|
16 x--> 30
|
||||||
|
16 --- 34
|
||||||
|
16 --- 38
|
||||||
|
25 --- 26
|
||||||
|
25 --- 27
|
||||||
|
25 --- 28
|
||||||
|
25 --- 29
|
||||||
|
25 --- 30
|
||||||
|
25 --- 31
|
||||||
|
25 --- 32
|
||||||
|
25 --- 33
|
||||||
|
25 --- 34
|
||||||
|
25 --- 35
|
||||||
|
25 --- 36
|
||||||
|
25 --- 37
|
||||||
|
25 --- 38
|
||||||
|
25 --- 39
|
||||||
|
32 <--x 26
|
||||||
|
37 <--x 26
|
||||||
|
38 <--x 26
|
||||||
|
33 <--x 27
|
||||||
|
37 <--x 27
|
||||||
|
39 <--x 27
|
||||||
|
35 <--x 28
|
||||||
|
36 <--x 28
|
||||||
|
39 <--x 28
|
||||||
|
34 <--x 29
|
||||||
|
38 <--x 29
|
||||||
|
32 <--x 31
|
||||||
|
33 <--x 31
|
||||||
|
34 <--x 31
|
||||||
|
35 <--x 31
|
||||||
|
```
|
||||||
2773
rust/kcl-lib/tests/kcl_samples/herringbone-gear/ast.snap
Normal file
621
rust/kcl-lib/tests/kcl_samples/herringbone-gear/ops.snap
Normal file
@ -0,0 +1,621 @@
|
|||||||
|
---
|
||||||
|
source: kcl-lib/src/simulation_tests.rs
|
||||||
|
description: Operations executed herringbone-gear.kcl
|
||||||
|
---
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"labeledArgs": {},
|
||||||
|
"name": "startSketchOn",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Plane",
|
||||||
|
"artifact_id": "[uuid]"
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {},
|
||||||
|
"name": "startSketchOn",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Plane",
|
||||||
|
"artifact_id": "[uuid]"
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "KclStdLibCall",
|
||||||
|
"name": "offsetPlane",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Plane",
|
||||||
|
"artifact_id": "[uuid]"
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"labeledArgs": {
|
||||||
|
"offset": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 0.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "KclStdLibCall",
|
||||||
|
"name": "offsetPlane",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Plane",
|
||||||
|
"artifact_id": "[uuid]"
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"labeledArgs": {
|
||||||
|
"offset": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 4.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "polar",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"angle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 1.5707963267948966,
|
||||||
|
"ty": {
|
||||||
|
"type": "Known",
|
||||||
|
"type": "Angle",
|
||||||
|
"type": "Radians"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 12.128696578449956,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "polar",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"angle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 1.3195388864186572,
|
||||||
|
"ty": {
|
||||||
|
"type": "Known",
|
||||||
|
"type": "Angle",
|
||||||
|
"type": "Radians"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 12.128696578449956,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "polar",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"angle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 1.6824973989225336,
|
||||||
|
"ty": {
|
||||||
|
"type": "Known",
|
||||||
|
"type": "Angle",
|
||||||
|
"type": "Radians"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 13.5,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "polar",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"angle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 1.4312399585462943,
|
||||||
|
"ty": {
|
||||||
|
"type": "Known",
|
||||||
|
"type": "Angle",
|
||||||
|
"type": "Radians"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 13.5,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "polar",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"angle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 1.82212373908208,
|
||||||
|
"ty": {
|
||||||
|
"type": "Known",
|
||||||
|
"type": "Angle",
|
||||||
|
"type": "Radians"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 12.128696578449956,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "polar",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"angle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 1.5708662987058406,
|
||||||
|
"ty": {
|
||||||
|
"type": "Known",
|
||||||
|
"type": "Angle",
|
||||||
|
"type": "Radians"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 12.128696578449956,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {
|
||||||
|
"tool": {
|
||||||
|
"value": {
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": "subtract2d",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {
|
||||||
|
"tool": {
|
||||||
|
"value": {
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": "subtract2d",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "herringboneGearSketch",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"offsetHeight": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 0.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "herringboneGearSketch",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"offsetHeight": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 4.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "KclStdLibCall",
|
||||||
|
"name": "clone",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"labeledArgs": {},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {
|
||||||
|
"vDegree": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 1.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": "loft",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Array",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "herringboneGear",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"gearHeight": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 8.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"helixAngle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 40.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"module": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 1.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"nTeeth": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 25.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"pressureAngle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 14.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
}
|
||||||
|
]
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
source: kcl-lib/src/simulation_tests.rs
|
||||||
|
description: Variables in memory after executing herringbone-gear.kcl
|
||||||
|
---
|
||||||
|
{
|
||||||
|
"herringboneGear": {
|
||||||
|
"type": "Function",
|
||||||
|
"value": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 147 KiB |
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
source: kcl-lib/src/simulation_tests.rs
|
||||||
|
description: Artifact graph flowchart herringbone-planetary-gearset.kcl
|
||||||
|
extension: md
|
||||||
|
snapshot_kind: binary
|
||||||
|
---
|
||||||
@ -0,0 +1,315 @@
|
|||||||
|
```mermaid
|
||||||
|
flowchart LR
|
||||||
|
subgraph path17 [Path]
|
||||||
|
17["Path<br>[1219, 1289, 0]"]
|
||||||
|
29["Segment<br>[1299, 1465, 0]"]
|
||||||
|
35["Segment<br>[1475, 1560, 0]"]
|
||||||
|
38["Segment<br>[1570, 1791, 0]"]
|
||||||
|
42["Segment<br>[1878, 1964, 0]"]
|
||||||
|
45["Segment<br>[2253, 2260, 0]"]
|
||||||
|
67[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path18 [Path]
|
||||||
|
18["Path<br>[1219, 1289, 0]"]
|
||||||
|
31["Segment<br>[1299, 1465, 0]"]
|
||||||
|
36["Segment<br>[1475, 1560, 0]"]
|
||||||
|
39["Segment<br>[1570, 1791, 0]"]
|
||||||
|
41["Segment<br>[1878, 1964, 0]"]
|
||||||
|
48["Segment<br>[2253, 2260, 0]"]
|
||||||
|
68[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path19 [Path]
|
||||||
|
19["Path<br>[1219, 1289, 0]"]
|
||||||
|
30["Segment<br>[1299, 1465, 0]"]
|
||||||
|
34["Segment<br>[1475, 1560, 0]"]
|
||||||
|
40["Segment<br>[1570, 1791, 0]"]
|
||||||
|
44["Segment<br>[1878, 1964, 0]"]
|
||||||
|
46["Segment<br>[2253, 2260, 0]"]
|
||||||
|
70[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path20 [Path]
|
||||||
|
20["Path<br>[1219, 1289, 0]"]
|
||||||
|
32["Segment<br>[1299, 1465, 0]"]
|
||||||
|
33["Segment<br>[1475, 1560, 0]"]
|
||||||
|
37["Segment<br>[1570, 1791, 0]"]
|
||||||
|
43["Segment<br>[1878, 1964, 0]"]
|
||||||
|
47["Segment<br>[2253, 2260, 0]"]
|
||||||
|
71[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path21 [Path]
|
||||||
|
21["Path<br>[2339, 2374, 0]"]
|
||||||
|
51["Segment<br>[2339, 2374, 0]"]
|
||||||
|
65[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path22 [Path]
|
||||||
|
22["Path<br>[2339, 2374, 0]"]
|
||||||
|
49["Segment<br>[2339, 2374, 0]"]
|
||||||
|
72[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path23 [Path]
|
||||||
|
23["Path<br>[2339, 2374, 0]"]
|
||||||
|
50["Segment<br>[2339, 2374, 0]"]
|
||||||
|
75[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path24 [Path]
|
||||||
|
24["Path<br>[2339, 2374, 0]"]
|
||||||
|
52["Segment<br>[2339, 2374, 0]"]
|
||||||
|
76[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path25 [Path]
|
||||||
|
25["Path<br>[3843, 3913, 0]"]
|
||||||
|
53["Segment<br>[3923, 4089, 0]"]
|
||||||
|
56["Segment<br>[4099, 4184, 0]"]
|
||||||
|
58["Segment<br>[4194, 4415, 0]"]
|
||||||
|
59["Segment<br>[4502, 4588, 0]"]
|
||||||
|
61["Segment<br>[4877, 4884, 0]"]
|
||||||
|
69[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path26 [Path]
|
||||||
|
26["Path<br>[3843, 3913, 0]"]
|
||||||
|
54["Segment<br>[3923, 4089, 0]"]
|
||||||
|
55["Segment<br>[4099, 4184, 0]"]
|
||||||
|
57["Segment<br>[4194, 4415, 0]"]
|
||||||
|
60["Segment<br>[4502, 4588, 0]"]
|
||||||
|
62["Segment<br>[4877, 4884, 0]"]
|
||||||
|
74[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path27 [Path]
|
||||||
|
27["Path<br>[5095, 5146, 0]"]
|
||||||
|
64["Segment<br>[5095, 5146, 0]"]
|
||||||
|
66[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path28 [Path]
|
||||||
|
28["Path<br>[5095, 5146, 0]"]
|
||||||
|
63["Segment<br>[5095, 5146, 0]"]
|
||||||
|
73[Solid2d]
|
||||||
|
end
|
||||||
|
1["Plane<br>[1170, 1208, 0]"]
|
||||||
|
2["Plane<br>[1170, 1208, 0]"]
|
||||||
|
3["Plane<br>[1170, 1208, 0]"]
|
||||||
|
4["Plane<br>[1170, 1208, 0]"]
|
||||||
|
5["Plane<br>[3794, 3832, 0]"]
|
||||||
|
6["Plane<br>[3794, 3832, 0]"]
|
||||||
|
7["Plane<br>[5046, 5084, 0]"]
|
||||||
|
8["Plane<br>[5046, 5084, 0]"]
|
||||||
|
9["StartSketchOnPlane<br>[1156, 1209, 0]"]
|
||||||
|
10["StartSketchOnPlane<br>[1156, 1209, 0]"]
|
||||||
|
11["StartSketchOnPlane<br>[3780, 3833, 0]"]
|
||||||
|
12["StartSketchOnPlane<br>[5032, 5085, 0]"]
|
||||||
|
13["StartSketchOnPlane<br>[3780, 3833, 0]"]
|
||||||
|
14["StartSketchOnPlane<br>[1156, 1209, 0]"]
|
||||||
|
15["StartSketchOnPlane<br>[1156, 1209, 0]"]
|
||||||
|
16["StartSketchOnPlane<br>[5032, 5085, 0]"]
|
||||||
|
77["Sweep Loft<br>[2899, 3000, 0]"]
|
||||||
|
78["Sweep Loft<br>[2899, 3000, 0]"]
|
||||||
|
79["Sweep Loft<br>[5671, 5772, 0]"]
|
||||||
|
80[Wall]
|
||||||
|
81[Wall]
|
||||||
|
82[Wall]
|
||||||
|
83[Wall]
|
||||||
|
84[Wall]
|
||||||
|
85[Wall]
|
||||||
|
86[Wall]
|
||||||
|
87[Wall]
|
||||||
|
88[Wall]
|
||||||
|
89["Cap Start"]
|
||||||
|
90["Cap Start"]
|
||||||
|
91["Cap Start"]
|
||||||
|
92["Cap End"]
|
||||||
|
93["Cap End"]
|
||||||
|
94["Cap End"]
|
||||||
|
95["SweepEdge Opposite"]
|
||||||
|
96["SweepEdge Opposite"]
|
||||||
|
97["SweepEdge Opposite"]
|
||||||
|
98["SweepEdge Opposite"]
|
||||||
|
99["SweepEdge Opposite"]
|
||||||
|
100["SweepEdge Opposite"]
|
||||||
|
101["SweepEdge Opposite"]
|
||||||
|
102["SweepEdge Opposite"]
|
||||||
|
103["SweepEdge Opposite"]
|
||||||
|
104["SweepEdge Adjacent"]
|
||||||
|
105["SweepEdge Adjacent"]
|
||||||
|
106["SweepEdge Adjacent"]
|
||||||
|
107["SweepEdge Adjacent"]
|
||||||
|
108["SweepEdge Adjacent"]
|
||||||
|
109["SweepEdge Adjacent"]
|
||||||
|
110["SweepEdge Adjacent"]
|
||||||
|
111["SweepEdge Adjacent"]
|
||||||
|
112["SweepEdge Adjacent"]
|
||||||
|
1 <--x 15
|
||||||
|
1 --- 18
|
||||||
|
1 --- 24
|
||||||
|
2 <--x 9
|
||||||
|
2 --- 17
|
||||||
|
2 --- 22
|
||||||
|
3 <--x 14
|
||||||
|
3 --- 20
|
||||||
|
3 --- 21
|
||||||
|
4 <--x 10
|
||||||
|
4 --- 19
|
||||||
|
4 --- 23
|
||||||
|
5 <--x 13
|
||||||
|
5 --- 25
|
||||||
|
6 <--x 11
|
||||||
|
6 --- 26
|
||||||
|
7 <--x 16
|
||||||
|
7 --- 27
|
||||||
|
8 <--x 12
|
||||||
|
8 --- 28
|
||||||
|
17 --- 29
|
||||||
|
17 --- 35
|
||||||
|
17 --- 38
|
||||||
|
17 --- 42
|
||||||
|
17 --- 45
|
||||||
|
17 --- 67
|
||||||
|
17 x---> 77
|
||||||
|
18 --- 31
|
||||||
|
18 --- 36
|
||||||
|
18 --- 39
|
||||||
|
18 --- 41
|
||||||
|
18 --- 48
|
||||||
|
18 --- 68
|
||||||
|
18 x---> 78
|
||||||
|
19 --- 30
|
||||||
|
19 --- 34
|
||||||
|
19 --- 40
|
||||||
|
19 --- 44
|
||||||
|
19 --- 46
|
||||||
|
19 --- 70
|
||||||
|
19 ---- 78
|
||||||
|
20 --- 32
|
||||||
|
20 --- 33
|
||||||
|
20 --- 37
|
||||||
|
20 --- 43
|
||||||
|
20 --- 47
|
||||||
|
20 --- 71
|
||||||
|
20 ---- 77
|
||||||
|
21 --- 51
|
||||||
|
21 --- 65
|
||||||
|
22 --- 49
|
||||||
|
22 --- 72
|
||||||
|
23 --- 50
|
||||||
|
23 --- 75
|
||||||
|
24 --- 52
|
||||||
|
24 --- 76
|
||||||
|
25 --- 53
|
||||||
|
25 --- 56
|
||||||
|
25 --- 58
|
||||||
|
25 --- 59
|
||||||
|
25 --- 61
|
||||||
|
25 --- 69
|
||||||
|
26 --- 54
|
||||||
|
26 --- 55
|
||||||
|
26 --- 57
|
||||||
|
26 --- 60
|
||||||
|
26 --- 62
|
||||||
|
26 --- 74
|
||||||
|
27 --- 64
|
||||||
|
27 --- 66
|
||||||
|
27 ---- 79
|
||||||
|
28 --- 63
|
||||||
|
28 --- 73
|
||||||
|
28 x---> 79
|
||||||
|
30 --- 85
|
||||||
|
30 x--> 89
|
||||||
|
30 --- 101
|
||||||
|
30 --- 109
|
||||||
|
32 --- 83
|
||||||
|
32 x--> 91
|
||||||
|
32 --- 98
|
||||||
|
32 --- 104
|
||||||
|
33 --- 81
|
||||||
|
33 x--> 91
|
||||||
|
33 --- 97
|
||||||
|
33 --- 106
|
||||||
|
34 --- 84
|
||||||
|
34 x--> 89
|
||||||
|
34 --- 102
|
||||||
|
34 --- 108
|
||||||
|
37 --- 80
|
||||||
|
37 x--> 91
|
||||||
|
37 --- 96
|
||||||
|
37 --- 107
|
||||||
|
40 --- 86
|
||||||
|
40 x--> 89
|
||||||
|
40 --- 100
|
||||||
|
40 --- 110
|
||||||
|
43 --- 82
|
||||||
|
43 x--> 91
|
||||||
|
43 --- 95
|
||||||
|
43 --- 105
|
||||||
|
44 --- 87
|
||||||
|
44 x--> 89
|
||||||
|
44 --- 99
|
||||||
|
44 --- 111
|
||||||
|
64 --- 88
|
||||||
|
64 x--> 90
|
||||||
|
64 --- 103
|
||||||
|
64 --- 112
|
||||||
|
77 --- 80
|
||||||
|
77 --- 81
|
||||||
|
77 --- 82
|
||||||
|
77 --- 83
|
||||||
|
77 --- 91
|
||||||
|
77 --- 94
|
||||||
|
77 --- 95
|
||||||
|
77 --- 96
|
||||||
|
77 --- 97
|
||||||
|
77 --- 98
|
||||||
|
77 --- 104
|
||||||
|
77 --- 105
|
||||||
|
77 --- 106
|
||||||
|
77 --- 107
|
||||||
|
78 --- 84
|
||||||
|
78 --- 85
|
||||||
|
78 --- 86
|
||||||
|
78 --- 87
|
||||||
|
78 --- 89
|
||||||
|
78 --- 92
|
||||||
|
78 --- 99
|
||||||
|
78 --- 100
|
||||||
|
78 --- 101
|
||||||
|
78 --- 102
|
||||||
|
78 --- 108
|
||||||
|
78 --- 109
|
||||||
|
78 --- 110
|
||||||
|
78 --- 111
|
||||||
|
79 --- 88
|
||||||
|
79 --- 90
|
||||||
|
79 --- 93
|
||||||
|
79 --- 103
|
||||||
|
79 --- 112
|
||||||
|
96 <--x 80
|
||||||
|
105 <--x 80
|
||||||
|
107 <--x 80
|
||||||
|
97 <--x 81
|
||||||
|
106 <--x 81
|
||||||
|
107 <--x 81
|
||||||
|
95 <--x 82
|
||||||
|
105 <--x 82
|
||||||
|
98 <--x 83
|
||||||
|
104 <--x 83
|
||||||
|
106 <--x 83
|
||||||
|
102 <--x 84
|
||||||
|
108 <--x 84
|
||||||
|
110 <--x 84
|
||||||
|
101 <--x 85
|
||||||
|
108 <--x 85
|
||||||
|
109 <--x 85
|
||||||
|
100 <--x 86
|
||||||
|
110 <--x 86
|
||||||
|
111 <--x 86
|
||||||
|
99 <--x 87
|
||||||
|
111 <--x 87
|
||||||
|
103 <--x 88
|
||||||
|
112 <--x 88
|
||||||
|
99 <--x 92
|
||||||
|
100 <--x 92
|
||||||
|
101 <--x 92
|
||||||
|
102 <--x 92
|
||||||
|
103 <--x 93
|
||||||
|
95 <--x 94
|
||||||
|
96 <--x 94
|
||||||
|
97 <--x 94
|
||||||
|
98 <--x 94
|
||||||
|
```
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
source: kcl-lib/src/simulation_tests.rs
|
||||||
|
description: Variables in memory after executing herringbone-planetary-gearset.kcl
|
||||||
|
---
|
||||||
|
{
|
||||||
|
"herringboneGear": {
|
||||||
|
"type": "Function",
|
||||||
|
"value": null
|
||||||
|
},
|
||||||
|
"numPlanetGears": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 4.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ringGear": {
|
||||||
|
"type": "Function",
|
||||||
|
"value": null
|
||||||
|
},
|
||||||
|
"seg01": {
|
||||||
|
"type": "TagIdentifier",
|
||||||
|
"type": "TagIdentifier",
|
||||||
|
"value": "seg01"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 157 KiB |
4581
rust/kcl-lib/tests/kcl_samples/spur-gear/artifact_commands.snap
Normal file
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
source: kcl-lib/src/simulation_tests.rs
|
source: kcl-lib/src/simulation_tests.rs
|
||||||
description: Artifact graph flowchart gear.kcl
|
description: Artifact graph flowchart spur-gear.kcl
|
||||||
extension: md
|
extension: md
|
||||||
snapshot_kind: binary
|
snapshot_kind: binary
|
||||||
---
|
---
|
||||||
@ -0,0 +1,100 @@
|
|||||||
|
```mermaid
|
||||||
|
flowchart LR
|
||||||
|
subgraph path3 [Path]
|
||||||
|
3["Path<br>[1065, 1171, 0]"]
|
||||||
|
5["Segment<br>[1179, 1206, 0]"]
|
||||||
|
6["Segment<br>[1214, 1242, 0]"]
|
||||||
|
7["Segment<br>[1250, 1278, 0]"]
|
||||||
|
8["Segment<br>[1286, 1362, 0]"]
|
||||||
|
9["Segment<br>[1370, 1435, 0]"]
|
||||||
|
10["Segment<br>[1443, 1450, 0]"]
|
||||||
|
16[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path4 [Path]
|
||||||
|
4["Path<br>[1601, 1663, 0]"]
|
||||||
|
11["Segment<br>[1671, 1819, 0]"]
|
||||||
|
12["Segment<br>[1827, 1900, 0]"]
|
||||||
|
13["Segment<br>[1908, 2112, 0]"]
|
||||||
|
14["Segment<br>[2194, 2268, 0]"]
|
||||||
|
15["Segment<br>[2538, 2545, 0]"]
|
||||||
|
17[Solid2d]
|
||||||
|
end
|
||||||
|
1["Plane<br>[1040, 1057, 0]"]
|
||||||
|
2["Plane<br>[1576, 1593, 0]"]
|
||||||
|
18["Sweep Extrusion<br>[2697, 2725, 0]"]
|
||||||
|
19[Wall]
|
||||||
|
20[Wall]
|
||||||
|
21[Wall]
|
||||||
|
22[Wall]
|
||||||
|
23["Cap Start"]
|
||||||
|
24["Cap End"]
|
||||||
|
25["SweepEdge Opposite"]
|
||||||
|
26["SweepEdge Opposite"]
|
||||||
|
27["SweepEdge Opposite"]
|
||||||
|
28["SweepEdge Opposite"]
|
||||||
|
29["SweepEdge Adjacent"]
|
||||||
|
30["SweepEdge Adjacent"]
|
||||||
|
31["SweepEdge Adjacent"]
|
||||||
|
32["SweepEdge Adjacent"]
|
||||||
|
1 --- 3
|
||||||
|
2 --- 4
|
||||||
|
3 --- 5
|
||||||
|
3 --- 6
|
||||||
|
3 --- 7
|
||||||
|
3 --- 8
|
||||||
|
3 --- 9
|
||||||
|
3 --- 10
|
||||||
|
3 --- 16
|
||||||
|
4 --- 11
|
||||||
|
4 --- 12
|
||||||
|
4 --- 13
|
||||||
|
4 --- 14
|
||||||
|
4 --- 15
|
||||||
|
4 --- 17
|
||||||
|
4 ---- 18
|
||||||
|
11 --- 22
|
||||||
|
11 x--> 23
|
||||||
|
11 --- 25
|
||||||
|
11 --- 29
|
||||||
|
12 --- 21
|
||||||
|
12 x--> 23
|
||||||
|
12 --- 26
|
||||||
|
12 --- 30
|
||||||
|
13 --- 20
|
||||||
|
13 x--> 23
|
||||||
|
13 --- 27
|
||||||
|
13 --- 31
|
||||||
|
14 --- 19
|
||||||
|
14 x--> 23
|
||||||
|
14 --- 28
|
||||||
|
14 --- 32
|
||||||
|
18 --- 19
|
||||||
|
18 --- 20
|
||||||
|
18 --- 21
|
||||||
|
18 --- 22
|
||||||
|
18 --- 23
|
||||||
|
18 --- 24
|
||||||
|
18 --- 25
|
||||||
|
18 --- 26
|
||||||
|
18 --- 27
|
||||||
|
18 --- 28
|
||||||
|
18 --- 29
|
||||||
|
18 --- 30
|
||||||
|
18 --- 31
|
||||||
|
18 --- 32
|
||||||
|
28 <--x 19
|
||||||
|
31 <--x 19
|
||||||
|
32 <--x 19
|
||||||
|
27 <--x 20
|
||||||
|
30 <--x 20
|
||||||
|
31 <--x 20
|
||||||
|
26 <--x 21
|
||||||
|
29 <--x 21
|
||||||
|
30 <--x 21
|
||||||
|
25 <--x 22
|
||||||
|
29 <--x 22
|
||||||
|
25 <--x 24
|
||||||
|
26 <--x 24
|
||||||
|
27 <--x 24
|
||||||
|
28 <--x 24
|
||||||
|
```
|
||||||
2922
rust/kcl-lib/tests/kcl_samples/spur-gear/ast.snap
Normal file
309
rust/kcl-lib/tests/kcl_samples/spur-gear/ops.snap
Normal file
@ -0,0 +1,309 @@
|
|||||||
|
---
|
||||||
|
source: kcl-lib/src/simulation_tests.rs
|
||||||
|
description: Operations executed spur-gear.kcl
|
||||||
|
---
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"labeledArgs": {},
|
||||||
|
"name": "startSketchOn",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Plane",
|
||||||
|
"artifact_id": "[uuid]"
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {},
|
||||||
|
"name": "startSketchOn",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Plane",
|
||||||
|
"artifact_id": "[uuid]"
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "polar",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"angle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 0.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 15.282157688846944,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "polar",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"angle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 7.619047619047619,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 17.25,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "polar",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"angle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 17.142857142857142,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 15.282157688846944,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {
|
||||||
|
"tool": {
|
||||||
|
"value": {
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": "subtract2d",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 6.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": "extrude",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "spurGear",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"gearHeight": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 6.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"module": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 1.5,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"nTeeth": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 21.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"pressureAngle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 14.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
}
|
||||||
|
]
|
||||||
10
rust/kcl-lib/tests/kcl_samples/spur-gear/program_memory.snap
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
source: kcl-lib/src/simulation_tests.rs
|
||||||
|
description: Variables in memory after executing spur-gear.kcl
|
||||||
|
---
|
||||||
|
{
|
||||||
|
"spurGear": {
|
||||||
|
"type": "Function",
|
||||||
|
"value": null
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
rust/kcl-lib/tests/kcl_samples/spur-gear/rendered_model.png
Normal file
|
After Width: | Height: | Size: 62 KiB |
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
source: kcl-lib/src/simulation_tests.rs
|
||||||
|
description: Artifact graph flowchart spur-reduction-gearset.kcl
|
||||||
|
extension: md
|
||||||
|
snapshot_kind: binary
|
||||||
|
---
|
||||||
@ -0,0 +1,175 @@
|
|||||||
|
```mermaid
|
||||||
|
flowchart LR
|
||||||
|
subgraph path3 [Path]
|
||||||
|
3["Path<br>[625, 687, 0]"]
|
||||||
|
7["Segment<br>[695, 843, 0]"]
|
||||||
|
9["Segment<br>[851, 924, 0]"]
|
||||||
|
12["Segment<br>[932, 1136, 0]"]
|
||||||
|
14["Segment<br>[1218, 1292, 0]"]
|
||||||
|
15["Segment<br>[1562, 1569, 0]"]
|
||||||
|
19[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path4 [Path]
|
||||||
|
4["Path<br>[625, 687, 0]"]
|
||||||
|
8["Segment<br>[695, 843, 0]"]
|
||||||
|
10["Segment<br>[851, 924, 0]"]
|
||||||
|
11["Segment<br>[932, 1136, 0]"]
|
||||||
|
13["Segment<br>[1218, 1292, 0]"]
|
||||||
|
16["Segment<br>[1562, 1569, 0]"]
|
||||||
|
21[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path5 [Path]
|
||||||
|
5["Path<br>[1653, 1688, 0]"]
|
||||||
|
18["Segment<br>[1653, 1688, 0]"]
|
||||||
|
20[Solid2d]
|
||||||
|
end
|
||||||
|
subgraph path6 [Path]
|
||||||
|
6["Path<br>[1653, 1688, 0]"]
|
||||||
|
17["Segment<br>[1653, 1688, 0]"]
|
||||||
|
22[Solid2d]
|
||||||
|
end
|
||||||
|
1["Plane<br>[600, 617, 0]"]
|
||||||
|
2["Plane<br>[600, 617, 0]"]
|
||||||
|
23["Sweep Extrusion<br>[1745, 1773, 0]"]
|
||||||
|
24["Sweep Extrusion<br>[1745, 1773, 0]"]
|
||||||
|
25[Wall]
|
||||||
|
26[Wall]
|
||||||
|
27[Wall]
|
||||||
|
28[Wall]
|
||||||
|
29[Wall]
|
||||||
|
30[Wall]
|
||||||
|
31[Wall]
|
||||||
|
32[Wall]
|
||||||
|
33["Cap Start"]
|
||||||
|
34["Cap Start"]
|
||||||
|
35["Cap End"]
|
||||||
|
36["Cap End"]
|
||||||
|
37["SweepEdge Opposite"]
|
||||||
|
38["SweepEdge Opposite"]
|
||||||
|
39["SweepEdge Opposite"]
|
||||||
|
40["SweepEdge Opposite"]
|
||||||
|
41["SweepEdge Opposite"]
|
||||||
|
42["SweepEdge Opposite"]
|
||||||
|
43["SweepEdge Opposite"]
|
||||||
|
44["SweepEdge Opposite"]
|
||||||
|
45["SweepEdge Adjacent"]
|
||||||
|
46["SweepEdge Adjacent"]
|
||||||
|
47["SweepEdge Adjacent"]
|
||||||
|
48["SweepEdge Adjacent"]
|
||||||
|
49["SweepEdge Adjacent"]
|
||||||
|
50["SweepEdge Adjacent"]
|
||||||
|
51["SweepEdge Adjacent"]
|
||||||
|
52["SweepEdge Adjacent"]
|
||||||
|
1 --- 3
|
||||||
|
1 --- 5
|
||||||
|
2 --- 4
|
||||||
|
2 --- 6
|
||||||
|
3 --- 7
|
||||||
|
3 --- 9
|
||||||
|
3 --- 12
|
||||||
|
3 --- 14
|
||||||
|
3 --- 15
|
||||||
|
3 --- 19
|
||||||
|
3 ---- 24
|
||||||
|
4 --- 8
|
||||||
|
4 --- 10
|
||||||
|
4 --- 11
|
||||||
|
4 --- 13
|
||||||
|
4 --- 16
|
||||||
|
4 --- 21
|
||||||
|
4 ---- 23
|
||||||
|
5 --- 18
|
||||||
|
5 --- 20
|
||||||
|
6 --- 17
|
||||||
|
6 --- 22
|
||||||
|
7 --- 29
|
||||||
|
7 x--> 33
|
||||||
|
7 --- 42
|
||||||
|
7 --- 49
|
||||||
|
8 --- 28
|
||||||
|
8 x--> 34
|
||||||
|
8 --- 38
|
||||||
|
8 --- 46
|
||||||
|
9 --- 30
|
||||||
|
9 x--> 33
|
||||||
|
9 --- 43
|
||||||
|
9 --- 50
|
||||||
|
10 --- 26
|
||||||
|
10 x--> 34
|
||||||
|
10 --- 40
|
||||||
|
10 --- 45
|
||||||
|
11 --- 25
|
||||||
|
11 x--> 34
|
||||||
|
11 --- 37
|
||||||
|
11 --- 47
|
||||||
|
12 --- 31
|
||||||
|
12 x--> 33
|
||||||
|
12 --- 41
|
||||||
|
12 --- 51
|
||||||
|
13 --- 27
|
||||||
|
13 x--> 34
|
||||||
|
13 --- 39
|
||||||
|
13 --- 48
|
||||||
|
14 --- 32
|
||||||
|
14 x--> 33
|
||||||
|
14 --- 44
|
||||||
|
14 --- 52
|
||||||
|
23 --- 25
|
||||||
|
23 --- 26
|
||||||
|
23 --- 27
|
||||||
|
23 --- 28
|
||||||
|
23 --- 34
|
||||||
|
23 --- 36
|
||||||
|
23 --- 37
|
||||||
|
23 --- 38
|
||||||
|
23 --- 39
|
||||||
|
23 --- 40
|
||||||
|
23 --- 45
|
||||||
|
23 --- 46
|
||||||
|
23 --- 47
|
||||||
|
23 --- 48
|
||||||
|
24 --- 29
|
||||||
|
24 --- 30
|
||||||
|
24 --- 31
|
||||||
|
24 --- 32
|
||||||
|
24 --- 33
|
||||||
|
24 --- 35
|
||||||
|
24 --- 41
|
||||||
|
24 --- 42
|
||||||
|
24 --- 43
|
||||||
|
24 --- 44
|
||||||
|
24 --- 49
|
||||||
|
24 --- 50
|
||||||
|
24 --- 51
|
||||||
|
24 --- 52
|
||||||
|
37 <--x 25
|
||||||
|
45 <--x 25
|
||||||
|
47 <--x 25
|
||||||
|
40 <--x 26
|
||||||
|
45 <--x 26
|
||||||
|
46 <--x 26
|
||||||
|
39 <--x 27
|
||||||
|
47 <--x 27
|
||||||
|
48 <--x 27
|
||||||
|
38 <--x 28
|
||||||
|
46 <--x 28
|
||||||
|
42 <--x 29
|
||||||
|
49 <--x 29
|
||||||
|
43 <--x 30
|
||||||
|
49 <--x 30
|
||||||
|
50 <--x 30
|
||||||
|
41 <--x 31
|
||||||
|
50 <--x 31
|
||||||
|
51 <--x 31
|
||||||
|
44 <--x 32
|
||||||
|
51 <--x 32
|
||||||
|
52 <--x 32
|
||||||
|
41 <--x 35
|
||||||
|
42 <--x 35
|
||||||
|
43 <--x 35
|
||||||
|
44 <--x 35
|
||||||
|
37 <--x 36
|
||||||
|
38 <--x 36
|
||||||
|
39 <--x 36
|
||||||
|
40 <--x 36
|
||||||
|
```
|
||||||
2348
rust/kcl-lib/tests/kcl_samples/spur-reduction-gearset/ast.snap
Normal file
586
rust/kcl-lib/tests/kcl_samples/spur-reduction-gearset/ops.snap
Normal file
@ -0,0 +1,586 @@
|
|||||||
|
---
|
||||||
|
source: kcl-lib/src/simulation_tests.rs
|
||||||
|
description: Operations executed spur-reduction-gearset.kcl
|
||||||
|
---
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"labeledArgs": {},
|
||||||
|
"name": "startSketchOn",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Plane",
|
||||||
|
"artifact_id": "[uuid]"
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {},
|
||||||
|
"name": "startSketchOn",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Plane",
|
||||||
|
"artifact_id": "[uuid]"
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "polar",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"angle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 0.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 12.371270510018954,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "polar",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"angle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 0.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 37.113811530056864,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "polar",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"angle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 9.411764705882353,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 14.25,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "polar",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"angle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 3.1372549019607843,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 39.75,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "polar",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"angle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 21.176470588235293,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 12.371270510018954,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "polar",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"angle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 7.0588235294117645,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 37.113811530056864,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {
|
||||||
|
"tool": {
|
||||||
|
"value": {
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": "subtract2d",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {
|
||||||
|
"tool": {
|
||||||
|
"value": {
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": "subtract2d",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 9.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": "extrude",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 7.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": "extrude",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "spurGear",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"gearHeight": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 9.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"module": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 1.5,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"nTeeth": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 17.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"pressureAngle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 14.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupBegin",
|
||||||
|
"group": {
|
||||||
|
"type": "FunctionCall",
|
||||||
|
"name": "spurGear",
|
||||||
|
"functionSourceRange": [],
|
||||||
|
"unlabeledArg": null,
|
||||||
|
"labeledArgs": {
|
||||||
|
"gearHeight": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 7.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"module": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 1.5,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"nTeeth": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 51.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
"pressureAngle": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 14.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "GroupEnd"
|
||||||
|
}
|
||||||
|
]
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
source: kcl-lib/src/simulation_tests.rs
|
||||||
|
description: Variables in memory after executing spur-reduction-gearset.kcl
|
||||||
|
---
|
||||||
|
{
|
||||||
|
"seg01": {
|
||||||
|
"type": "TagIdentifier",
|
||||||
|
"type": "TagIdentifier",
|
||||||
|
"value": "seg01"
|
||||||
|
},
|
||||||
|
"spurGear": {
|
||||||
|
"type": "Function",
|
||||||
|
"value": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 62 KiB |