Add START and END constants to std (#6270)

Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
Nick Cameron
2025-04-14 20:37:45 +12:00
committed by GitHub
parent 8f487a441b
commit 7d7b153085
130 changed files with 2741 additions and 2292 deletions

View File

@ -38,8 +38,8 @@ export fn divider(plane) {
|> extrude(length = dividerThickness / 2)
left = dividerSketch(plane)
|> extrude(length = -dividerThickness / 2)
shell(right, thickness = 1.5, faces = ["end"])
shell(left, thickness = 1.5, faces = ["start"])
shell(right, thickness = 1.5, faces = [END])
shell(left, thickness = 1.5, faces = [START])
return 0
}

View File

@ -12,11 +12,11 @@ rotorSketch = startSketchOn(XZ)
rotor = extrude(rotorSketch, length = rotorSinglePlateThickness)
|> appearance(color = "#dbcd70", roughness = 90, metalness = 90)
rotorBumpSketch = startSketchOn(rotor, 'end')
rotorBumpSketch = startSketchOn(rotor, END)
|> circle(center = [0, 0], radius = rotorInnerDiameter / 2)
rotorBump = extrude(rotorBumpSketch, length = rotorInnerDiameterThickness)
lugHoles = startSketchOn(rotorBump, 'end')
lugHoles = startSketchOn(rotorBump, END)
|> circle(center = [-lugSpacing / 2, 0], radius = 0.315)
|> patternCircular2d(
arcDegrees = 360,
@ -28,15 +28,15 @@ lugHoles = startSketchOn(rotorBump, 'end')
|> appearance(color = "#dbcd70", roughness = 90, metalness = 90)
// (update when boolean is available)
centerSpacer = startSketchOn(rotor, 'start')
centerSpacer = startSketchOn(rotor, START)
|> circle(%, center = [0, 0], radius = .25)
|> extrude(%, length = spacerLength)
secondaryRotorSketch = startSketchOn(centerSpacer, 'end')
secondaryRotorSketch = startSketchOn(centerSpacer, END)
|> circle(center = [0, 0], radius = rotorDiameter / 2)
secondRotor = extrude(secondaryRotorSketch, length = rotorSinglePlateThickness)
lugHoles2 = startSketchOn(secondRotor, 'end')
lugHoles2 = startSketchOn(secondRotor, END)
|> circle(center = [-lugSpacing / 2, 0], radius = 0.315)
|> patternCircular2d(
arcDegrees = 360,
@ -46,7 +46,7 @@ lugHoles2 = startSketchOn(secondRotor, 'end')
)
|> extrude(length = -rotorSinglePlateThickness)
spacerSketch = startSketchOn(rotor, 'start')
spacerSketch = startSketchOn(rotor, START)
|> circle(center = [spacerPatternDiameter / 2, 0], radius = spacerDiameter)
|> patternCircular2d(
arcDegrees = 360,
@ -56,7 +56,7 @@ spacerSketch = startSketchOn(rotor, 'start')
)
spacers = extrude(spacerSketch, length = spacerLength)
rotorSlottedSketch = startSketchOn(rotor, 'START')
rotorSlottedSketch = startSketchOn(rotor, START)
|> startProfileAt([2.17, 2.56], %)
|> xLine(length = 0.12)
|> yLine(length = 2.56)
@ -71,7 +71,7 @@ rotorSlottedSketch = startSketchOn(rotor, 'START')
)
rotorSlotted = extrude(rotorSlottedSketch, length = -rotorSinglePlateThickness / 2)
secondRotorSlottedSketch = startSketchOn(secondRotor, 'END')
secondRotorSlottedSketch = startSketchOn(secondRotor, END)
|> startProfileAt([-2.17, 2.56], %)
|> xLine(length = -0.12)
|> yLine(length = 2.56)

View File

@ -14,13 +14,13 @@ lugBase = startSketchOn(XZ)
|> extrude(length = wheelWidth / 20)
// Extend the wheel center and bore holes to accomidate the lug heads
lugExtrusion = startSketchOn(lugBase, 'END')
lugExtrusion = startSketchOn(lugBase, END)
|> circle(center = [0, 0], radius = (lugSpacing + 1.5) / 2)
|> hole(circle(center = [0, 0], radius = (lugSpacing - 1.5) / 2), %)
|> extrude(length = wheelWidth / 10)
// Create the circular pattern for the lugs
lugClearance = startSketchOn(lugExtrusion, 'END')
lugClearance = startSketchOn(lugExtrusion, END)
|> circle(center = [lugSpacing / 2, 0], radius = 1.2 / 2)
|> patternCircular2d(
arcDegrees = 360,
@ -31,7 +31,7 @@ lugClearance = startSketchOn(lugExtrusion, 'END')
|> extrude(length = -wheelWidth / 10)
// Create the circular pattern for the lug holes
lugHoles = startSketchOn(lugBase, 'END')
lugHoles = startSketchOn(lugBase, END)
|> circle(center = [lugSpacing / 2, 0], radius = fromMm(16) / 2)
|> patternCircular2d(
arcDegrees = 360,

View File

@ -117,7 +117,7 @@ sinkOffsetFront = 40
sinkOffsetLeft = 350
sinkSpacing = tableWidth - sinkWidth - (sinkOffsetLeft * 2)
sinkPlaneOutside = startSketchOn(tableTopBody, 'START')
sinkPlaneOutside = startSketchOn(tableTopBody, START)
sinkBodyOutside = startProfileAt([-sinkOffsetLeft, sinkOffsetFront], sinkPlaneOutside)
|> yLine(length = sinkLength)
|> xLine(length = -sinkWidth)
@ -127,7 +127,7 @@ sinkBodyOutside = startProfileAt([-sinkOffsetLeft, sinkOffsetFront], sinkPlaneOu
|> patternLinear2d(axis = [-1, 0], instances = sinkCount, distance = sinkSpacing)
|> extrude(length = sinkDepth)
sinkPlaneInside = startSketchOn(tableTopBody, 'END')
sinkPlaneInside = startSketchOn(tableTopBody, END)
sinkBodyInside = startProfileAt([
sinkOffsetLeft + metalThickness,
sinkOffsetFront + metalThickness

View File

@ -31,7 +31,7 @@ extrude001 = extrude(sketch001, length = height)
)
// Apply a shell to the enclosure base to create the internal storage
|> shell(faces = ["end"], thickness = wallThickness)
|> shell(faces = [END], thickness = wallThickness)
// Define a function to create the internal structure to secure a fastener at each corner
fn function001(originStart) {
@ -120,7 +120,7 @@ extrude003 = extrude(sketch003, length = wallThickness)
)
// Define lid inner and sealing surfaces
sketch004 = startSketchOn(extrude003, 'END')
sketch004 = startSketchOn(extrude003, END)
|> startProfileAt([
width * 1.2 + wallThickness,
wallThickness

View File

@ -37,16 +37,16 @@ flangeBase = startSketchOn(XY)
|> extrude(length = baseThickness)
// Create the extrusion on the top of the flange base
topExtrusion = startSketchOn(flangeBase, 'end')
topExtrusion = startSketchOn(flangeBase, END)
|> circle(center = [0, 0], radius = topTotalDiameter / 2)
|> extrude(length = topTotalThickness)
// Create the extrusion on the bottom of the flange base
bottomExtrusion = startSketchOn(flangeBase, 'start')
bottomExtrusion = startSketchOn(flangeBase, START)
|> circle(center = [0, 0], radius = bottomTotalDiameter / 2)
|> extrude(length = bottomThickness)
// Cut a hole through the entire body
pipeHole = startSketchOn(topExtrusion, 'end')
pipeHole = startSketchOn(topExtrusion, END)
|> circle(center = [0, 0], radius = pipeDia / 2)
|> extrude(%, length = -(topTotalThickness + baseThickness + bottomThickness))

View File

@ -17,7 +17,7 @@ tabThk = 4
// Define a rectangular shape func
fn rectShape(pos, w, l) {
rr = startSketchOn('xy')
rr = startSketchOn(XY)
|> startProfileAt([pos[0] - (w / 2), pos[1] - (l / 2)], %)
|> line(endAbsolute = [pos[0] + w / 2, pos[1] - (l / 2)], tag = $edge01)
|> line(endAbsolute = [pos[0] + w / 2, pos[1] + l / 2], tag = $edge02)

View File

@ -88,7 +88,7 @@ sketch003 = startSketchOn(offsetPlane(XY, offset = 1))
extrude001 = extrude(sketch003, length = 0.050)
sketch004 = startSketchOn(extrude001, 'END')
sketch004 = startSketchOn(extrude001, END)
|> startProfileAt([0.3, 0.17], %)
|> yLine(length = 1.2)
|> arc({
@ -140,7 +140,7 @@ sketch007 = startSketchOn(offsetPlane(XY, offset = 1.12))
extrude003 = extrude(sketch007, length = 0.050)
// Pattern holes in the spiral plate
sketch008 = startSketchOn(extrude003, 'END')
sketch008 = startSketchOn(extrude003, END)
|> circle(center = [1.4, 0], radius = .3)
|> patternCircular2d(
center = [0, 0],
@ -152,7 +152,7 @@ sketch008 = startSketchOn(extrude003, 'END')
extrude004 = extrude(sketch008, length = -0.050)
// Pattern holes in the spiral plate
sketch009 = startSketchOn(extrude003, 'END')
sketch009 = startSketchOn(extrude003, END)
|> circle(center = [0.6, 0], radius = .2)
|> patternCircular2d(
center = [0, 0],
@ -169,7 +169,7 @@ sketch010 = startSketchOn(XY)
// Perform a shell operation to hollow the carafe body with the top face removed
extrude006 = extrude(sketch010, length = carafeHeight)
|> shell(faces = ["end"], thickness = .07)
|> shell(faces = [END], thickness = .07)
// Draw and revolve the lid
sketch011 = startSketchOn(XZ)

View File

@ -87,7 +87,7 @@ holeRadius = 1
startAngle = asin(keywayWidth / 2 / holeRadius)
// Sketch the keyway and center hole and extrude
keyWay = startSketchOn(body, 'END')
keyWay = startSketchOn(body, END)
|> startProfileAt([
holeRadius * cos(startAngle),
holeRadius * sin(startAngle)

View File

@ -109,7 +109,7 @@ singleBinFill = startSketchOn(XY)
],
)
magCutout000 = startSketchOn(singleBinFill, "start")
magCutout000 = startSketchOn(singleBinFill, START)
|> circle(
center = [
-magOffset - binBaseLength - binTol,
@ -171,7 +171,7 @@ binTop = startSketchOn(offsetPlane(XY, offset = height))
getPreviousAdjacentEdge(line012)
],
)
|> shell(faces = ["end"], thickness = binThk)
|> shell(faces = [END], thickness = binThk)
// Define a function which builds the profile of the baseplate bin
fn lipFace(plane) {

View File

@ -102,7 +102,7 @@ singleBinFill = startSketchOn(XY)
],
)
magCutout000 = startSketchOn(singleBinFill, "start")
magCutout000 = startSketchOn(singleBinFill, START)
|> circle(
center = [
-magOffset - binBaseLength - binTol,
@ -165,4 +165,4 @@ binTop = startSketchOn(offsetPlane(XY, offset = height))
getPreviousAdjacentEdge(line012)
],
)
|> shell(faces = ["end"], thickness = binThk)
|> shell(faces = [END], thickness = binThk)

View File

@ -37,7 +37,7 @@ kitHeadElevation = kitBodyElevation + kitBodyHeight - kitHeadOffset - kitHeadHei
kitHeadWidth = kitBodyWidth - (kitHeadOffset * 2)
kitHeadDepth = 3
kitHead = pixelBox(kitBody, 'END', -kitHeadWidth / 2, kitHeadElevation, kitHeadWidth, kitHeadHeight, kitHeadDepth)
kitHead = pixelBox(kitBody, END, -kitHeadWidth / 2, kitHeadElevation, kitHeadWidth, kitHeadHeight, kitHeadDepth)
kitFaceElevation = kitHeadElevation + 2
// 3. Kitty Face
@ -45,7 +45,7 @@ kitFaceWidth = kitHeadWidth - 4
kitFaceHeight = kitHeadElevation + kitHeadHeight - kitFaceElevation - 3
kitFaceDepth = 2
kitFace = startSketchOn(kitHead, 'END')
kitFace = startSketchOn(kitHead, END)
|> startProfileAt([-kitFaceWidth / 2, kitFaceElevation], %)
|> line(end = [0, 1]) // left lower corner up
|> line(end = [-1, 0]) // left lower corner left
@ -71,14 +71,14 @@ kitEyeHeihgt = kitFaceElevation + 7
kitEyeOffset = 7
// 3.1.2 Kitty Right Eye
kitLeftEye1 = pixelBox(kitFace, 'START', -kitEyeOffset, kitEyeHeihgt, 1, 1, kitEyeDepth)
kitLeftEye1 = pixelBox(kitFace, START, -kitEyeOffset, kitEyeHeihgt, 1, 1, kitEyeDepth)
// 3.2 Kitty Nose
kitLeftEye2 = pixelBox(kitFace, 'START', -kitEyeOffset + 1, kitEyeHeihgt + 1, 3, 1, kitEyeDepth)
kitLeftEye3 = pixelBox(kitFace, 'START', -kitEyeOffset + 4, kitEyeHeihgt, 1, 1, kitEyeDepth)
kitRightEye = pixelBox(kitFace, 'START', kitEyeOffset - 3, kitEyeHeihgt - 1, 2, 4, kitEyeDepth)
kitLeftEye2 = pixelBox(kitFace, START, -kitEyeOffset + 1, kitEyeHeihgt + 1, 3, 1, kitEyeDepth)
kitLeftEye3 = pixelBox(kitFace, START, -kitEyeOffset + 4, kitEyeHeihgt, 1, 1, kitEyeDepth)
kitRightEye = pixelBox(kitFace, START, kitEyeOffset - 3, kitEyeHeihgt - 1, 2, 4, kitEyeDepth)
kitNoseElevation = kitEyeHeihgt - 5
kitNose = startSketchOn(kitFace, 'START')
kitNose = startSketchOn(kitFace, START)
|> startProfileAt([-2, kitNoseElevation], %) // H V
|> line(end = [0, 1]) // lower-left up
|> line(end = [2, 0]) // lower-left right
@ -98,12 +98,12 @@ kitNose = startSketchOn(kitFace, 'START')
// 3.3 Kitty Mouth
kitMouthOffset = 4
kitMouthHeight = kitEyeHeihgt - 3
kitMouthUpLeft = pixelBox(kitFace, 'START', -kitMouthOffset, kitMouthHeight, 1, 1, kitEyeDepth)
kitMouthUpLeft = pixelBox(kitFace, START, -kitMouthOffset, kitMouthHeight, 1, 1, kitEyeDepth)
// 4. Kitty Belly
kitMouthDownLeft = pixelBox(kitFace, 'START', -kitMouthOffset + 1, kitMouthHeight - 1, 1, 1, kitEyeDepth)
kitMouthUpRight = pixelBox(kitFace, 'START', kitMouthOffset, kitMouthHeight, 1, 1, kitEyeDepth)
kitMouthDownRight = pixelBox(kitFace, 'START', kitMouthOffset - 1, kitMouthHeight - 1, 1, 1, kitEyeDepth)
kitMouthDownLeft = pixelBox(kitFace, START, -kitMouthOffset + 1, kitMouthHeight - 1, 1, 1, kitEyeDepth)
kitMouthUpRight = pixelBox(kitFace, START, kitMouthOffset, kitMouthHeight, 1, 1, kitEyeDepth)
kitMouthDownRight = pixelBox(kitFace, START, kitMouthOffset - 1, kitMouthHeight - 1, 1, 1, kitEyeDepth)
kitBellyElevation = kitBodyElevation + 1
kitBellyHeight = kitHeadElevation - kitBellyElevation - 1
@ -111,7 +111,7 @@ kitBellyHeight = kitHeadElevation - kitBellyElevation - 1
// 4.1 Kitty VHS
kitBellyWidth = kitHeadWidth
kitBellyDepth = kitHeadDepth
kitBelly = pixelBox(kitBody, 'END', -kitBellyWidth / 2, kitBellyElevation, kitBellyWidth, kitBellyHeight, kitBellyDepth)
kitBelly = pixelBox(kitBody, END, -kitBellyWidth / 2, kitBellyElevation, kitBellyWidth, kitBellyHeight, kitBellyDepth)
kitVHSelevation = kitBellyElevation + 1
kitVHSheight = 2
@ -119,7 +119,7 @@ kitVHSheight = 2
// 4.2 Kitty Floppy
kitVHSwidth = 8
kitVHSdepth = 1
kitVHS = pixelBox(kitBelly, 'END', -kitVHSwidth / 2, kitVHSelevation, kitVHSwidth, kitVHSheight, kitVHSdepth)
kitVHS = pixelBox(kitBelly, END, -kitVHSwidth / 2, kitVHSelevation, kitVHSwidth, kitVHSheight, kitVHSdepth)
kitFloppyElevation = kitBellyElevation + 1
kitFloppyHeight = 1
@ -128,9 +128,9 @@ kitFloppyOffset = kitBellyWidth / 2 - 1
kitFloppyDepth = 2
// 4.3 Kitty Belly Button
kitFloppy1 = pixelBox(kitBelly, 'END', -kitFloppyOffset, kitFloppyElevation, kitFloppyWidth, kitFloppyHeight, -kitFloppyDepth)
kitFloppy2 = pixelBox(kitBelly, 'END', -kitFloppyOffset, kitFloppyElevation + 2, kitFloppyWidth, kitFloppyHeight, -kitFloppyDepth)
kitFloppy3 = pixelBox(kitBelly, 'END', kitFloppyOffset, kitFloppyElevation, -kitFloppyWidth, kitFloppyHeight, -kitFloppyDepth)
kitFloppy1 = pixelBox(kitBelly, END, -kitFloppyOffset, kitFloppyElevation, kitFloppyWidth, kitFloppyHeight, -kitFloppyDepth)
kitFloppy2 = pixelBox(kitBelly, END, -kitFloppyOffset, kitFloppyElevation + 2, kitFloppyWidth, kitFloppyHeight, -kitFloppyDepth)
kitFloppy3 = pixelBox(kitBelly, END, kitFloppyOffset, kitFloppyElevation, -kitFloppyWidth, kitFloppyHeight, -kitFloppyDepth)
kitBellyButtonOffset = kitHeadWidth / 2 - 3
kitBellyButtonElevation = kitHeadElevation - 1
@ -139,18 +139,18 @@ kitBellyButtonWidth = 2
// 4.4 Kitty Buttons
kitBellyButtonHeight = 1
kitBellyButtonDepth = kitHeadDepth + 1
kitBellyButton = pixelBox(kitBody, 'END', -kitBellyButtonOffset, kitBellyButtonElevation, kitBellyButtonWidth, kitBellyButtonHeight, kitBellyButtonDepth)
kitBellyButton = pixelBox(kitBody, END, -kitBellyButtonOffset, kitBellyButtonElevation, kitBellyButtonWidth, kitBellyButtonHeight, kitBellyButtonDepth)
kitButtonWidth = 1
kitButtonHeight = 2
kitButtonDepth = kitFloppyDepth
kitButtonElevation = kitFloppyElevation + 2
kitButton1 = pixelBox(kitBelly, 'END', kitFloppyOffset, kitFloppyElevation + 2, -kitButtonWidth, kitButtonHeight, -kitButtonDepth)
kitButton1 = pixelBox(kitBelly, END, kitFloppyOffset, kitFloppyElevation + 2, -kitButtonWidth, kitButtonHeight, -kitButtonDepth)
// 5. Kitty Legs
kitButton2 = pixelBox(kitBelly, 'END', kitFloppyOffset - kitButtonWidth - 1, kitFloppyElevation + 2, -kitButtonWidth, kitButtonHeight, -kitButtonDepth)
kitButton3 = pixelBox(kitBelly, 'END', kitFloppyOffset - (2 * (kitButtonWidth + 1)), kitFloppyElevation + 2, -kitButtonWidth, kitButtonHeight, -kitButtonDepth)
kitButton2 = pixelBox(kitBelly, END, kitFloppyOffset - kitButtonWidth - 1, kitFloppyElevation + 2, -kitButtonWidth, kitButtonHeight, -kitButtonDepth)
kitButton3 = pixelBox(kitBelly, END, kitFloppyOffset - (2 * (kitButtonWidth + 1)), kitFloppyElevation + 2, -kitButtonWidth, kitButtonHeight, -kitButtonDepth)
kitShoeWidth = 7
kitShoeLength = 10
@ -175,7 +175,7 @@ fn kitLeg(offsetFront, offsetSide) {
kitPantsFrontWidth = kitPantsWidth
kitPantsHeight = kitBodyElevation - kitShoeHeight
kitPants = pixelBox(kitShoe, 'END', kitPantsOffsetSide, kitPantsOffsetFront, kitPantsFrontWidth, kitPantsWidth, kitPantsHeight)
kitPants = pixelBox(kitShoe, END, kitPantsOffsetSide, kitPantsOffsetFront, kitPantsFrontWidth, kitPantsWidth, kitPantsHeight)
return kitShoe
}
@ -195,13 +195,13 @@ fn kitEar(earOffsetFront, earOffsetSide) {
baseVolume = pixelBox(kitBody, seg01, kitNewEarOffsetSide, kitNewEarOffsetFront, kitEarWidth, -kitEarDepth, kitEarHeight)
secondOffset = 1
secondLevel = pixelBox(baseVolume, 'END', kitNewEarOffsetSide + secondOffset, kitNewEarOffsetFront - 0.01, kitEarWidth - (secondOffset * 2), -kitEarDepth + secondOffset * 2, kitEarHeight)
secondLevel = pixelBox(baseVolume, END, kitNewEarOffsetSide + secondOffset, kitNewEarOffsetFront - 0.01, kitEarWidth - (secondOffset * 2), -kitEarDepth + secondOffset * 2, kitEarHeight)
thirdOffset = 2
thirdLevel = pixelBox(secondLevel, 'END', kitNewEarOffsetSide + thirdOffset, kitNewEarOffsetFront - 0.02, kitEarWidth - (thirdOffset * 2), -kitEarDepth + thirdOffset * 2, kitEarHeight)
thirdLevel = pixelBox(secondLevel, END, kitNewEarOffsetSide + thirdOffset, kitNewEarOffsetFront - 0.02, kitEarWidth - (thirdOffset * 2), -kitEarDepth + thirdOffset * 2, kitEarHeight)
fourthOffset = 3
fourthLevel = pixelBox(thirdLevel, 'END', kitNewEarOffsetSide + fourthOffset, kitNewEarOffsetFront - 0.03, kitEarWidth - (fourthOffset * 2), -kitEarDepth + fourthOffset * 2, kitEarHeight)
fourthLevel = pixelBox(thirdLevel, END, kitNewEarOffsetSide + fourthOffset, kitNewEarOffsetFront - 0.03, kitEarWidth - (fourthOffset * 2), -kitEarDepth + fourthOffset * 2, kitEarHeight)
return baseVolume
}

View File

@ -35,7 +35,7 @@ base = startSketchOn(XY)
|> extrude(length = height)
// Sketch and extrude a rectangular shape to create the shell underneath the lego. Will replace with shell function when able to call a face created from shell.
shellExtrude = startSketchOn(base, "start")
shellExtrude = startSketchOn(base, START)
|> startProfileAt([
-(totalWidth / 2 - t),
-(totalLength / 2 - t)
@ -47,7 +47,7 @@ shellExtrude = startSketchOn(base, "start")
|> extrude(length = -(height - t))
// Create the pegs on the top of the base
peg = startSketchOn(base, 'end')
peg = startSketchOn(base, END)
|> circle(
center = [
-(pitch * (wbumps - 1) / 2),
@ -60,7 +60,7 @@ peg = startSketchOn(base, 'end')
|> extrude(length = bumpHeight)
// Create the pegs on the bottom of the base
tubePattern = startSketchOn(shellExtrude, 'start')
tubePattern = startSketchOn(shellExtrude, START)
|> circle(
center = [
-(pitch * (wbumps - 1) / 2 - (pitch / 2)),

View File

@ -26,16 +26,16 @@ extrude001 = extrude(sketch001, length = basePlateThickness)
)
// Base Motor for actuating first joint
sketch002 = startSketchOn(extrude001, 'END')
sketch002 = startSketchOn(extrude001, END)
|> circle(center = [0, 0], radius = 4, tag = $referenceEdge)
extrude002 = extrude(sketch002, length = baseHeight - basePlateThickness - 1.5)
|> fillet(radius = 0.1, tags = [getOppositeEdge(referenceEdge)])
sketch003 = startSketchOn(extrude002, 'END')
sketch003 = startSketchOn(extrude002, END)
|> circle(center = [0, 0], radius = 0.5)
extrude003 = extrude(sketch003, length = 1)
// Pattern M8 mounting bolts in base
sketch4A = startSketchOn(extrude001, 'END')
sketch4A = startSketchOn(extrude001, END)
|> circle(
center = [
-basePlateRadius + 1,
@ -52,7 +52,7 @@ sketch4A = startSketchOn(extrude001, 'END')
extrude4A = extrude(sketch4A, length = -basePlateThickness)
sketch4B = startSketchOn(extrude001, 'END')
sketch4B = startSketchOn(extrude001, END)
|> circle(
center = [
-basePlateRadius + 0.5 + baseChamfer,

View File

@ -26,12 +26,12 @@ sketch011 = startSketchOn(plane003)
|> close()
extrude011 = extrude(sketch011, length = -axisJ2ArmThickness)
sketch012 = startSketchOn(extrude011, 'START')
sketch012 = startSketchOn(extrude011, START)
|> circle(center = [-1.75, 8], radius = 1.9, tag = $referenceEdge4)
extrude012 = extrude(sketch012, length = 0.15)
|> fillet(radius = 0.1, tags = [getOppositeEdge(referenceEdge4)])
sketch013 = startSketchOn(extrude011, 'START')
sketch013 = startSketchOn(extrude011, START)
|> circle(
center = [
-1.75 - (axisJ2ArmLength * cos(toRadians(axisJ2))),
@ -45,7 +45,7 @@ extrude013 = extrude(sketch013, length = 1)
|> fillet(radius = 0.1, tags = [getOppositeEdge(referenceEdge5)])
// Draw Bolt Patterns on J2 Robot Arm
sketch014 = startSketchOn(extrude012, 'END')
sketch014 = startSketchOn(extrude012, END)
|> circle(center = [-1.75, 6.75], radius = 0.2)
|> patternCircular2d(
center = [-1.75, 8],
@ -56,7 +56,7 @@ sketch014 = startSketchOn(extrude012, 'END')
extrude014 = extrude(sketch014, length = 0.15)
sketch015 = startSketchOn(extrude013, 'END')
sketch015 = startSketchOn(extrude013, END)
|> circle(
center = [
-1.75 - ((axisJ2ArmLength - 1) * cos(toRadians(axisJ2))),
@ -76,7 +76,7 @@ sketch015 = startSketchOn(extrude013, 'END')
extrude015 = extrude(sketch015, length = 0.15)
sketch016 = startSketchOn(extrude011, 'END')
sketch016 = startSketchOn(extrude011, END)
|> circle(
center = [
1.75 + axisJ2ArmLength * cos(toRadians(axisJ2)),

View File

@ -26,7 +26,7 @@ sketch017 = startSketchOn(plane002)
|> close()
extrude017 = extrude(sketch017, length = axisJ3CArmThickness)
sketch018 = startSketchOn(extrude017, 'END')
sketch018 = startSketchOn(extrude017, END)
|> circle(
center = [
1.75 + axisJ2ArmLength * cos(toRadians(axisJ2)),
@ -40,7 +40,7 @@ extrude018 = extrude(sketch018, length = 0.15)
|> fillet(radius = 0.1, tags = [getOppositeEdge(referenceEdge6)])
// Draw Bolt Pattern on J3 Robot Arm
sketch019 = startSketchOn(extrude018, 'END')
sketch019 = startSketchOn(extrude018, END)
|> circle(
center = [
1.75 + (axisJ2ArmLength - 1) * cos(toRadians(axisJ2)),
@ -61,7 +61,7 @@ sketch019 = startSketchOn(extrude018, 'END')
extrude019 = extrude(sketch019, length = 0.15)
// On the J3 Robot Arm Body, Create Mounting Clevis for Grabber Claw
sketch020 = startSketchOn(extrude017, 'START')
sketch020 = startSketchOn(extrude017, START)
|> circle(
center = [
-1.75 - (axisJ2ArmLength * cos(toRadians(axisJ2))) - (axisJ3CArmLength * cos(toRadians(axisJ3C))),
@ -71,7 +71,7 @@ sketch020 = startSketchOn(extrude017, 'START')
)
extrude020 = extrude(sketch020, length = -0.5)
sketch021 = startSketchOn(extrude017, 'END')
sketch021 = startSketchOn(extrude017, END)
|> circle(
center = [
1.75 + axisJ2ArmLength * cos(toRadians(axisJ2)) + axisJ3CArmLength * cos(toRadians(axisJ3C)),
@ -85,13 +85,13 @@ extrude021 = extrude(sketch021, length = -0.5)
// Define Grabber Claw Constants
grabberLength = 7
sketch022 = startSketchOn(extrude021, 'START')
sketch022 = startSketchOn(extrude021, START)
|> circle(center = [0, 0], radius = 0.10)
extrude022 = extrude(sketch022, length = -0.01)
// Build Upper Claw Finger
sketch023 = startSketchOn(extrude022, 'START')
sketch023 = startSketchOn(extrude022, START)
|> startProfileAt([
1.75 + axisJ2ArmLength * cos(toRadians(axisJ2)) + axisJ3CArmLength * cos(toRadians(axisJ3C)),
8 + axisJ2ArmLength * sin(toRadians(axisJ2)) + axisJ3CArmLength * sin(toRadians(axisJ3C))
@ -112,7 +112,7 @@ sketch023 = startSketchOn(extrude022, 'START')
extrude023 = extrude(sketch023, length = -1.5)
// Build Lower Claw Finger
sketch024 = startSketchOn(extrude022, 'START')
sketch024 = startSketchOn(extrude022, START)
|> startProfileAt([
1.75 + axisJ2ArmLength * cos(toRadians(axisJ2)) + axisJ3CArmLength * cos(toRadians(axisJ3C)),
8 + axisJ2ArmLength * sin(toRadians(axisJ2)) + axisJ3CArmLength * sin(toRadians(axisJ3C))

View File

@ -26,7 +26,7 @@ sketch006 = startSketchOn(plane002)
extrude006 = extrude(sketch006, length = 1)
sketch007 = startSketchOn(extrude006, 'END')
sketch007 = startSketchOn(extrude006, END)
|> circle(
center = [
1.75 * cos(toRadians(axisJ1)) / abs(cos(toRadians(axisJ1))),
@ -39,7 +39,7 @@ extrude007 = extrude(sketch007, length = 1.5)
|> fillet(radius = 0.1, tags = [getOppositeEdge(referenceEdge2)])
// Draw Bolt Pattern on Rotating Base
sketch008 = startSketchOn(extrude007, 'END')
sketch008 = startSketchOn(extrude007, END)
|> circle(
center = [
1.75 * cos(toRadians(axisJ1)) / abs(cos(toRadians(axisJ1))),
@ -58,7 +58,7 @@ sketch008 = startSketchOn(extrude007, 'END')
)
extrude008 = extrude(sketch008, length = 0.2)
sketch009 = startSketchOn(extrude007, 'END')
sketch009 = startSketchOn(extrude007, END)
|> circle(
center = [
1.75 * cos(toRadians(axisJ1)) / abs(cos(toRadians(axisJ1))),

View File

@ -22,7 +22,7 @@ body = startSketchOn(XY)
|> line(endAbsolute = [-width / 2, length / 2])
|> close()
|> extrude(length = height)
counterBoreHoles = startSketchOn(body, 'end')
counterBoreHoles = startSketchOn(body, END)
|> circle(
center = [
-(width / 2 - (padding / 2)),
@ -34,7 +34,7 @@ counterBoreHoles = startSketchOn(body, 'end')
|> patternLinear2d(instances = 2, distance = width - padding, axis = [1, 0])
|> extrude(%, length = -cbDepth)
boltHoles = startSketchOn(body, 'start')
boltHoles = startSketchOn(body, START)
|> circle(
center = [
-(width / 2 - (padding / 2)),
@ -46,6 +46,6 @@ boltHoles = startSketchOn(body, 'start')
|> patternLinear2d(instances = 2, distance = width - padding, axis = [1, 0])
|> extrude(length = -height + cbDepth)
centerHole = startSketchOn(body, 'end')
centerHole = startSketchOn(body, END)
|> circle(center = [0, 0], radius = bearingDia / 2)
|> extrude(length = -height)

View File

@ -15,7 +15,7 @@ export fn pipe() {
|> extrude(%, length = pipeLength)
// Extrude a hole through the length of the pipe
pipe = startSketchOn(pipeBase, 'end')
pipe = startSketchOn(pipeBase, END)
|> circle(center = [0, 0], radius = pipeInnerDiameter / 2)
|> extrude(%, length = -pipeLength)
|> appearance(color = "#a24ed0")

View File

@ -27,15 +27,15 @@ export fn flange() {
|> extrude(%, length = flangeBaseThickness)
// Create both the raised portions on the front and back of the flange base
flangeBack = startSketchOn(flangeBase, 'start')
flangeBack = startSketchOn(flangeBase, START)
|> circle(%, center = [0, 0], radius = flangeBackDiameter / 2)
|> extrude(%, length = flangeBackHeight)
flangeFront = startSketchOn(flangeBase, 'end')
flangeFront = startSketchOn(flangeBase, END)
|> circle(%, center = [0, 0], radius = flangeFrontDiameter / 2)
|> extrude(%, length = flangeFrontHeight)
// Create the circular cut in the center for the pipe
pipeCut = startSketchOn(flangeFront, 'end')
pipeCut = startSketchOn(flangeFront, END)
|> circle(%, center = [0, 0], radius = pipeDiameter / 2)
|> extrude(%, length = -flangeTotalThickness)
|> appearance(%, color = "#bab0b0")

View File

@ -16,7 +16,7 @@ export fn bolt() {
|> fillet(radius = 0.020, tags = [topEdge, getOppositeEdge(topEdge)])
// Define the sketch of the hex pattern on the screw head and extrude into the head
hexPatternSketch = startSketchOn(boltHead, 'start')
hexPatternSketch = startSketchOn(boltHead, START)
|> startProfileAt([
boltHexDrive / 2,
boltHexFlatLength / 2
@ -30,7 +30,7 @@ export fn bolt() {
|> extrude(length = -boltHeadLength * 0.75)
// create the body of the bolt
boltBody = startSketchOn(boltHead, 'end')
boltBody = startSketchOn(boltHead, END)
|> circle(center = [0, 0], radius = boltDiameter / 2, tag = $filletEdge)
|> extrude(length = boltLength)
|> appearance(color = "#4dd043", metalness = 90, roughness = 90)

View File

@ -13,7 +13,7 @@ gasketBase = startSketchOn(XY)
|> extrude(%, length = gasketThickness)
// Extrude a circular hole through the gasket base
startSketchOn(gasketBase, 'end')
startSketchOn(gasketBase, END)
|> circle(%, center = [0, 0], radius = gasketInnerDiameter / 2)
|> extrude(%, length = -gasketThickness)
|> appearance(%, color = "#d0cb3e")

View File

@ -24,7 +24,7 @@ export fn hexNut() {
|> extrude(length = hexNutThickness)
// Create the hole in the center of the hex nut
hexNut = startSketchOn(hexNutBase, 'end')
hexNut = startSketchOn(hexNutBase, END)
|> circle(center = [0, 0], radius = hexNutDiameter / 2)
|> extrude(%, length = -hexNutThickness)
|> appearance(%, color = "#4edfd5")

View File

@ -15,7 +15,7 @@ export fn washer() {
|> extrude(length = washerThickness)
// Extrude a hole through the washer
washer = startSketchOn(washerBase, 'end')
washer = startSketchOn(washerBase, END)
|> circle(center = [0, 0], radius = washerInnerDia / 2)
|> extrude(%, length = -washerThickness)
|> appearance(%, color = "#ee4f4f")

View File

@ -15,7 +15,7 @@ pipeBase = startSketchOn(XZ)
|> extrude(%, length = pipeLength)
// Extrude a hole through the length of the pipe
pipe = startSketchOn(pipeBase, 'end')
pipe = startSketchOn(pipeBase, END)
|> circle(center = [0, 0], radius = pipeInnerDiameter / 2)
|> extrude(%, length = -pipeLength)
|> appearance(color = "#a24ed0")

View File

@ -75,7 +75,7 @@ sketch003 = startSketchOn(customPlane)
|> extrude(length = wallThickness)
// Create the right side wall of the tub
sketch004 = startSketchOn(sketch002, 'END')
sketch004 = startSketchOn(sketch002, END)
|> startProfileAt([0, 0], %)
|> yLine(endAbsolute = height)
|> xLine(endAbsolute = wallThickness)
@ -127,7 +127,7 @@ sketch006 = startSketchOn(sketch005, seg03)
|> close()
|> extrude(length = wallThickness)
sketch007 = startSketchOn(sketch004, 'END')
sketch007 = startSketchOn(sketch004, END)
|> startProfileAt([0, 0], %)
|> xLine(endAbsolute = wallThickness)
|> yLine(endAbsolute = height)

View File

@ -54,7 +54,7 @@ sketch001 = startSketchOn(XZ)
extrude001 = extrude(sketch001, length = 5)
// Create the second sketch
sketch002 = startSketchOn(extrude001, 'START')
sketch002 = startSketchOn(extrude001, START)
|> startProfileAt([distanceToInsideEdge, 0], %)
|> angledLine(angle = 180, length = templateThickness, tag = $rectangleSegmentA002)
|> angledLine(angle = segAng(rectangleSegmentA002) + 90, length = templateThickness, tag = $rectangleSegmentB002)
@ -66,7 +66,7 @@ sketch002 = startSketchOn(extrude001, 'START')
extrude002 = extrude(sketch002, length = 13)
// Create the third sketch
sketch003 = startSketchOn(extrude001, 'START')
sketch003 = startSketchOn(extrude001, START)
|> startProfileAt([-distanceToInsideEdge, 0], %)
|> angledLine(angle = 0, length = templateThickness, tag = $rectangleSegmentA001)
|> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = templateThickness, tag = $rectangleSegmentB001)
@ -78,7 +78,7 @@ sketch003 = startSketchOn(extrude001, 'START')
extrude003 = extrude(sketch003, length = 13)
// Create the fourth sketch
sketch004 = startSketchOn(extrude002, 'END')
sketch004 = startSketchOn(extrude002, END)
|> startProfileAt([-distanceToInsideEdge, 0], %)
|> angledLine(angle = 0, length = distanceToInsideEdge * 2, tag = $rectangleSegmentA003)
|> angledLine(angle = segAng(rectangleSegmentA003) - 90, length = templateThickness, tag = $rectangleSegmentB003)

View File

@ -48,7 +48,7 @@ sketch001 = startSketchOn(XZ)
extrude001 = extrude(sketch001, length = 5)
// Create the second sketch
sketch002 = startSketchOn(extrude001, 'START')
sketch002 = startSketchOn(extrude001, START)
|> startProfileAt([
-slateWidthHalf,
-templateGap * 2 - (templateDiameter / 2)
@ -63,7 +63,7 @@ sketch002 = startSketchOn(extrude001, 'START')
extrude002 = extrude(sketch002, length = 7.5)
// Create the third sketch
sketch003 = startSketchOn(extrude001, 'START')
sketch003 = startSketchOn(extrude001, START)
|> startProfileAt([
slateWidthHalf,
-templateGap * 2 - (templateDiameter / 2)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 118 KiB

View File

@ -19,7 +19,7 @@ boltHead = startSketchOn(XZ)
|> fillet(radius = 0.020, tags = [topEdge, getOppositeEdge(topEdge)])
// Define the sketch of the hex pattern on the screw head
hexPatternSketch = startSketchOn(boltHead, 'start')
hexPatternSketch = startSketchOn(boltHead, START)
|> startProfileAt([
boltHexDrive / 2,
boltHexFlatLength / 2
@ -31,7 +31,7 @@ hexPatternSketch = startSketchOn(boltHead, 'start')
|> angledLine(angle = 30, length = boltHexFlatLength)
|> close()
|> extrude(length = -boltHeadLength * 0.75)
boltBody = startSketchOn(boltHead, 'end')
boltBody = startSketchOn(boltHead, END)
|> circle(center = [0, 0], radius = boltDiameter / 2, tag = $filletEdge)
|> extrude(length = boltLength)
|> fillet(radius = .020, tags = [getOppositeEdge(filletEdge)])

View File

@ -26,7 +26,7 @@ body = startSketchOn(XZ)
)
// Cut out the indentation for the case
caseIndentSketch = startSketchOn(body, 'END')
caseIndentSketch = startSketchOn(body, END)
|> startProfileAt([
-width / 2 + offset,
height / 2 - (chamferLength + offset / 2 * cos(toRadians(45)))
@ -51,7 +51,7 @@ caseIndentSketch = startSketchOn(body, 'END')
extrude002 = extrude(caseIndentSketch, length = -0.0625)
// Create the pocket for the screen
screenCutout = startSketchOn(extrude002, 'start')
screenCutout = startSketchOn(extrude002, START)
|> startProfileAt([-screenWidth / 2, screenYPosition], %)
|> xLine(length = screenWidth, tag = $seg01)
|> yLine(length = -screenHeight)
@ -61,7 +61,7 @@ screenCutout = startSketchOn(extrude002, 'start')
extrude003 = extrude(screenCutout, length = screenDepth)
// Create the speaker box
speakerBox = startSketchOn(extrude002, 'start')
speakerBox = startSketchOn(extrude002, START)
|> startProfileAt([-1.25 / 2, -.125], %)
|> xLine(length = speakerBoxWidth)
|> yLine(length = -speakerBoxHeight)