Clean KCL Samples and Update Walkie Talkie (#5904)

* Clean KCL Samples and Update Walkie Talkie

* revolve keyword args

* Update kcl-samples simulation test output

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Josh Gomez
2025-03-20 09:22:17 -07:00
committed by GitHub
parent 83ca08b26c
commit c8ec35cd4a
39 changed files with 8508 additions and 41757 deletions

View File

@ -5,8 +5,8 @@
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
// Define constants // Define constants
lbumps = 10 // number of bumps long lbumps = 4 // number of bumps long
wbumps = 5 // number of bumps wide wbumps = 2 // number of bumps wide
pitch = 8.0 pitch = 8.0
clearance = 0.1 clearance = 0.1
bumpDiam = 4.8 bumpDiam = 4.8

View File

@ -1,6 +1,7 @@
// Pipe with bend // Pipe with bend
// A tubular section or hollow cylinder, usually but not necessarily of circular cross-section, used mainly to convey substances that can flow. // A tubular section or hollow cylinder, usually but not necessarily of circular cross-section, used mainly to convey substances that can flow.
// Set units // Set units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
@ -14,22 +15,14 @@ bendAngle = 90
sketch000 = startSketchOn("XZ") sketch000 = startSketchOn("XZ")
// create a profile for the outer diameter // create a profile for the outer diameter
outerProfile = circle( outerProfile = circle(sketch000, center = [bendRadius, 0], radius = outerDiameter / 2)
sketch000,
center = [bendRadius, 0],
radius = outerDiameter / 2
)
// create a profile for the inner diameter // create a profile for the inner diameter
innerProfile = circle( innerProfile = circle(sketch000, center = [bendRadius, 0], radius = innerDiameter / 2)
sketch000,
center = [bendRadius, 0],
radius = innerDiameter / 2
)
// create the profile of the pipe // create the profile of the pipe
pipeProfile = outerProfile pipeProfile = outerProfile
|> hole(innerProfile, %) |> hole(innerProfile, %)
// revolve the pipe profile at the desired angle // revolve the pipe profile at the desired angle
pipe = revolve(pipeProfile, axis = "Y", angle = bendAngle) pipe = revolve(pipeProfile, axis = 'Y', angle = bendAngle)

View File

@ -1,9 +1,11 @@
// Poopy Shoe // Poopy Shoe
// poop shute for bambu labs printer - optimized for printing. // poop shute for bambu labs printer - optimized for printing.
// Set units // Set units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
wallThickness = 0.125 wallThickness = 0.125
wallsWidth = 3 wallsWidth = 3
height = 5.125 height = 5.125
@ -30,8 +32,7 @@ sketch001 = startSketchOn("-YZ")
|> yLine(endAbsolute = segEndY(seg01)) |> yLine(endAbsolute = segEndY(seg01))
|> angledLineToY({ angle = 180 - 60, to = 0 }, %) |> angledLineToY({ angle = 180 - 60, to = 0 }, %)
|> close() |> close()
part001 = revolve( part001 = revolve(sketch001,
sketch001,
angle = 90, angle = 90,
axis = { axis = {
custom = { custom = {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View File

@ -1,68 +1,64 @@
// Socket Head Cap Screw // Socket Head Cap Screw
// This is for a #10-24 screw that is 1.00 inches long. A socket head cap screw is a type of fastener that is widely used in a variety of applications requiring a high strength fastening solution. It is characterized by its cylindrical head and internal hexagonal drive, which allows for tightening with an Allen wrench or hex key. // This is for a #10-24 screw that is 1.00 inches long. A socket head cap screw is a type of fastener that is widely used in a variety of applications requiring a high strength fastening solution. It is characterized by its cylindrical head and internal hexagonal drive, which allows for tightening with an Allen wrench or hex key.
// Set units // set units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in, defaultAngleUnit = deg)
// Define constants export boltDiameter = 0.190
screwLength = 1.0 export boltLength = 1.00
screwDiameter = .190 export boltHeadLength = boltDiameter
headDiameter = .313 export boltHeadDiameter = 0.313
headLength = screwDiameter export boltHexDrive = 5/32
hexWallToWall = 5 / 32 export boltHexFlatLength = boltHexDrive / (2 * cos(toRadians(30)))
capRatio = screwDiameter / headDiameter
hexRatio = hexWallToWall / headDiameter
hexWallLength = hexWallToWall / 2 * 1 / cos(toRadians(30))
hexStartingAngle = 210 // first angle of hex pattern
hexInteriorAngle = 120
hexChangeAngle = 180 - hexInteriorAngle
// Write a function that defines the Socket Head Cap Screw export fn bolt () {
fn capScrew(start, length, dia, capHeadLength) {
// Create the head of the cap screw // Create the head of the cap screw
screwHeadSketch = startSketchOn('XZ') boltHead = startSketchOn('XZ')
|> circle( |> circle(
center = [start[0], start[1]], center = [0, 0],
radius = dia / capRatio / 2 radius = boltHeadDiameter / 2,
tag = $topEdge
) )
|> extrude(length = -boltHeadLength)
// Extrude the screw head sketch |> fillet(radius = 0.020, tags = [topEdge, getOppositeEdge(topEdge)])
screwHead = extrude(screwHeadSketch, length = capHeadLength)
// Define the sketch of the hex pattern on the screw head // Define the sketch of the hex pattern on the screw head
hexPatternSketch = startSketchOn(screwHead, 'end') hexPatternSketch = startSketchOn(boltHead, 'start')
|> startProfileAt([hexWallToWall / 2, 0], %) |> startProfileAt([
|> yLine(length = -hexWallLength / 2) boltHexDrive / 2,
boltHexFlatLength / 2
], %)
|> angledLine({ |> angledLine({
angle = hexStartingAngle, angle = 270,
length = hexWallLength length = boltHexFlatLength
}, %) }, %)
|> angledLine({ |> angledLine({
angle = hexStartingAngle - hexChangeAngle, angle = 210,
length = hexWallLength length = boltHexFlatLength
}, %) }, %)
|> angledLine({ |> angledLine({
angle = hexStartingAngle - (2 * hexChangeAngle), angle = 150,
length = hexWallLength length = boltHexFlatLength
}, %) }, %)
|> angledLine({ |> angledLine({
angle = hexStartingAngle - (3 * hexChangeAngle), angle = 90,
length = hexWallLength length = boltHexFlatLength
}, %) }, %)
|> angledLine({ |> angledLine({
angle = hexStartingAngle - (4 * hexChangeAngle), angle = 30,
length = hexWallLength length = boltHexFlatLength
}, %) }, %)
|> close() |> close()
hexPattern = extrude(hexPatternSketch, length = -headLength * 0.75) |> extrude(length = -boltHeadLength * 0.75)
boltBody = startSketchOn(boltHead, 'end')
|> circle(center = [0, 0], radius = boltDiameter / 2, tag = $filletEdge)
|> extrude(length = boltLength)
|> fillet(radius = .020, tags = [getOppositeEdge(filletEdge)])
|> appearance(color = "#4dd043", metalness = 90, roughness = 90)
screwBodySketch = startSketchOn(screwHead, "start") return boltBody
|> circle(
center = [start[0], start[1]],
radius = dia / 2
)
screwBody = extrude(screwBodySketch, length = length)
return screwBody
} }
capScrew([0, 0], screwLength, screwDiameter, screwDiameter) bolt()

View File

@ -1,50 +1,37 @@
// Antenna // Antenna
// import constants
import antennaLength, antennaBaseWidth, antennaBaseHeight, antennaTopWidth, antennaTopHeight from "globals.kcl"
// Set units // Set units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
export fn antenna () {
// import constants // Create the antenna base sketch
import height, width, antennaBaseWidth, antennaBaseHeight, antennaTopWidth, antennaTopHeight from "globals.kcl" sketch001 = startSketchOn('XY')
|> startProfileAt([0, 0], %)
// Calculate the origin |> line(end = [antennaBaseWidth, 0])
origin = [-width / 2 + .45, -0.10] |> line(end = [0, -antennaBaseHeight])
|> line(end = [-antennaBaseWidth, 0])
// Create the antenna |> close()
antennaX = origin[0]
antennaY = origin[1] // Create the antenna top sketch
loftPlane = offsetPlane('XY', offset = antennaLength)
antennaPlane = {
plane = { sketch002 = startSketchOn(loftPlane)
origin = { x = 0, y = 0, z = height / 2 }, |> startProfileAt([
xAxis = { x = 1, y = 0, z = 0 }, (antennaBaseWidth - antennaTopWidth) / 2,
yAxis = { x = 0, y = 1, z = 0 }, (antennaBaseHeight - antennaTopHeight) / 2
zAxis = { x = 0, y = 0, z = 1 } ], %)
} |> xLine(length = antennaTopWidth)
|> yLine(length = -antennaTopHeight)
|> xLine(length = -antennaTopWidth)
|> close()
// Create the antenna using a loft
antenna = loft([sketch001, sketch002])
|> appearance(color = "#000000")
return antenna
} }
// Create the antenna base sketch
sketch001 = startSketchOn(antennaPlane)
|> startProfileAt([origin[0], origin[1]], %)
|> line(end = [antennaBaseWidth, 0])
|> line(end = [0, -antennaBaseHeight])
|> line(end = [-antennaBaseWidth, 0])
|> close()
// Create the antenna top sketch
loftPlane = offsetPlane('XY', offset = height / 2 + 2)
sketch002 = startSketchOn(loftPlane)
|> startProfileAt([
origin[0] + (antennaBaseWidth - antennaTopWidth) / 2,
origin[1] - ((antennaBaseHeight - antennaTopHeight) / 2)
], %)
|> xLine(length = antennaTopWidth)
|> yLine(length = -antennaTopHeight)
|> xLine(length = -antennaTopWidth)
|> close()
// Create the antenna using a loft
loft([sketch001, sketch002])
|> appearance(color = "#000000")

View File

@ -1,80 +1,86 @@
// Walkie talkie body // Walkie talkie body
// import constants
// Set units
@settings(defaultLengthUnit = in)
// Import constants
import height, width, thickness, chamferLength, offset, screenWidth, screenHeight, screenYPosition, screenDepth, speakerBoxWidth, speakerBoxHeight from "globals.kcl" import height, width, thickness, chamferLength, offset, screenWidth, screenHeight, screenYPosition, screenDepth, speakerBoxWidth, speakerBoxHeight from "globals.kcl"
bodySketch = startSketchOn('XZ') // set units
|> startProfileAt([-width / 2, height / 2], %) @settings(defaultLengthUnit = in)
|> xLine(length = width, tag = $chamfer1)
|> yLine(length = -height, tag = $chamfer2)
|> xLine(length = -width, tag = $chamfer3)
|> close(tag = $chamfer4)
bodyExtrude = extrude(bodySketch, length = thickness)
|> chamfer(
length = chamferLength,
tags = [
getNextAdjacentEdge(chamfer1),
getNextAdjacentEdge(chamfer2),
getNextAdjacentEdge(chamfer3),
getNextAdjacentEdge(chamfer4)
]
)
// Define the offset for the indentation // create a function to define the body
sketch002 = startSketchOn(bodyExtrude, 'END') export fn body () {
|> startProfileAt([
-width / 2 + offset,
height / 2 - (chamferLength + offset / 2 * cos(toRadians(45)))
], %)
|> angledLineToY({ angle = 45, to = height / 2 - offset }, %)
|> line(endAbsolute = [
width / 2 - (chamferLength + offset / 2 * cos(toRadians(45))),
height / 2 - offset
])
|> angledLineToX({ angle = -45, to = width / 2 - offset }, %)
|> line(endAbsolute = [
width / 2 - offset,
-(height / 2 - (chamferLength + offset / 2 * cos(toRadians(45))))
])
|> angledLineToY({
angle = -135,
to = -height / 2 + offset
}, %)
|> line(endAbsolute = [
-(width / 2 - (chamferLength + offset / 2 * cos(toRadians(45)))),
-height / 2 + offset
])
|> angledLineToX({
angle = -225,
to = -width / 2 + offset
}, %)
|> close()
extrude002 = extrude(sketch002, length = -0.0625)
// Create the pocket for the screen // sketch and extrude the body of the walkie talkie
sketch003 = startSketchOn(extrude002, 'start') bodySketch = startSketchOn('XZ')
|> startProfileAt([-screenWidth / 2, screenYPosition], %) |> startProfileAt([-width / 2, height / 2], %)
|> xLine(length = screenWidth, tag = $seg01) |> xLine(length = width, tag = $chamfer1)
|> yLine(length = -screenHeight) |> yLine(length = -height, tag = $chamfer2)
|> xLine(length = -segLen(seg01)) |> xLine(length = -width, tag = $chamfer3)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close(tag = $chamfer4)
|> close() bodyExtrude = extrude(bodySketch, length = thickness)
extrude003 = extrude(sketch003, length = screenDepth) |> chamfer(
length = chamferLength,
tags = [
getNextAdjacentEdge(chamfer1),
getNextAdjacentEdge(chamfer2),
getNextAdjacentEdge(chamfer3),
getNextAdjacentEdge(chamfer4)
]
)
// Create the speaker box // cut out the indentation for the case
sketch004 = startSketchOn(extrude002, 'start') sketch002 = startSketchOn(bodyExtrude, 'END')
|> startProfileAt([-1.25 / 2, -.125], %) |> startProfileAt([
|> xLine(length = speakerBoxWidth) -width / 2 + offset,
|> yLine(length = -speakerBoxHeight) height / 2 - (chamferLength + offset / 2 * cos(toRadians(45)))
|> xLine(length = -speakerBoxWidth) ], %)
|> close() |> angledLineToY({ angle = 45, to = height / 2 - offset }, %)
extrude(sketch004, length = -.5) |> line(endAbsolute = [
|> appearance( width / 2 - (chamferLength + offset / 2 * cos(toRadians(45))),
color = "#277bb0", height / 2 - offset
) ])
|> angledLineToX({ angle = -45, to = width / 2 - offset }, %)
|> line(endAbsolute = [
width / 2 - offset,
-(height / 2 - (chamferLength + offset / 2 * cos(toRadians(45))))
])
|> angledLineToY({
angle = -135,
to = -height / 2 + offset
}, %)
|> line(endAbsolute = [
-(width / 2 - (chamferLength + offset / 2 * cos(toRadians(45)))),
-height / 2 + offset
])
|> angledLineToX({
angle = -225,
to = -width / 2 + offset
}, %)
|> close()
extrude002 = extrude(sketch002, length = -0.0625)
// Create the pocket for the screen
sketch003 = startSketchOn(extrude002, 'start')
|> startProfileAt([-screenWidth / 2, screenYPosition], %)
|> xLine(length = screenWidth, tag = $seg01)
|> yLine(length = -screenHeight)
|> xLine(length = -segLen(seg01))
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
extrude003 = extrude(sketch003, length = screenDepth)
// Create the speaker box
sketch004 = startSketchOn(extrude002, 'start')
|> startProfileAt([-1.25 / 2, -.125], %)
|> xLine(length = speakerBoxWidth)
|> yLine(length = -speakerBoxHeight)
|> xLine(length = -speakerBoxWidth)
|> close()
body = extrude(sketch004, length = -.5)
|> appearance(
color = "#277bb0",
)
return body
}
body()

View File

@ -1,26 +1,27 @@
// Walkie Talkie button // Walkie Talkie button
// Set units // set units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
// Import constants // import constants
import screenHeight, buttonWidth, tolerance, buttonHeight, buttonThickness from 'globals.kcl' import buttonWidth, buttonHeight, buttonThickness from 'globals.kcl'
// create a function to define the button
export fn button() {
// Create a function for the button // sketch the button profile and extrude
export fn button(origin, rotation, plane) { buttonSketch = startSketchOn('XZ')
buttonSketch = startSketchOn(plane) |> startProfileAt([0, 0], %)
|> startProfileAt([origin[0], origin[1]], %)
|> angledLine({ |> angledLine({
angle = 180 + rotation, angle = 180,
length = buttonWidth length = buttonWidth
}, %, $tag1) }, %, $tag1)
|> angledLine({ |> angledLine({
angle = 270 + rotation, angle = 270,
length = buttonHeight length = buttonHeight
}, %, $tag2) }, %, $tag2)
|> angledLine({ |> angledLine({
angle = 0 + rotation, angle = 0,
length = buttonWidth length = buttonWidth
}, %) }, %)
|> close() |> close()
@ -35,4 +36,4 @@ export fn button(origin, rotation, plane) {
|> appearance(color = "#ff0000") |> appearance(color = "#ff0000")
return buttonExtrude return buttonExtrude
} }

View File

@ -1,85 +1,90 @@
// Walkie talkie case // Walkie talkie case
// Set units // import constants and Zoo logo
@settings(defaultLengthUnit = in)
// Import constants and Zoo logo
import width, height, chamferLength, offset, screenWidth, screenHeight, screenYPosition, screenDepth, speakerBoxWidth, speakerBoxHeight, squareHoleSideLength, caseTolerance from "globals.kcl" import width, height, chamferLength, offset, screenWidth, screenHeight, screenYPosition, screenDepth, speakerBoxWidth, speakerBoxHeight, squareHoleSideLength, caseTolerance from "globals.kcl"
import zLogo, oLogo, oLogo2 from "zoo-logo.kcl" import zLogo, oLogo, oLogo2 from "zoo-logo.kcl"
plane = offsetPlane("XZ", offset = 1) // set units
@settings(defaultLengthUnit = in)
fn screenHole(sketchStart) { // create a function to define the case
sketch006 = startSketchOn(sketchStart) export fn case () {
// sketch the profile of the screen
sketch006 = startSketchOn(startSketchOn('XZ'))
|> startProfileAt([-screenWidth / 2, screenYPosition], %) |> startProfileAt([-screenWidth / 2, screenYPosition], %)
|> xLine(length = screenWidth) |> xLine(length = screenWidth)
|> yLine(length = -screenHeight) |> yLine(length = -screenHeight)
|> xLine(length = -screenWidth) |> xLine(length = -screenWidth)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close() |> close()
return sketch006
} // create transform functions for the speaker grid pattern
fn squareHolePattern(plane, x, y) {
fn transformX(i) { fn transformX(i) {
return { translate = [.125 * i, 0] } return { translate = [.125 * i, 0] }
} }
fn transformY(i) { fn transformY(i) {
return { translate = [0, -.125 * i] } return { translate = [0, -.125 * i] }
} }
squareHolePatternSketch = startSketchOn(plane)
|> startProfileAt([-x, -y], %) // sketch the square hole grid pattern
squareHolePatternSketch = startSketchOn(startSketchOn('XZ'))
|> startProfileAt([-screenWidth / 2 + .100, 0], %)
|> line(end = [squareHoleSideLength / 2, 0]) |> line(end = [squareHoleSideLength / 2, 0])
|> line(end = [0, -squareHoleSideLength / 2]) |> line(end = [0, -squareHoleSideLength / 2])
|> line(end = [-squareHoleSideLength / 2, 0]) |> line(end = [-squareHoleSideLength / 2, 0])
|> close() |> close()
|> patternTransform2d(instances = 13, transform = transformX) |> patternTransform2d(instances = 13, transform = transformX)
|> patternTransform2d(instances = 11, transform = transformY) |> patternTransform2d(instances = 11, transform = transformY)
return squareHolePatternSketch
}
sketch005 = startSketchOn(offsetPlane("XZ", offset = 1))
|> startProfileAt([
-width / 2 + offset + caseTolerance,
height / 2 - (chamferLength + (offset + caseTolerance) / 2 * cos(toRadians(45)))
], %)
|> angledLineToY({
angle = 45,
to = height / 2 - (offset + caseTolerance)
}, %)
|> line(endAbsolute = [
width / 2 - (chamferLength + (offset + caseTolerance) / 2 * cos(toRadians(45))),
height / 2 - (offset + caseTolerance)
])
|> angledLineToX({
angle = -45,
to = width / 2 - (offset + caseTolerance)
}, %)
|> line(endAbsolute = [
width / 2 - (offset + caseTolerance),
-(height / 2 - (chamferLength + (offset + caseTolerance) / 2 * cos(toRadians(45))))
])
|> angledLineToY({
angle = -135,
to = -height / 2 + offset + caseTolerance
}, %)
|> line(endAbsolute = [
-(width / 2 - (chamferLength + (offset + caseTolerance) / 2 * cos(toRadians(45)))),
-height / 2 + offset + caseTolerance
])
|> angledLineToX({
angle = -225,
to = -width / 2 + offset + caseTolerance
}, %)
|> close()
|> hole(screenHole(plane), %)
|> hole(squareHolePattern(plane, .75, .125), %)
|> hole(zLogo(plane, [-.30, -1.825], .20), %)
|> hole(oLogo(plane, [-.075, -1.825], .20), %)
|> hole(oLogo2(plane, [-.075, -1.825], .20), %)
|> hole(oLogo(plane, [.175, -1.825], .20), %)
|> hole(oLogo2(plane, [.175, -1.825], .20), %)
extrude(sketch005, length = -0.0625) // sketch the outer profile of the case and extrude with holes using the previously made profiles
|> appearance(color = '#D0FF01', metalness = 0, roughness = 50) sketch005 = startSketchOn(startSketchOn('XZ'))
|> startProfileAt([
-width / 2 + offset + caseTolerance,
height / 2 - (chamferLength + (offset + caseTolerance) / 2 * cos(toRadians(45)))
], %)
|> angledLineToY({
angle = 45,
to = height / 2 - (offset + caseTolerance)
}, %)
|> line(endAbsolute = [
width / 2 - (chamferLength + (offset + caseTolerance) / 2 * cos(toRadians(45))),
height / 2 - (offset + caseTolerance)
])
|> angledLineToX({
angle = -45,
to = width / 2 - (offset + caseTolerance)
}, %)
|> line(endAbsolute = [
width / 2 - (offset + caseTolerance),
-(height / 2 - (chamferLength + (offset + caseTolerance) / 2 * cos(toRadians(45))))
])
|> angledLineToY({
angle = -135,
to = -height / 2 + offset + caseTolerance
}, %)
|> line(endAbsolute = [
-(width / 2 - (chamferLength + (offset + caseTolerance) / 2 * cos(toRadians(45)))),
-height / 2 + offset + caseTolerance
])
|> angledLineToX({
angle = -225,
to = -width / 2 + offset + caseTolerance
}, %)
|> close()
|> hole(sketch006, %)
|> hole(squareHolePatternSketch, %)
// create the Zoo logo
|> hole(zLogo(startSketchOn('XZ'), [-.30, -1.825], .20), %)
|> hole(oLogo(startSketchOn('XZ'), [-.075, -1.825], .20), %)
|> hole(oLogo2(startSketchOn('XZ'), [-.075, -1.825], .20), %)
|> hole(oLogo(startSketchOn('XZ'), [.175, -1.825], .20), %)
|> hole(oLogo2(startSketchOn('XZ'), [.175, -1.825], .20), %)
case = extrude(sketch005, length = -0.0625)
|> appearance(color = '#D0FF01', metalness = 0, roughness = 50)
return case
}

View File

@ -21,6 +21,7 @@ export antennaBaseWidth = .5
export antennaBaseHeight = .25 export antennaBaseHeight = .25
export antennaTopWidth = .30 export antennaTopWidth = .30
export antennaTopHeight = .05 export antennaTopHeight = .05
export antennaLength = 3
// button // button
export buttonWidth = .15 export buttonWidth = .15

View File

@ -1,29 +1,16 @@
// Walkie talkie knob // Walkie Talkie Frequency Knob
// import constants
// Set units
@settings(defaultLengthUnit = in)
// Import constants
import width, thickness, height, knobDiameter, knobHeight, knobRadius from "globals.kcl" import width, thickness, height, knobDiameter, knobHeight, knobRadius from "globals.kcl"
// Define the plane for the knob // set units
knobPlane = { @settings(defaultLengthUnit = in)
plane = {
origin = { // create a function to define the knob
x = width / 2 - 0.70, export fn knob () {
y = -thickness / 2,
z = height / 2
},
xAxis = { x = 1, y = 0, z = 0 },
yAxis = { x = 0, y = 0, z = 1 },
zAxis = { x = 0, y = 1, z = 0 }
}
}
// Create the knob sketch and revolve // Create the knob sketch and revolve
startSketchOn(knobPlane) knob = startSketchOn('XZ')
|> startProfileAt([0.0001, 0], %) |> startProfileAt([0.0001, 0], %)
|> xLine(length = knobDiameter / 2) |> xLine(length = knobDiameter / 2)
|> yLine(length = knobHeight - 0.05) |> yLine(length = knobHeight - 0.05)
@ -34,5 +21,11 @@ startSketchOn(knobPlane)
}, %) }, %)
|> xLine(endAbsolute = 0.0001) |> xLine(endAbsolute = 0.0001)
|> close() |> close()
|> revolve(axis = "Y") |> revolve(
axis = "Y",
)
|> appearance(color = '#D0FF01', metalness = 90, roughness = 50) |> appearance(color = '#D0FF01', metalness = 90, roughness = 50)
return knob
}

View File

@ -1,50 +1,47 @@
// Walkie Talkie // Walkie Talkie
// A portable, handheld two-way radio device that allows users to communicate wirelessly over short to medium distances. It operates on specific radio frequencies and features a push-to-talk button for transmitting messages, making it ideal for quick and reliable communication in outdoor, work, or emergency settings. // A portable, handheld two-way radio device that allows users to communicate wirelessly over short to medium distances. It operates on specific radio frequencies and features a push-to-talk button for transmitting messages, making it ideal for quick and reliable communication in outdoor, work, or emergency settings.
// Set units // set units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
// Import parts and constants // import constants
import 'body.kcl' import * from 'globals.kcl'
import 'antenna.kcl'
import 'case.kcl' // import parts and constants
import 'talk-button.kcl' as talkButton import body from 'body.kcl'
import 'knob.kcl' import case from 'case.kcl'
import antenna from 'antenna.kcl'
import talkButton from 'talk-button.kcl'
import knob from 'knob.kcl'
import button from "button.kcl" import button from "button.kcl"
import width, height, thickness, screenWidth, screenHeight, screenYPosition, tolerance from "globals.kcl"
// Import the body // import the body
body body()
// Import the case // import the antenna
case antenna()
|> translate(translate = [-width / 2 + .45, -0.10, height/2])
// Import the antenna // import the case
antenna case()
|> translate(translate = [0, -1, 0])
// Import the buttons // import the talk button
button([ talkButton()
-(screenWidth / 2 + tolerance), |> translate(translate = [width / 2, -thickness / 2, .5])
screenYPosition
], 0, offsetPlane("XZ", offset = thickness))
button([
-(screenWidth / 2 + tolerance),
screenYPosition - (screenHeight / 2)
], 0, offsetPlane("XZ", offset = thickness))
button([
screenWidth / 2 + tolerance,
screenYPosition - screenHeight
], 180, offsetPlane("XZ", offset = thickness))
button([
screenWidth / 2 + tolerance,
screenYPosition - (screenHeight / 2)
], 180, offsetPlane("XZ", offset = thickness))
// Import the talk button
talkButton
// Import the frequency knob
knob
// import the frequency knob
knob()
|> translate(translate = [width / 2 - 0.70, -thickness / 2, height / 2])
// import the buttons
button()
|> translate(translate = [-(screenWidth / 2 + tolerance), -1, screenYPosition])
button()
|> translate(translate = [-(screenWidth / 2 + tolerance), -1, screenYPosition - buttonHeight - tolerance*2])
button()
|> rotate(%, roll = 0, pitch = 180, yaw = 0)
|> translate(translate = [screenWidth / 2 + tolerance, -1, screenYPosition - buttonHeight], global = true)
button()
|> rotate(%, roll = 0, pitch = 180, yaw = 0)
|> translate(translate = [screenWidth / 2 + tolerance, -1, screenYPosition - buttonHeight*2 - tolerance * 2], global = true)

View File

@ -1,46 +1,37 @@
// Walkie talkie talk button // Walkie talkie talk button
// Set units // set units
@settings(defaultLengthUnit = in) @settings(defaultLengthUnit = in)
// import constants
// Import constants
import width, thickness, talkButtonSideLength, talkButtonHeight from "globals.kcl" import width, thickness, talkButtonSideLength, talkButtonHeight from "globals.kcl"
talkButtonPlane = { export fn talkButton() {
plane = {
origin = { // create the talk button sketch
x = width / 2, talkButtonSketch = startSketchOn('YZ')
y = -thickness / 2, |> startProfileAt([
z = .5 -talkButtonSideLength / 2,
}, talkButtonSideLength / 2
xAxis = { x = 0, y = 1, z = 0 }, ], %)
yAxis = { x = 0, y = 0, z = 1 }, |> xLine(length = talkButtonSideLength, tag = $tag1)
zAxis = { x = 1, y = 0, z = 0 } |> yLine(length = -talkButtonSideLength, tag = $tag2)
} |> xLine(length = -talkButtonSideLength, tag = $tag3)
|> close(tag = $tag4)
// create the talk button and apply fillets
talkButton = extrude(talkButtonSketch, length = talkButtonHeight)
|> fillet(
radius = 0.050,
tags = [
getNextAdjacentEdge(tag1),
getNextAdjacentEdge(tag2),
getNextAdjacentEdge(tag3),
getNextAdjacentEdge(tag4)
]
)
|> appearance(color = '#D0FF01', metalness = 90, roughness = 90)
return talkButton
} }
// Create the talk button sketch
talkButtonSketch = startSketchOn(talkButtonPlane)
|> startProfileAt([
-talkButtonSideLength / 2,
talkButtonSideLength / 2
], %)
|> xLine(length = talkButtonSideLength, tag = $tag1)
|> yLine(length = -talkButtonSideLength, tag = $tag2)
|> xLine(length = -talkButtonSideLength, tag = $tag3)
|> close(tag = $tag4)
// Create the talk button and apply fillets
extrude(talkButtonSketch, length = talkButtonHeight)
|> fillet(
radius = 0.050,
tags = [
getNextAdjacentEdge(tag1),
getNextAdjacentEdge(tag2),
getNextAdjacentEdge(tag3),
getNextAdjacentEdge(tag4)
]
)
|> appearance(color = '#D0FF01', metalness = 90, roughness = 90)

View File

@ -1,6 +1,6 @@
// Zoo logo // Zoo logo
// Define a function to draw the ZOO "Z" // define a function to draw the ZOO "Z"
export fn zLogo(surface, origin, scale) { export fn zLogo(surface, origin, scale) {
zSketch = surface zSketch = surface
|> startProfileAt([ |> startProfileAt([
@ -39,7 +39,7 @@ export fn zLogo(surface, origin, scale) {
return zSketch return zSketch
} }
// Define a function to draw the ZOO "O" // define a function to draw the ZOO "O"
export fn oLogo(surface, origin, scale) { export fn oLogo(surface, origin, scale) {
oSketch001 = surface oSketch001 = surface
|> startProfileAt([ |> startProfileAt([

File diff suppressed because it is too large Load Diff

View File

@ -1,33 +1,33 @@
```mermaid ```mermaid
flowchart LR flowchart LR
subgraph path2 [Path] subgraph path2 [Path]
2["Path<br>[995, 1049, 0]"] 2["Path<br>[994, 1048, 0]"]
3["Segment<br>[1055, 1082, 0]"] 3["Segment<br>[1054, 1081, 0]"]
4["Segment<br>[1088, 1116, 0]"] 4["Segment<br>[1087, 1115, 0]"]
5["Segment<br>[1122, 1150, 0]"] 5["Segment<br>[1121, 1149, 0]"]
6["Segment<br>[1156, 1163, 0]"] 6["Segment<br>[1155, 1162, 0]"]
7[Solid2d] 7[Solid2d]
end end
subgraph path23 [Path] subgraph path23 [Path]
23["Path<br>[1405, 1492, 0]"] 23["Path<br>[1404, 1491, 0]"]
24["Segment<br>[1498, 1535, 0]"] 24["Segment<br>[1497, 1534, 0]"]
25["Segment<br>[1541, 1579, 0]"] 25["Segment<br>[1540, 1578, 0]"]
26["Segment<br>[1585, 1625, 0]"] 26["Segment<br>[1584, 1624, 0]"]
27["Segment<br>[1631, 1638, 0]"] 27["Segment<br>[1630, 1637, 0]"]
28[Solid2d] 28[Solid2d]
end end
subgraph path43 [Path] subgraph path43 [Path]
43["Path<br>[1757, 1903, 0]"] 43["Path<br>[1756, 1902, 0]"]
44["Segment<br>[1757, 1903, 0]"] 44["Segment<br>[1756, 1902, 0]"]
45[Solid2d] 45[Solid2d]
end end
subgraph path100 [Path] subgraph path58 [Path]
100["Path<br>[2244, 2418, 0]"] 58["Path<br>[2243, 2417, 0]"]
101["Segment<br>[2244, 2418, 0]"] 59["Segment<br>[2243, 2417, 0]"]
102[Solid2d] 60[Solid2d]
end end
1["Plane<br>[970, 989, 0]"] 1["Plane<br>[969, 988, 0]"]
8["Sweep Extrusion<br>[1169, 1193, 0]"] 8["Sweep Extrusion<br>[1168, 1192, 0]"]
9[Wall] 9[Wall]
10[Wall] 10[Wall]
11[Wall] 11[Wall]
@ -42,7 +42,7 @@ flowchart LR
20["SweepEdge Adjacent"] 20["SweepEdge Adjacent"]
21["SweepEdge Opposite"] 21["SweepEdge Opposite"]
22["SweepEdge Adjacent"] 22["SweepEdge Adjacent"]
29["Sweep Extrusion<br>[1644, 1675, 0]"] 29["Sweep Extrusion<br>[1643, 1674, 0]"]
30[Wall] 30[Wall]
31[Wall] 31[Wall]
32[Wall] 32[Wall]
@ -56,103 +56,28 @@ flowchart LR
40["SweepEdge Adjacent"] 40["SweepEdge Adjacent"]
41["SweepEdge Opposite"] 41["SweepEdge Opposite"]
42["SweepEdge Adjacent"] 42["SweepEdge Adjacent"]
46["Sweep Extrusion<br>[2113, 2141, 0]"] 46["Sweep Extrusion<br>[2112, 2140, 0]"]
47[Wall] 47[Wall]
48["Cap End"] 48["Cap End"]
49["SweepEdge Opposite"] 49["SweepEdge Opposite"]
50["SweepEdge Adjacent"] 50["SweepEdge Adjacent"]
51["Sweep Extrusion<br>[2113, 2141, 0]"] 51["Sweep Extrusion<br>[2112, 2140, 0]"]
52["Sweep Extrusion<br>[2113, 2141, 0]"] 52["Sweep Extrusion<br>[2112, 2140, 0]"]
53["Sweep Extrusion<br>[2113, 2141, 0]"] 53["Sweep Extrusion<br>[2112, 2140, 0]"]
54["Sweep Extrusion<br>[2113, 2141, 0]"] 54["Sweep Extrusion<br>[2112, 2140, 0]"]
55["Sweep Extrusion<br>[2113, 2141, 0]"] 55["Sweep Extrusion<br>[2112, 2140, 0]"]
56["Sweep Extrusion<br>[2113, 2141, 0]"] 56["Sweep Extrusion<br>[2112, 2140, 0]"]
57["Sweep Extrusion<br>[2113, 2141, 0]"] 57["Sweep Extrusion<br>[2112, 2140, 0]"]
58["Sweep Extrusion<br>[2113, 2141, 0]"] 61["Sweep Extrusion<br>[2635, 2663, 0]"]
59["Sweep Extrusion<br>[2113, 2141, 0]"] 62[Wall]
60["Sweep Extrusion<br>[2113, 2141, 0]"] 63["Cap End"]
61["Sweep Extrusion<br>[2113, 2141, 0]"] 64["SweepEdge Opposite"]
62["Sweep Extrusion<br>[2113, 2141, 0]"] 65["SweepEdge Adjacent"]
63["Sweep Extrusion<br>[2113, 2141, 0]"] 66["Sweep Extrusion<br>[2635, 2663, 0]"]
64["Sweep Extrusion<br>[2113, 2141, 0]"] 67["Sweep Extrusion<br>[2635, 2663, 0]"]
65["Sweep Extrusion<br>[2113, 2141, 0]"] 68["StartSketchOnFace<br>[1370, 1398, 0]"]
66["Sweep Extrusion<br>[2113, 2141, 0]"] 69["StartSketchOnFace<br>[1724, 1750, 0]"]
67["Sweep Extrusion<br>[2113, 2141, 0]"] 70["StartSketchOnFace<br>[2201, 2237, 0]"]
68["Sweep Extrusion<br>[2113, 2141, 0]"]
69["Sweep Extrusion<br>[2113, 2141, 0]"]
70["Sweep Extrusion<br>[2113, 2141, 0]"]
71["Sweep Extrusion<br>[2113, 2141, 0]"]
72["Sweep Extrusion<br>[2113, 2141, 0]"]
73["Sweep Extrusion<br>[2113, 2141, 0]"]
74["Sweep Extrusion<br>[2113, 2141, 0]"]
75["Sweep Extrusion<br>[2113, 2141, 0]"]
76["Sweep Extrusion<br>[2113, 2141, 0]"]
77["Sweep Extrusion<br>[2113, 2141, 0]"]
78["Sweep Extrusion<br>[2113, 2141, 0]"]
79["Sweep Extrusion<br>[2113, 2141, 0]"]
80["Sweep Extrusion<br>[2113, 2141, 0]"]
81["Sweep Extrusion<br>[2113, 2141, 0]"]
82["Sweep Extrusion<br>[2113, 2141, 0]"]
83["Sweep Extrusion<br>[2113, 2141, 0]"]
84["Sweep Extrusion<br>[2113, 2141, 0]"]
85["Sweep Extrusion<br>[2113, 2141, 0]"]
86["Sweep Extrusion<br>[2113, 2141, 0]"]
87["Sweep Extrusion<br>[2113, 2141, 0]"]
88["Sweep Extrusion<br>[2113, 2141, 0]"]
89["Sweep Extrusion<br>[2113, 2141, 0]"]
90["Sweep Extrusion<br>[2113, 2141, 0]"]
91["Sweep Extrusion<br>[2113, 2141, 0]"]
92["Sweep Extrusion<br>[2113, 2141, 0]"]
93["Sweep Extrusion<br>[2113, 2141, 0]"]
94["Sweep Extrusion<br>[2113, 2141, 0]"]
95["Sweep Extrusion<br>[2113, 2141, 0]"]
96["Sweep Extrusion<br>[2113, 2141, 0]"]
97["Sweep Extrusion<br>[2113, 2141, 0]"]
98["Sweep Extrusion<br>[2113, 2141, 0]"]
99["Sweep Extrusion<br>[2113, 2141, 0]"]
103["Sweep Extrusion<br>[2636, 2664, 0]"]
104[Wall]
105["Cap End"]
106["SweepEdge Opposite"]
107["SweepEdge Adjacent"]
108["Sweep Extrusion<br>[2636, 2664, 0]"]
109["Sweep Extrusion<br>[2636, 2664, 0]"]
110["Sweep Extrusion<br>[2636, 2664, 0]"]
111["Sweep Extrusion<br>[2636, 2664, 0]"]
112["Sweep Extrusion<br>[2636, 2664, 0]"]
113["Sweep Extrusion<br>[2636, 2664, 0]"]
114["Sweep Extrusion<br>[2636, 2664, 0]"]
115["Sweep Extrusion<br>[2636, 2664, 0]"]
116["Sweep Extrusion<br>[2636, 2664, 0]"]
117["Sweep Extrusion<br>[2636, 2664, 0]"]
118["Sweep Extrusion<br>[2636, 2664, 0]"]
119["Sweep Extrusion<br>[2636, 2664, 0]"]
120["Sweep Extrusion<br>[2636, 2664, 0]"]
121["Sweep Extrusion<br>[2636, 2664, 0]"]
122["Sweep Extrusion<br>[2636, 2664, 0]"]
123["Sweep Extrusion<br>[2636, 2664, 0]"]
124["Sweep Extrusion<br>[2636, 2664, 0]"]
125["Sweep Extrusion<br>[2636, 2664, 0]"]
126["Sweep Extrusion<br>[2636, 2664, 0]"]
127["Sweep Extrusion<br>[2636, 2664, 0]"]
128["Sweep Extrusion<br>[2636, 2664, 0]"]
129["Sweep Extrusion<br>[2636, 2664, 0]"]
130["Sweep Extrusion<br>[2636, 2664, 0]"]
131["Sweep Extrusion<br>[2636, 2664, 0]"]
132["Sweep Extrusion<br>[2636, 2664, 0]"]
133["Sweep Extrusion<br>[2636, 2664, 0]"]
134["Sweep Extrusion<br>[2636, 2664, 0]"]
135["Sweep Extrusion<br>[2636, 2664, 0]"]
136["Sweep Extrusion<br>[2636, 2664, 0]"]
137["Sweep Extrusion<br>[2636, 2664, 0]"]
138["Sweep Extrusion<br>[2636, 2664, 0]"]
139["Sweep Extrusion<br>[2636, 2664, 0]"]
140["Sweep Extrusion<br>[2636, 2664, 0]"]
141["Sweep Extrusion<br>[2636, 2664, 0]"]
142["Sweep Extrusion<br>[2636, 2664, 0]"]
143["StartSketchOnFace<br>[1371, 1399, 0]"]
144["StartSketchOnFace<br>[1725, 1751, 0]"]
145["StartSketchOnFace<br>[2202, 2238, 0]"]
1 --- 2 1 --- 2
2 --- 3 2 --- 3
2 --- 4 2 --- 4
@ -219,7 +144,7 @@ flowchart LR
29 --- 40 29 --- 40
29 --- 41 29 --- 41
29 --- 42 29 --- 42
34 --- 100 34 --- 58
43 --- 44 43 --- 44
43 ---- 46 43 ---- 46
43 --- 45 43 --- 45
@ -230,17 +155,17 @@ flowchart LR
46 --- 48 46 --- 48
46 --- 49 46 --- 49
46 --- 50 46 --- 50
100 --- 101 58 --- 59
100 ---- 103 58 ---- 61
100 --- 102 58 --- 60
101 --- 104 59 --- 62
101 --- 106 59 --- 64
101 --- 107 59 --- 65
103 --- 104 61 --- 62
103 --- 105 61 --- 63
103 --- 106 61 --- 64
103 --- 107 61 --- 65
13 <--x 143 13 <--x 68
14 <--x 144 14 <--x 69
34 <--x 145 34 <--x 70
``` ```

File diff suppressed because it is too large Load Diff

View File

@ -150,258 +150,6 @@ description: Operations executed lego.kcl
"value": { "value": {
"type": "Array", "type": "Array",
"value": [ "value": [
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{ {
"type": "Sketch", "type": "Sketch",
"value": { "value": {
@ -505,204 +253,6 @@ description: Operations executed lego.kcl
"value": { "value": {
"type": "Array", "type": "Array",
"value": [ "value": [
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
{ {
"type": "Sketch", "type": "Sketch",
"value": { "value": {

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 86 KiB

View File

@ -1,17 +1,17 @@
```mermaid ```mermaid
flowchart LR flowchart LR
subgraph path2 [Path] subgraph path2 [Path]
2["Path<br>[429, 508, 0]"] 2["Path<br>[430, 501, 0]"]
3["Segment<br>[429, 508, 0]"] 3["Segment<br>[430, 501, 0]"]
4[Solid2d] 4[Solid2d]
end end
subgraph path5 [Path] subgraph path5 [Path]
5["Path<br>[568, 647, 0]"] 5["Path<br>[561, 632, 0]"]
6["Segment<br>[568, 647, 0]"] 6["Segment<br>[561, 632, 0]"]
7[Solid2d] 7[Solid2d]
end end
1["Plane<br>[350, 369, 0]"] 1["Plane<br>[351, 370, 0]"]
8["Sweep Revolve<br>[794, 845, 0]"] 8["Sweep Revolve<br>[779, 830, 0]"]
9[Wall] 9[Wall]
10["Cap Start"] 10["Cap Start"]
11["Cap End"] 11["Cap End"]

View File

@ -6,19 +6,19 @@ description: Result of parsing pipe-with-bend.kcl
"Ok": { "Ok": {
"body": [ "body": [
{ {
"commentStart": 209, "commentStart": 210,
"declaration": { "declaration": {
"commentStart": 231, "commentStart": 232,
"end": 0, "end": 0,
"id": { "id": {
"commentStart": 231, "commentStart": 232,
"end": 0, "end": 0,
"name": "innerDiameter", "name": "innerDiameter",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
"commentStart": 247, "commentStart": 248,
"end": 0, "end": 0,
"raw": "10", "raw": "10",
"start": 0, "start": 0,
@ -42,19 +42,19 @@ description: Result of parsing pipe-with-bend.kcl
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"commentStart": 250, "commentStart": 251,
"declaration": { "declaration": {
"commentStart": 250, "commentStart": 251,
"end": 0, "end": 0,
"id": { "id": {
"commentStart": 250, "commentStart": 251,
"end": 0, "end": 0,
"name": "outerDiameter", "name": "outerDiameter",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
"commentStart": 266, "commentStart": 267,
"end": 0, "end": 0,
"raw": "20", "raw": "20",
"start": 0, "start": 0,
@ -75,19 +75,19 @@ description: Result of parsing pipe-with-bend.kcl
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"commentStart": 269, "commentStart": 270,
"declaration": { "declaration": {
"commentStart": 269, "commentStart": 270,
"end": 0, "end": 0,
"id": { "id": {
"commentStart": 269, "commentStart": 270,
"end": 0, "end": 0,
"name": "bendRadius", "name": "bendRadius",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
"commentStart": 282, "commentStart": 283,
"end": 0, "end": 0,
"raw": "30", "raw": "30",
"start": 0, "start": 0,
@ -108,19 +108,19 @@ description: Result of parsing pipe-with-bend.kcl
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"commentStart": 285, "commentStart": 286,
"declaration": { "declaration": {
"commentStart": 285, "commentStart": 286,
"end": 0, "end": 0,
"id": { "id": {
"commentStart": 285, "commentStart": 286,
"end": 0, "end": 0,
"name": "bendAngle", "name": "bendAngle",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"init": { "init": {
"commentStart": 297, "commentStart": 298,
"end": 0, "end": 0,
"raw": "90", "raw": "90",
"start": 0, "start": 0,
@ -141,12 +141,12 @@ description: Result of parsing pipe-with-bend.kcl
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"commentStart": 299, "commentStart": 300,
"declaration": { "declaration": {
"commentStart": 338, "commentStart": 339,
"end": 0, "end": 0,
"id": { "id": {
"commentStart": 338, "commentStart": 339,
"end": 0, "end": 0,
"name": "sketch000", "name": "sketch000",
"start": 0, "start": 0,
@ -155,7 +155,7 @@ description: Result of parsing pipe-with-bend.kcl
"init": { "init": {
"arguments": [ "arguments": [
{ {
"commentStart": 364, "commentStart": 365,
"end": 0, "end": 0,
"raw": "\"XZ\"", "raw": "\"XZ\"",
"start": 0, "start": 0,
@ -165,13 +165,13 @@ description: Result of parsing pipe-with-bend.kcl
} }
], ],
"callee": { "callee": {
"commentStart": 350, "commentStart": 351,
"end": 0, "end": 0,
"name": "startSketchOn", "name": "startSketchOn",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"commentStart": 350, "commentStart": 351,
"end": 0, "end": 0,
"start": 0, "start": 0,
"type": "CallExpression", "type": "CallExpression",
@ -192,12 +192,12 @@ description: Result of parsing pipe-with-bend.kcl
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"commentStart": 369, "commentStart": 370,
"declaration": { "declaration": {
"commentStart": 414, "commentStart": 415,
"end": 0, "end": 0,
"id": { "id": {
"commentStart": 414, "commentStart": 415,
"end": 0, "end": 0,
"name": "outerProfile", "name": "outerProfile",
"start": 0, "start": 0,
@ -208,17 +208,17 @@ description: Result of parsing pipe-with-bend.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"commentStart": 452, "commentStart": 448,
"end": 0, "end": 0,
"name": "center", "name": "center",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"commentStart": 461, "commentStart": 457,
"elements": [ "elements": [
{ {
"commentStart": 462, "commentStart": 458,
"end": 0, "end": 0,
"name": "bendRadius", "name": "bendRadius",
"start": 0, "start": 0,
@ -226,7 +226,7 @@ description: Result of parsing pipe-with-bend.kcl
"type": "Identifier" "type": "Identifier"
}, },
{ {
"commentStart": 474, "commentStart": 470,
"end": 0, "end": 0,
"raw": "0", "raw": "0",
"start": 0, "start": 0,
@ -247,17 +247,17 @@ description: Result of parsing pipe-with-bend.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"commentStart": 480, "commentStart": 474,
"end": 0, "end": 0,
"name": "radius", "name": "radius",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"commentStart": 489, "commentStart": 483,
"end": 0, "end": 0,
"left": { "left": {
"commentStart": 489, "commentStart": 483,
"end": 0, "end": 0,
"name": "outerDiameter", "name": "outerDiameter",
"start": 0, "start": 0,
@ -266,7 +266,7 @@ description: Result of parsing pipe-with-bend.kcl
}, },
"operator": "/", "operator": "/",
"right": { "right": {
"commentStart": 505, "commentStart": 499,
"end": 0, "end": 0,
"raw": "2", "raw": "2",
"start": 0, "start": 0,
@ -284,19 +284,19 @@ description: Result of parsing pipe-with-bend.kcl
} }
], ],
"callee": { "callee": {
"commentStart": 429, "commentStart": 430,
"end": 0, "end": 0,
"name": "circle", "name": "circle",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"commentStart": 429, "commentStart": 430,
"end": 0, "end": 0,
"start": 0, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": { "unlabeled": {
"commentStart": 439, "commentStart": 437,
"end": 0, "end": 0,
"name": "sketch000", "name": "sketch000",
"start": 0, "start": 0,
@ -319,12 +319,12 @@ description: Result of parsing pipe-with-bend.kcl
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"commentStart": 508, "commentStart": 501,
"declaration": { "declaration": {
"commentStart": 553, "commentStart": 546,
"end": 0, "end": 0,
"id": { "id": {
"commentStart": 553, "commentStart": 546,
"end": 0, "end": 0,
"name": "innerProfile", "name": "innerProfile",
"start": 0, "start": 0,
@ -335,17 +335,17 @@ description: Result of parsing pipe-with-bend.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"commentStart": 591, "commentStart": 579,
"end": 0, "end": 0,
"name": "center", "name": "center",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"commentStart": 600, "commentStart": 588,
"elements": [ "elements": [
{ {
"commentStart": 601, "commentStart": 589,
"end": 0, "end": 0,
"name": "bendRadius", "name": "bendRadius",
"start": 0, "start": 0,
@ -353,7 +353,7 @@ description: Result of parsing pipe-with-bend.kcl
"type": "Identifier" "type": "Identifier"
}, },
{ {
"commentStart": 613, "commentStart": 601,
"end": 0, "end": 0,
"raw": "0", "raw": "0",
"start": 0, "start": 0,
@ -374,17 +374,17 @@ description: Result of parsing pipe-with-bend.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"commentStart": 619, "commentStart": 605,
"end": 0, "end": 0,
"name": "radius", "name": "radius",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"commentStart": 628, "commentStart": 614,
"end": 0, "end": 0,
"left": { "left": {
"commentStart": 628, "commentStart": 614,
"end": 0, "end": 0,
"name": "innerDiameter", "name": "innerDiameter",
"start": 0, "start": 0,
@ -393,7 +393,7 @@ description: Result of parsing pipe-with-bend.kcl
}, },
"operator": "/", "operator": "/",
"right": { "right": {
"commentStart": 644, "commentStart": 630,
"end": 0, "end": 0,
"raw": "2", "raw": "2",
"start": 0, "start": 0,
@ -411,19 +411,19 @@ description: Result of parsing pipe-with-bend.kcl
} }
], ],
"callee": { "callee": {
"commentStart": 568, "commentStart": 561,
"end": 0, "end": 0,
"name": "circle", "name": "circle",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"commentStart": 568, "commentStart": 561,
"end": 0, "end": 0,
"start": 0, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": { "unlabeled": {
"commentStart": 578, "commentStart": 568,
"end": 0, "end": 0,
"name": "sketch000", "name": "sketch000",
"start": 0, "start": 0,
@ -446,12 +446,12 @@ description: Result of parsing pipe-with-bend.kcl
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"commentStart": 647, "commentStart": 632,
"declaration": { "declaration": {
"commentStart": 683, "commentStart": 668,
"end": 0, "end": 0,
"id": { "id": {
"commentStart": 683, "commentStart": 668,
"end": 0, "end": 0,
"name": "pipeProfile", "name": "pipeProfile",
"start": 0, "start": 0,
@ -460,7 +460,7 @@ description: Result of parsing pipe-with-bend.kcl
"init": { "init": {
"body": [ "body": [
{ {
"commentStart": 697, "commentStart": 682,
"end": 0, "end": 0,
"name": "outerProfile", "name": "outerProfile",
"start": 0, "start": 0,
@ -470,7 +470,7 @@ description: Result of parsing pipe-with-bend.kcl
{ {
"arguments": [ "arguments": [
{ {
"commentStart": 720, "commentStart": 705,
"end": 0, "end": 0,
"name": "innerProfile", "name": "innerProfile",
"start": 0, "start": 0,
@ -478,7 +478,7 @@ description: Result of parsing pipe-with-bend.kcl
"type": "Identifier" "type": "Identifier"
}, },
{ {
"commentStart": 734, "commentStart": 719,
"end": 0, "end": 0,
"start": 0, "start": 0,
"type": "PipeSubstitution", "type": "PipeSubstitution",
@ -486,26 +486,26 @@ description: Result of parsing pipe-with-bend.kcl
} }
], ],
"callee": { "callee": {
"commentStart": 715, "commentStart": 700,
"end": 0, "end": 0,
"name": "hole", "name": "hole",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"commentStart": 715, "commentStart": 700,
"end": 0, "end": 0,
"start": 0, "start": 0,
"type": "CallExpression", "type": "CallExpression",
"type": "CallExpression" "type": "CallExpression"
} }
], ],
"commentStart": 697, "commentStart": 682,
"end": 0, "end": 0,
"nonCodeMeta": { "nonCodeMeta": {
"nonCodeNodes": { "nonCodeNodes": {
"1": [ "1": [
{ {
"commentStart": 736, "commentStart": 721,
"end": 0, "end": 0,
"start": 0, "start": 0,
"type": "NonCodeNode", "type": "NonCodeNode",
@ -538,12 +538,12 @@ description: Result of parsing pipe-with-bend.kcl
"type": "VariableDeclaration" "type": "VariableDeclaration"
}, },
{ {
"commentStart": 787, "commentStart": 772,
"declaration": { "declaration": {
"commentStart": 787, "commentStart": 772,
"end": 0, "end": 0,
"id": { "id": {
"commentStart": 787, "commentStart": 772,
"end": 0, "end": 0,
"name": "pipe", "name": "pipe",
"start": 0, "start": 0,
@ -554,16 +554,16 @@ description: Result of parsing pipe-with-bend.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"commentStart": 815, "commentStart": 800,
"end": 0, "end": 0,
"name": "axis", "name": "axis",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"commentStart": 822, "commentStart": 807,
"end": 0, "end": 0,
"raw": "\"Y\"", "raw": "'Y'",
"start": 0, "start": 0,
"type": "Literal", "type": "Literal",
"type": "Literal", "type": "Literal",
@ -573,14 +573,14 @@ description: Result of parsing pipe-with-bend.kcl
{ {
"type": "LabeledArg", "type": "LabeledArg",
"label": { "label": {
"commentStart": 827, "commentStart": 812,
"end": 0, "end": 0,
"name": "angle", "name": "angle",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"arg": { "arg": {
"commentStart": 835, "commentStart": 820,
"end": 0, "end": 0,
"name": "bendAngle", "name": "bendAngle",
"start": 0, "start": 0,
@ -590,19 +590,19 @@ description: Result of parsing pipe-with-bend.kcl
} }
], ],
"callee": { "callee": {
"commentStart": 794, "commentStart": 779,
"end": 0, "end": 0,
"name": "revolve", "name": "revolve",
"start": 0, "start": 0,
"type": "Identifier" "type": "Identifier"
}, },
"commentStart": 794, "commentStart": 779,
"end": 0, "end": 0,
"start": 0, "start": 0,
"type": "CallExpressionKw", "type": "CallExpressionKw",
"type": "CallExpressionKw", "type": "CallExpressionKw",
"unlabeled": { "unlabeled": {
"commentStart": 802, "commentStart": 787,
"end": 0, "end": 0,
"name": "pipeProfile", "name": "pipeProfile",
"start": 0, "start": 0,
@ -627,7 +627,7 @@ description: Result of parsing pipe-with-bend.kcl
"commentStart": 0, "commentStart": 0,
"end": 0, "end": 0,
"name": { "name": {
"commentStart": 177, "commentStart": 178,
"end": 0, "end": 0,
"name": "settings", "name": "settings",
"start": 0, "start": 0,
@ -642,10 +642,10 @@ description: Result of parsing pipe-with-bend.kcl
], ],
"properties": [ "properties": [
{ {
"commentStart": 186, "commentStart": 187,
"end": 0, "end": 0,
"key": { "key": {
"commentStart": 186, "commentStart": 187,
"end": 0, "end": 0,
"name": "defaultLengthUnit", "name": "defaultLengthUnit",
"start": 0, "start": 0,
@ -654,7 +654,7 @@ description: Result of parsing pipe-with-bend.kcl
"start": 0, "start": 0,
"type": "ObjectProperty", "type": "ObjectProperty",
"value": { "value": {
"commentStart": 206, "commentStart": 207,
"end": 0, "end": 0,
"name": "in", "name": "in",
"start": 0, "start": 0,
@ -671,7 +671,7 @@ description: Result of parsing pipe-with-bend.kcl
"nonCodeNodes": {}, "nonCodeNodes": {},
"startNodes": [ "startNodes": [
{ {
"commentStart": 209, "commentStart": 210,
"end": 0, "end": 0,
"start": 0, "start": 0,
"type": "NonCodeNode", "type": "NonCodeNode",

View File

@ -1,20 +1,20 @@
```mermaid ```mermaid
flowchart LR flowchart LR
subgraph path2 [Path] subgraph path2 [Path]
2["Path<br>[284, 322, 0]"] 2["Path<br>[286, 324, 0]"]
3["Segment<br>[328, 361, 0]"] 3["Segment<br>[330, 363, 0]"]
4["Segment<br>[367, 424, 0]"] 4["Segment<br>[369, 426, 0]"]
5["Segment<br>[430, 457, 0]"] 5["Segment<br>[432, 459, 0]"]
6["Segment<br>[463, 493, 0]"] 6["Segment<br>[465, 495, 0]"]
7["Segment<br>[499, 534, 0]"] 7["Segment<br>[501, 536, 0]"]
8["Segment<br>[540, 632, 0]"] 8["Segment<br>[542, 634, 0]"]
9["Segment<br>[638, 668, 0]"] 9["Segment<br>[640, 670, 0]"]
10["Segment<br>[674, 732, 0]"] 10["Segment<br>[676, 734, 0]"]
11["Segment<br>[738, 765, 0]"] 11["Segment<br>[740, 767, 0]"]
12["Segment<br>[771, 793, 0]"] 12["Segment<br>[773, 795, 0]"]
13["Segment<br>[799, 834, 0]"] 13["Segment<br>[801, 836, 0]"]
14["Segment<br>[840, 886, 0]"] 14["Segment<br>[842, 888, 0]"]
15["Segment<br>[892, 899, 0]"] 15["Segment<br>[894, 901, 0]"]
16[Solid2d] 16[Solid2d]
end end
subgraph path60 [Path] subgraph path60 [Path]
@ -91,8 +91,8 @@ flowchart LR
265["Segment<br>[4584, 4591, 0]"] 265["Segment<br>[4584, 4591, 0]"]
266[Solid2d] 266[Solid2d]
end end
1["Plane<br>[258, 278, 0]"] 1["Plane<br>[260, 280, 0]"]
17["Sweep Revolve<br>[910, 1045, 0]"] 17["Sweep Revolve<br>[912, 1045, 0]"]
18[Wall] 18[Wall]
19[Wall] 19[Wall]
20[Wall] 20[Wall]

File diff suppressed because it is too large Load Diff

View File

@ -627,9 +627,9 @@ description: Variables in memory after executing poopy-shoe.kcl
"id": "[uuid]", "id": "[uuid]",
"sourceRange": [], "sourceRange": [],
"tag": { "tag": {
"commentStart": 417, "commentStart": 419,
"end": 423, "end": 425,
"start": 417, "start": 419,
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "seg01" "value": "seg01"
}, },
@ -746,9 +746,9 @@ description: Variables in memory after executing poopy-shoe.kcl
0.0 0.0
], ],
"tag": { "tag": {
"commentStart": 417, "commentStart": 419,
"end": 423, "end": 425,
"start": 417, "start": 419,
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "seg01" "value": "seg01"
}, },
@ -1093,9 +1093,9 @@ description: Variables in memory after executing poopy-shoe.kcl
0.0 0.0
], ],
"tag": { "tag": {
"commentStart": 417, "commentStart": 419,
"end": 423, "end": 425,
"start": 417, "start": 419,
"type": "TagDeclarator", "type": "TagDeclarator",
"value": "seg01" "value": "seg01"
}, },

View File

@ -168,7 +168,7 @@ description: Artifact commands socket-head-cap-screw.kcl
"command": { "command": {
"type": "extrude", "type": "extrude",
"target": "[uuid]", "target": "[uuid]",
"distance": 0.19, "distance": -0.19,
"faces": null "faces": null
} }
}, },
@ -216,6 +216,40 @@ description: Artifact commands socket-head-cap-screw.kcl
"face_id": "[uuid]" "face_id": "[uuid]"
} }
}, },
{
"cmdId": "[uuid]",
"range": [],
"command": {
"type": "solid3d_get_opposite_edge",
"object_id": "[uuid]",
"edge_id": "[uuid]",
"face_id": "[uuid]"
}
},
{
"cmdId": "[uuid]",
"range": [],
"command": {
"type": "solid3d_fillet_edge",
"object_id": "[uuid]",
"edge_id": "[uuid]",
"radius": 0.02,
"tolerance": 0.0000001,
"cut_type": "fillet"
}
},
{
"cmdId": "[uuid]",
"range": [],
"command": {
"type": "solid3d_fillet_edge",
"object_id": "[uuid]",
"edge_id": "[uuid]",
"radius": 0.02,
"tolerance": 0.0000001,
"cut_type": "fillet"
}
},
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [],
@ -243,7 +277,7 @@ description: Artifact commands socket-head-cap-screw.kcl
"path": "[uuid]", "path": "[uuid]",
"to": { "to": {
"x": 0.078125, "x": 0.078125,
"y": 0.0, "y": 0.04510548978043951,
"z": 0.0 "z": 0.0
} }
} }
@ -264,8 +298,8 @@ description: Artifact commands socket-head-cap-screw.kcl
"segment": { "segment": {
"type": "line", "type": "line",
"end": { "end": {
"x": 0.0, "x": -0.0,
"y": -0.0451, "y": -0.0902,
"z": 0.0 "z": 0.0
}, },
"relative": true "relative": true
@ -340,23 +374,6 @@ description: Artifact commands socket-head-cap-screw.kcl
} }
} }
}, },
{
"cmdId": "[uuid]",
"range": [],
"command": {
"type": "extend_path",
"path": "[uuid]",
"segment": {
"type": "line",
"end": {
"x": 0.0781,
"y": -0.0451,
"z": 0.0
},
"relative": true
}
}
},
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [],
@ -531,26 +548,6 @@ description: Artifact commands socket-head-cap-screw.kcl
"face_id": "[uuid]" "face_id": "[uuid]"
} }
}, },
{
"cmdId": "[uuid]",
"range": [],
"command": {
"type": "solid3d_get_opposite_edge",
"object_id": "[uuid]",
"edge_id": "[uuid]",
"face_id": "[uuid]"
}
},
{
"cmdId": "[uuid]",
"range": [],
"command": {
"type": "solid3d_get_next_adjacent_edge",
"object_id": "[uuid]",
"edge_id": "[uuid]",
"face_id": "[uuid]"
}
},
{ {
"cmdId": "[uuid]", "cmdId": "[uuid]",
"range": [], "range": [],
@ -688,5 +685,44 @@ description: Artifact commands socket-head-cap-screw.kcl
"edge_id": "[uuid]", "edge_id": "[uuid]",
"face_id": "[uuid]" "face_id": "[uuid]"
} }
},
{
"cmdId": "[uuid]",
"range": [],
"command": {
"type": "solid3d_get_opposite_edge",
"object_id": "[uuid]",
"edge_id": "[uuid]",
"face_id": "[uuid]"
}
},
{
"cmdId": "[uuid]",
"range": [],
"command": {
"type": "object_set_material_params_pbr",
"object_id": "[uuid]",
"color": {
"r": 0.3019608,
"g": 0.8156863,
"b": 0.2627451,
"a": 100.0
},
"metalness": 0.9,
"roughness": 0.9,
"ambient_occlusion": 0.0
}
},
{
"cmdId": "[uuid]",
"range": [],
"command": {
"type": "solid3d_fillet_edge",
"object_id": "[uuid]",
"edge_id": "[uuid]",
"radius": 0.02,
"tolerance": 0.0000001,
"cut_type": "fillet"
}
} }
] ]

View File

@ -1,35 +1,35 @@
```mermaid ```mermaid
flowchart LR flowchart LR
subgraph path2 [Path] subgraph path2 [Path]
2["Path<br>[984, 1077, 0]"] 2["Path<br>[748, 854, 0]"]
3["Segment<br>[984, 1077, 0]"] 3["Segment<br>[748, 854, 0]"]
4[Solid2d] 4[Solid2d]
end end
subgraph path11 [Path] subgraph path13 [Path]
11["Path<br>[1298, 1339, 0]"] 13["Path<br>[1094, 1181, 0]"]
12["Segment<br>[1347, 1381, 0]"] 14["Segment<br>[1189, 1272, 0]"]
13["Segment<br>[1389, 1481, 0]"] 15["Segment<br>[1280, 1363, 0]"]
14["Segment<br>[1489, 1598, 0]"] 16["Segment<br>[1371, 1454, 0]"]
15["Segment<br>[1606, 1721, 0]"] 17["Segment<br>[1462, 1544, 0]"]
16["Segment<br>[1729, 1844, 0]"] 18["Segment<br>[1552, 1634, 0]"]
17["Segment<br>[1852, 1967, 0]"] 19["Segment<br>[1642, 1649, 0]"]
18["Segment<br>[1975, 1982, 0]"] 20[Solid2d]
19[Solid2d]
end end
subgraph path43 [Path] subgraph path41 [Path]
43["Path<br>[2115, 2197, 0]"] 41["Path<br>[1752, 1821, 0]"]
44["Segment<br>[2115, 2197, 0]"] 42["Segment<br>[1752, 1821, 0]"]
45[Solid2d] 43[Solid2d]
end end
1["Plane<br>[957, 976, 0]"] 1["Plane<br>[721, 740, 0]"]
5["Sweep Extrusion<br>[1128, 1176, 0]"] 5["Sweep Extrusion<br>[862, 895, 0]"]
6[Wall] 6[Wall]
7["Cap Start"] 7["Cap Start"]
8["Cap End"] 8["Cap End"]
9["SweepEdge Opposite"] 9["SweepEdge Opposite"]
10["SweepEdge Adjacent"] 10["SweepEdge Adjacent"]
20["Sweep Extrusion<br>[1998, 2052, 0]"] 11["EdgeCut Fillet<br>[903, 969, 0]"]
21[Wall] 12["EdgeCut Fillet<br>[903, 969, 0]"]
21["Sweep Extrusion<br>[1657, 1697, 0]"]
22[Wall] 22[Wall]
23[Wall] 23[Wall]
24[Wall] 24[Wall]
@ -49,15 +49,14 @@ flowchart LR
38["SweepEdge Adjacent"] 38["SweepEdge Adjacent"]
39["SweepEdge Opposite"] 39["SweepEdge Opposite"]
40["SweepEdge Adjacent"] 40["SweepEdge Adjacent"]
41["SweepEdge Opposite"] 44["Sweep Extrusion<br>[1829, 1857, 0]"]
42["SweepEdge Adjacent"] 45[Wall]
46["Sweep Extrusion<br>[2212, 2253, 0]"] 46["Cap End"]
47[Wall] 47["SweepEdge Opposite"]
48["Cap End"] 48["SweepEdge Adjacent"]
49["SweepEdge Opposite"] 49["EdgeCut Fillet<br>[1865, 1924, 0]"]
50["SweepEdge Adjacent"] 50["StartSketchOnFace<br>[1054, 1086, 0]"]
51["StartSketchOnFace<br>[1259, 1290, 0]"] 51["StartSketchOnFace<br>[1714, 1744, 0]"]
52["StartSketchOnFace<br>[2074, 2107, 0]"]
1 --- 2 1 --- 2
2 --- 3 2 --- 3
2 ---- 5 2 ---- 5
@ -65,75 +64,71 @@ flowchart LR
3 --- 6 3 --- 6
3 --- 9 3 --- 9
3 --- 10 3 --- 10
3 --- 11
5 --- 6 5 --- 6
5 --- 7 5 --- 7
5 --- 8 5 --- 8
5 --- 9 5 --- 9
5 --- 10 5 --- 10
7 --- 43 7 --- 13
8 --- 11 8 --- 41
11 --- 12 9 <--x 12
11 --- 13 13 --- 14
11 --- 14 13 --- 15
11 --- 15 13 --- 16
11 --- 16 13 --- 17
11 --- 17 13 --- 18
11 --- 18 13 --- 19
11 ---- 20 13 ---- 21
11 --- 19 13 --- 20
12 --- 27 14 --- 27
12 --- 41 14 --- 39
12 --- 42 14 --- 40
13 --- 26 15 --- 26
13 --- 39 15 --- 37
13 --- 40 15 --- 38
14 --- 25 16 --- 25
14 --- 37 16 --- 35
14 --- 38 16 --- 36
15 --- 24 17 --- 24
15 --- 35 17 --- 33
15 --- 36 17 --- 34
16 --- 23 18 --- 23
16 --- 33 18 --- 31
16 --- 34 18 --- 32
17 --- 22 19 --- 22
17 --- 31 19 --- 29
17 --- 32 19 --- 30
18 --- 21 21 --- 22
18 --- 29 21 --- 23
18 --- 30 21 --- 24
20 --- 21 21 --- 25
20 --- 22 21 --- 26
20 --- 23 21 --- 27
20 --- 24 21 --- 28
20 --- 25 21 --- 29
20 --- 26 21 --- 30
20 --- 27 21 --- 31
20 --- 28 21 --- 32
20 --- 29 21 --- 33
20 --- 30 21 --- 34
20 --- 31 21 --- 35
20 --- 32 21 --- 36
20 --- 33 21 --- 37
20 --- 34 21 --- 38
20 --- 35 21 --- 39
20 --- 36 21 --- 40
20 --- 37 41 --- 42
20 --- 38 41 ---- 44
20 --- 39 41 --- 43
20 --- 40 42 --- 45
20 --- 41 42 --- 47
20 --- 42 42 --- 48
43 --- 44 44 --- 45
43 ---- 46 44 --- 46
43 --- 45
44 --- 47 44 --- 47
44 --- 49 44 --- 48
44 --- 50 47 <--x 49
46 --- 47 7 <--x 50
46 --- 48
46 --- 49
46 --- 50
8 <--x 51 8 <--x 51
7 <--x 52
``` ```

File diff suppressed because it is too large Load Diff

View File

@ -20,10 +20,10 @@ description: Operations executed socket-head-cap-screw.kcl
}, },
{ {
"type": "UserDefinedFunctionCall", "type": "UserDefinedFunctionCall",
"name": "capScrew", "name": "bolt",
"functionSourceRange": [ "functionSourceRange": [
861, 662,
2274, 2014,
0 0
], ],
"unlabeledArg": null, "unlabeledArg": null,
@ -50,7 +50,7 @@ description: Operations executed socket-head-cap-screw.kcl
"length": { "length": {
"value": { "value": {
"type": "Number", "type": "Number",
"value": 0.19, "value": -0.19,
"ty": { "ty": {
"type": "Default", "type": "Default",
"len": { "len": {
@ -77,6 +77,55 @@ description: Operations executed socket-head-cap-screw.kcl
"sourceRange": [] "sourceRange": []
} }
}, },
{
"labeledArgs": {
"radius": {
"value": {
"type": "Number",
"value": 0.02,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"sourceRange": []
},
"tags": {
"value": {
"type": "Array",
"value": [
{
"type": "TagIdentifier",
"value": "topEdge",
"artifact_id": "[uuid]"
},
{
"type": "Uuid",
"value": "[uuid]"
}
]
},
"sourceRange": []
}
},
"name": "fillet",
"sourceRange": [],
"type": "StdLibCall",
"unlabeledArg": {
"value": {
"type": "Solid",
"value": {
"artifactId": "[uuid]"
}
},
"sourceRange": []
}
},
{ {
"labeledArgs": { "labeledArgs": {
"data": { "data": {
@ -91,7 +140,7 @@ description: Operations executed socket-head-cap-screw.kcl
"tag": { "tag": {
"value": { "value": {
"type": "String", "type": "String",
"value": "end" "value": "start"
}, },
"sourceRange": [] "sourceRange": []
} }
@ -141,7 +190,7 @@ description: Operations executed socket-head-cap-screw.kcl
"tag": { "tag": {
"value": { "value": {
"type": "String", "type": "String",
"value": "start" "value": "end"
}, },
"sourceRange": [] "sourceRange": []
} }
@ -183,6 +232,50 @@ description: Operations executed socket-head-cap-screw.kcl
"sourceRange": [] "sourceRange": []
} }
}, },
{
"labeledArgs": {
"radius": {
"value": {
"type": "Number",
"value": 0.02,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"sourceRange": []
},
"tags": {
"value": {
"type": "Array",
"value": [
{
"type": "Uuid",
"value": "[uuid]"
}
]
},
"sourceRange": []
}
},
"name": "fillet",
"sourceRange": [],
"type": "StdLibCall",
"unlabeledArg": {
"value": {
"type": "Solid",
"value": {
"artifactId": "[uuid]"
}
},
"sourceRange": []
}
},
{ {
"type": "UserDefinedFunctionReturn" "type": "UserDefinedFunctionReturn"
} }

View File

@ -3,17 +3,23 @@ source: kcl-lib/src/simulation_tests.rs
description: Variables in memory after executing socket-head-cap-screw.kcl description: Variables in memory after executing socket-head-cap-screw.kcl
--- ---
{ {
"capRatio": { "bolt": {
"type": "Number",
"value": 0.607,
"ty": {
"type": "Unknown"
}
},
"capScrew": {
"type": "Function" "type": "Function"
}, },
"headDiameter": { "boltDiameter": {
"type": "Number",
"value": 0.19,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"boltHeadDiameter": {
"type": "Number", "type": "Number",
"value": 0.313, "value": 0.313,
"ty": { "ty": {
@ -26,7 +32,7 @@ description: Variables in memory after executing socket-head-cap-screw.kcl
} }
} }
}, },
"headLength": { "boltHeadLength": {
"type": "Number", "type": "Number",
"value": 0.19, "value": 0.19,
"ty": { "ty": {
@ -39,80 +45,21 @@ description: Variables in memory after executing socket-head-cap-screw.kcl
} }
} }
}, },
"hexChangeAngle": { "boltHexDrive": {
"type": "Number",
"value": 60.0,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"hexInteriorAngle": {
"type": "Number",
"value": 120.0,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"hexRatio": {
"type": "Number",
"value": 0.4992,
"ty": {
"type": "Unknown"
}
},
"hexStartingAngle": {
"type": "Number",
"value": 210.0,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"hexWallLength": {
"type": "Number",
"value": 0.0902,
"ty": {
"type": "Unknown"
}
},
"hexWallToWall": {
"type": "Number", "type": "Number",
"value": 0.1563, "value": 0.1563,
"ty": { "ty": {
"type": "Unknown" "type": "Unknown"
} }
}, },
"screwDiameter": { "boltHexFlatLength": {
"type": "Number", "type": "Number",
"value": 0.19, "value": 0.0902,
"ty": { "ty": {
"type": "Default", "type": "Unknown"
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
} }
}, },
"screwLength": { "boltLength": {
"type": "Number", "type": "Number",
"value": 1.0, "value": 1.0,
"ty": { "ty": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 64 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -4,19 +4,140 @@ description: Variables in memory after executing walkie-talkie.kcl
--- ---
{ {
"antenna": { "antenna": {
"type": "Module", "type": "Function"
"value": 4 },
"antennaBaseHeight": {
"type": "Number",
"value": 0.25,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"antennaBaseWidth": {
"type": "Number",
"value": 0.5,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"antennaLength": {
"type": "Number",
"value": 3.0,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"antennaTopHeight": {
"type": "Number",
"value": 0.05,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"antennaTopWidth": {
"type": "Number",
"value": 0.3,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
}, },
"body": { "body": {
"type": "Module", "type": "Function"
"value": 3
}, },
"button": { "button": {
"type": "Function" "type": "Function"
}, },
"buttonHeight": {
"type": "Number",
"value": 0.48,
"ty": {
"type": "Unknown"
}
},
"buttonThickness": {
"type": "Number",
"value": 0.04,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"buttonWidth": {
"type": "Number",
"value": 0.15,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"case": { "case": {
"type": "Module", "type": "Function"
"value": 5 },
"caseTolerance": {
"type": "Number",
"value": 0.01,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"chamferLength": {
"type": "Number",
"value": 0.325,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
}, },
"height": { "height": {
"type": "Number", "type": "Number",
@ -32,8 +153,72 @@ description: Variables in memory after executing walkie-talkie.kcl
} }
}, },
"knob": { "knob": {
"type": "Module", "type": "Function"
"value": 7 },
"knobDiameter": {
"type": "Number",
"value": 0.5,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"knobHeight": {
"type": "Number",
"value": 0.25,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"knobRadius": {
"type": "Number",
"value": 0.05,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"offset": {
"type": "Number",
"value": 0.125,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"screenDepth": {
"type": "Number",
"value": -0.0625,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
}, },
"screenHeight": { "screenHeight": {
"type": "Number", "type": "Number",
@ -68,9 +253,93 @@ description: Variables in memory after executing walkie-talkie.kcl
"type": "Unknown" "type": "Unknown"
} }
}, },
"speakerBoxHeight": {
"type": "Number",
"value": 1.25,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"speakerBoxWidth": {
"type": "Number",
"value": 1.25,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"squareHoleSideLength": {
"type": "Number",
"value": 0.0625,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"tag1": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "tag1"
},
"tag2": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "tag2"
},
"tag3": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "tag3"
},
"tag4": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "tag4"
},
"talkButton": { "talkButton": {
"type": "Module", "type": "Function"
"value": 6 },
"talkButtonHeight": {
"type": "Number",
"value": 0.05,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"talkButtonSideLength": {
"type": "Number",
"value": 0.5,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
}, },
"thickness": { "thickness": {
"type": "Number", "type": "Number",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 58 KiB