KCL: Convert x/y lines to use keyword arguments (#5615)
Previously, `xLine`, `xLineTo`, `yLine` and `yLineTo` used positional arguments. Now: - `xLineTo` and `yLineTo` have been removed - `xLine` and `yLine` both use keyword arguments: - `length`, optional (i.e. a relative distance along the X or Y axis) - `endAbsolute` optional (i.e. an absolute point along the X or Y axis) - `tag` optional - Exactly one of `length` or `endAbsolute` must be given. Not both, not neither. For example: ``` // Old way |> xLine(6.04, %) |> yLineTo(20, %, $base) // New way |> xLine(length = 6.04) |> yLine(endAbsolute = 20, tag = $base) ``` This also improves some of the general-purpose keyword arguments code in modeling app's TS codebase.
This commit is contained in:
@ -14,11 +14,11 @@ fn dividerSketch(plane) {
|
||||
|> tangentialArcTo([-16.6, profileStartY(%) - 15.52], %)
|
||||
|> tangentialArcTo([-18.38, profileStartY(%) - 18.63], %)
|
||||
|> line(end = [-1.25, -2.6])
|
||||
|> xLine(6.04, %)
|
||||
|> xLine(length = 6.04)
|
||||
|> line(end = [6.68, 7.87])
|
||||
|> tangentialArcTo([10.06, profileStartY(%) - 12.69], %)
|
||||
|> line(end = [7.28, -8.47])
|
||||
|> xLine(5.98, %)
|
||||
|> xLine(length = 5.98)
|
||||
|> line(end = [-1.3, 3.01])
|
||||
|> tangentialArcTo([22.45, profileStartY(%) - 2.84], %)
|
||||
|> tangentialArcTo([25.08, profileStartY(%) + 6.42], %)
|
||||
@ -106,7 +106,7 @@ export fn backSlats(plane, length) {
|
||||
fn armRestPath(plane) {
|
||||
sketch005 = startSketchOn(plane)
|
||||
|> startProfileAt([20, 33], %)
|
||||
|> xLine(-20, %)
|
||||
|> xLine(length = -20)
|
||||
|> arc({
|
||||
angleStart = 90,
|
||||
angleEnd = 180,
|
||||
@ -118,10 +118,10 @@ fn armRestPath(plane) {
|
||||
fn armRestProfile(plane, offset) {
|
||||
sketch006 = startSketchOn(plane)
|
||||
|> startProfileAt([offset, 32.4], %)
|
||||
|> xLine(1.3, %)
|
||||
|> xLine(length = 1.3)
|
||||
|> line(end = [0.3, 0.6])
|
||||
|> line(end = [-0.3, 0.6])
|
||||
|> xLine(-2.6, %)
|
||||
|> xLine(length = -2.6)
|
||||
|> line(end = [-0.3, -0.6])
|
||||
|> line(end = [0.3, -0.6])
|
||||
|> close()
|
||||
|
||||
@ -22,33 +22,33 @@ fn rail8020(originStart, railHeight, railLength) {
|
||||
angleEnd = 0,
|
||||
radius = 0.072 / 4 * railHeight
|
||||
}, %)
|
||||
|> xLine(0.1 * railHeight, %)
|
||||
|> xLine(length = 0.1 * railHeight)
|
||||
|> arc({
|
||||
angleStart = 180,
|
||||
angleEnd = 0,
|
||||
radius = 0.072 / 4 * railHeight
|
||||
}, %)
|
||||
|> xLine(0.06 * railHeight, %, $edge1)
|
||||
|> yLine(0.087 * railHeight, %, $edge2)
|
||||
|> xLine(-0.183 * railHeight, %, $edge3)
|
||||
|> xLine(length = 0.06 * railHeight, tag = $edge1)
|
||||
|> yLine(length = 0.087 * railHeight, tag = $edge2)
|
||||
|> xLine(length = -0.183 * railHeight, tag = $edge3)
|
||||
|> angledLineToY({
|
||||
angle = 45,
|
||||
to = (1 - 0.356) / 2 * railHeight + originStart[1]
|
||||
}, %, $edge4)
|
||||
|> xLine(0.232 * railHeight, %, $edge5)
|
||||
|> xLine(length = 0.232 * railHeight, tag = $edge5)
|
||||
|> angledLineToY({
|
||||
angle = -45,
|
||||
to = 0.087 * railHeight + originStart[1]
|
||||
}, %, $edge6)
|
||||
|> xLine(-0.183 * railHeight, %, $edge7)
|
||||
|> yLine(-0.087 * railHeight, %, $edge8)
|
||||
|> xLine(0.06 * railHeight, %)
|
||||
|> xLine(length = -0.183 * railHeight, tag = $edge7)
|
||||
|> yLine(length = -0.087 * railHeight, tag = $edge8)
|
||||
|> xLine(length = 0.06 * railHeight)
|
||||
|> arc({
|
||||
angleStart = 180,
|
||||
angleEnd = 0,
|
||||
radius = 0.072 / 4 * railHeight
|
||||
}, %)
|
||||
|> xLine(0.1 * railHeight, %)
|
||||
|> xLine(length = 0.1 * railHeight)
|
||||
|> arc({
|
||||
angleStart = 180,
|
||||
angleEnd = 0,
|
||||
@ -66,33 +66,33 @@ fn rail8020(originStart, railHeight, railLength) {
|
||||
angleEnd = 90,
|
||||
radius = 0.072 / 4 * railHeight
|
||||
}, %)
|
||||
|> yLine(0.1 * railHeight, %)
|
||||
|> yLine(length = 0.1 * railHeight)
|
||||
|> arc({
|
||||
angleStart = 270,
|
||||
angleEnd = 90,
|
||||
radius = 0.072 / 4 * railHeight
|
||||
}, %)
|
||||
|> yLine(0.06 * railHeight, %, $edge9)
|
||||
|> xLine(-0.087 * railHeight, %, $edge10)
|
||||
|> yLine(-0.183 * railHeight, %, $edge11) // edge11
|
||||
|> yLine(length = 0.06 * railHeight, tag = $edge9)
|
||||
|> xLine(length = -0.087 * railHeight, tag = $edge10)
|
||||
|> yLine(length = -0.183 * railHeight, tag = $edge11) // edge11
|
||||
|> angledLineToX({
|
||||
angle = 135,
|
||||
to = ((1 - 0.356) / 2 + 0.356) * railHeight + originStart[0]
|
||||
}, %, $edge12) // edge12
|
||||
|> yLine(0.232 * railHeight, %, $edge13) // 13
|
||||
|> yLine(length = 0.232 * railHeight, tag = $edge13) // 13
|
||||
|> angledLineToX({
|
||||
angle = 45,
|
||||
to = (1 - 0.087) * railHeight + originStart[0]
|
||||
}, %, $edge14) // 14
|
||||
|> yLine(-0.183 * railHeight, %, $edge15) // 15
|
||||
|> xLine(0.087 * railHeight, %, $edge16)
|
||||
|> yLine(0.06 * railHeight, %)
|
||||
|> yLine(length = -0.183 * railHeight, tag = $edge15) // 15
|
||||
|> xLine(length = 0.087 * railHeight, tag = $edge16)
|
||||
|> yLine(length = 0.06 * railHeight)
|
||||
|> arc({
|
||||
angleStart = 270,
|
||||
angleEnd = 90,
|
||||
radius = 0.072 / 4 * railHeight
|
||||
}, %)
|
||||
|> yLine(0.1 * railHeight, %)
|
||||
|> yLine(length = 0.1 * railHeight)
|
||||
|> arc({
|
||||
angleStart = 270,
|
||||
angleEnd = 90,
|
||||
@ -110,33 +110,33 @@ fn rail8020(originStart, railHeight, railLength) {
|
||||
angleEnd = -180,
|
||||
radius = 0.072 / 4 * railHeight
|
||||
}, %)
|
||||
|> xLine(-0.1 * railHeight, %)
|
||||
|> xLine(length = -0.1 * railHeight)
|
||||
|> arc({
|
||||
angleStart = 0,
|
||||
angleEnd = -180,
|
||||
radius = 0.072 / 4 * railHeight
|
||||
}, %)
|
||||
|> xLine(-0.06 * railHeight, %, $edge17)
|
||||
|> yLine(-0.087 * railHeight, %, $edge18)
|
||||
|> xLine(0.183 * railHeight, %, $edge19)
|
||||
|> xLine(length = -0.06 * railHeight, tag = $edge17)
|
||||
|> yLine(length = -0.087 * railHeight, tag = $edge18)
|
||||
|> xLine(length = 0.183 * railHeight, tag = $edge19)
|
||||
|> angledLineToY({
|
||||
angle = 45,
|
||||
to = ((1 - 0.356) / 2 + 0.356) * railHeight + originStart[1]
|
||||
}, %, $edge20)
|
||||
|> xLine(-0.232 * railHeight, %, $edge21)
|
||||
|> xLine(length = -0.232 * railHeight, tag = $edge21)
|
||||
|> angledLineToY({
|
||||
angle = 135,
|
||||
to = (1 - 0.087) * railHeight + originStart[1]
|
||||
}, %, $edge22)
|
||||
|> xLine(0.183 * railHeight, %, $edge23)
|
||||
|> yLine(0.087 * railHeight, %, $edge24)
|
||||
|> xLine(-0.06 * railHeight, %)
|
||||
|> xLine(length = 0.183 * railHeight, tag = $edge23)
|
||||
|> yLine(length = 0.087 * railHeight, tag = $edge24)
|
||||
|> xLine(length = -0.06 * railHeight)
|
||||
|> arc({
|
||||
angleStart = 0,
|
||||
angleEnd = -180,
|
||||
radius = 0.072 / 4 * railHeight
|
||||
}, %)
|
||||
|> xLine(-0.1 * railHeight, %)
|
||||
|> xLine(length = -0.1 * railHeight)
|
||||
|> arc({
|
||||
angleStart = 0,
|
||||
angleEnd = -180,
|
||||
@ -154,33 +154,33 @@ fn rail8020(originStart, railHeight, railLength) {
|
||||
angleEnd = -90,
|
||||
radius = 0.072 / 4 * railHeight
|
||||
}, %)
|
||||
|> yLine(-0.1 * railHeight, %)
|
||||
|> yLine(length = -0.1 * railHeight)
|
||||
|> arc({
|
||||
angleStart = 90,
|
||||
angleEnd = -90,
|
||||
radius = 0.072 / 4 * railHeight
|
||||
}, %)
|
||||
|> yLine(-0.06 * railHeight, %, $edge25)
|
||||
|> xLine(0.087 * railHeight, %, $edge26)
|
||||
|> yLine(0.183 * railHeight, %, $edge27)
|
||||
|> yLine(length = -0.06 * railHeight, tag = $edge25)
|
||||
|> xLine(length = 0.087 * railHeight, tag = $edge26)
|
||||
|> yLine(length = 0.183 * railHeight, tag = $edge27)
|
||||
|> angledLineToX({
|
||||
angle = 135,
|
||||
to = (1 - 0.356) / 2 * railHeight + originStart[0]
|
||||
}, %, $edge28)
|
||||
|> yLine(-0.232 * railHeight, %, $edge29)
|
||||
|> yLine(length = -0.232 * railHeight, tag = $edge29)
|
||||
|> angledLineToX({
|
||||
angle = 45,
|
||||
to = 0.087 * railHeight + originStart[0]
|
||||
}, %, $edge30)
|
||||
|> yLine(0.183 * railHeight, %, $edge31)
|
||||
|> xLine(-0.087 * railHeight, %, $edge32)
|
||||
|> yLine(-0.06 * railHeight, %)
|
||||
|> yLine(length = 0.183 * railHeight, tag = $edge31)
|
||||
|> xLine(length = -0.087 * railHeight, tag = $edge32)
|
||||
|> yLine(length = -0.06 * railHeight)
|
||||
|> arc({
|
||||
angleStart = 90,
|
||||
angleEnd = -90,
|
||||
radius = 0.072 / 4 * railHeight
|
||||
}, %)
|
||||
|> yLine(-0.1 * railHeight, %)
|
||||
|> yLine(length = -0.1 * railHeight)
|
||||
|> arc({
|
||||
angleStart = 90,
|
||||
angleEnd = -90,
|
||||
|
||||
@ -81,9 +81,9 @@ spacers = extrude(spacerSketch, length = -spacerLength)
|
||||
|> appearance(color = "#dbcd70", roughness = 90, metalness = 90)
|
||||
rotorSlottedSketch = startSketchOn(rotor, 'START')
|
||||
|> startProfileAt([2.17, 2.56], %)
|
||||
|> xLine(0.12, %)
|
||||
|> yLine(2.56, %)
|
||||
|> xLine(-0.12, %)
|
||||
|> xLine(length = 0.12)
|
||||
|> yLine(length = 2.56)
|
||||
|> xLine(length = -0.12)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> patternCircular2d(
|
||||
@ -96,9 +96,9 @@ rotorSlotted = extrude(rotorSlottedSketch, length = -rotorSinglePlateThickness /
|
||||
|
||||
secondRotorSlottedSketch = startSketchOn(secondRotor, 'END')
|
||||
|> startProfileAt([-2.17, 2.56], %)
|
||||
|> xLine(-0.12, %)
|
||||
|> yLine(2.56, %)
|
||||
|> xLine(0.12, %)
|
||||
|> xLine(length = -0.12)
|
||||
|> yLine(length = 2.56)
|
||||
|> xLine(length = 0.12)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> patternCircular2d(
|
||||
|
||||
@ -65,13 +65,13 @@ lugHoles = startSketchOn(lugBase, 'END')
|
||||
// Add detail to the wheel center by revolving curved edge profiles
|
||||
wheelCenterInner = startSketchOn('XY')
|
||||
|> startProfileAt([(lugSpacing - 1.5) / 2, 0], %)
|
||||
|> yLine(-wheelWidth / 10 - (wheelWidth / 20), %)
|
||||
|> yLine(length = -wheelWidth / 10 - (wheelWidth / 20))
|
||||
|> bezierCurve({
|
||||
to = [-0.4, 0.3],
|
||||
control1 = [-0.3, 0],
|
||||
control2 = [0, 0.3]
|
||||
}, %)
|
||||
|> yLineTo(0, %)
|
||||
|> yLine(endAbsolute = 0)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> revolve({ axis = 'y' }, %)
|
||||
@ -79,13 +79,13 @@ wheelCenterInner = startSketchOn('XY')
|
||||
|
||||
wheelCenterOuter = startSketchOn('XY')
|
||||
|> startProfileAt([(lugSpacing + 1.5) / 2, 0], %)
|
||||
|> yLine(-wheelWidth / 10 - (wheelWidth / 20), %)
|
||||
|> yLine(length = -wheelWidth / 10 - (wheelWidth / 20))
|
||||
|> bezierCurve({
|
||||
to = [0.4, -0.1],
|
||||
control1 = [0.3, 0],
|
||||
control2 = [0.2, -0.3]
|
||||
}, %)
|
||||
|> yLineTo(-wheelWidth / 20, %)
|
||||
|> yLine(endAbsolute = -wheelWidth / 20)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> revolve({ axis = 'y' }, %)
|
||||
@ -120,7 +120,7 @@ fn spoke(spokeGap, spokeAngle, spokeThickness) {
|
||||
offset / 1.5
|
||||
]
|
||||
}, %)
|
||||
|> yLine(-wheelWidth / 15, %)
|
||||
|> yLine(length = -wheelWidth / 15)
|
||||
|> bezierCurve({
|
||||
to = [
|
||||
-(wheelDiameter - lugSpacing - 2.9) / 2,
|
||||
@ -160,38 +160,38 @@ startSketchOn('XY')
|
||||
wheelDiameter / 2,
|
||||
-wheelWidth + backSpacing + offset
|
||||
], %)
|
||||
|> yLine(wheelWidth * 0.25, %)
|
||||
|> yLine(length = wheelWidth * 0.25)
|
||||
|> line(end = [-wheelWidth * 0.02, wheelWidth * 0.02])
|
||||
|> yLine(wheelWidth * 0.25, %)
|
||||
|> yLine(length = wheelWidth * 0.25)
|
||||
|> line(end = [wheelWidth * 0.02, wheelWidth * 0.02])
|
||||
|> yLineTo(backSpacing + offset, %)
|
||||
|> yLine(endAbsolute = backSpacing + offset)
|
||||
|> line(end = [wheelWidth * 0.05, wheelWidth * .01])
|
||||
|> yLine(wheelWidth * 0.05, %)
|
||||
|> xLine(-wheelWidth * 0.03, %)
|
||||
|> yLine(-wheelWidth * 0.02, %)
|
||||
|> yLine(length = wheelWidth * 0.05)
|
||||
|> xLine(length = -wheelWidth * 0.03)
|
||||
|> yLine(length = -wheelWidth * 0.02)
|
||||
|> line(end = [-wheelWidth * 0.05, -wheelWidth * 0.01])
|
||||
|> yLine(-backSpacing * 0.7, %)
|
||||
|> yLine(length = -backSpacing * 0.7)
|
||||
|> line(end = [
|
||||
-wheelDiameter * 0.01,
|
||||
-wheelWidth * 0.02
|
||||
])
|
||||
|> yLineTo(offset - 0.2, %)
|
||||
|> yLine(endAbsolute = offset - 0.2)
|
||||
|> line(end = [
|
||||
-wheelDiameter * 0.03,
|
||||
-wheelWidth * 0.02
|
||||
])
|
||||
|> yLine(-wheelWidth * 0.02, %)
|
||||
|> yLine(length = -wheelWidth * 0.02)
|
||||
|> line(end = [
|
||||
wheelDiameter * 0.03,
|
||||
-wheelWidth * 0.1
|
||||
])
|
||||
|> yLine(-wheelWidth * 0.05, %)
|
||||
|> yLine(length = -wheelWidth * 0.05)
|
||||
|> line(end = [wheelWidth * 0.02, -wheelWidth * 0.02])
|
||||
|> yLineTo(-wheelWidth + backSpacing + offset - 0.28, %)
|
||||
|> yLine(endAbsolute = -wheelWidth + backSpacing + offset - 0.28)
|
||||
|> line(end = [wheelWidth * 0.05, -wheelWidth * 0.01])
|
||||
|> yLine(-wheelWidth * 0.02, %)
|
||||
|> xLine(wheelWidth * 0.03, %)
|
||||
|> yLine(wheelWidth * 0.05, %)
|
||||
|> yLine(length = -wheelWidth * 0.02)
|
||||
|> xLine(length = wheelWidth * 0.03)
|
||||
|> yLine(length = wheelWidth * 0.05)
|
||||
|> close()
|
||||
|> revolve({ axis = 'y' }, %)
|
||||
|> appearance(color = "#ffffff", metalness = 0, roughness = 0)
|
||||
|
||||
@ -26,13 +26,13 @@ fn lug(plane, length, diameter) {
|
||||
lugSketch = startSketchOn(customPlane)
|
||||
|> startProfileAt([0 + diameter / 2, 0], %)
|
||||
|> angledLineOfYLength({ angle = 70, length = lugHeadLength }, %)
|
||||
|> xLineTo(lugDiameter / 2, %)
|
||||
|> yLineTo(lugLength, %)
|
||||
|> xLine(endAbsolute = lugDiameter / 2)
|
||||
|> yLine(endAbsolute = lugLength)
|
||||
|> tangentialArc({ offset = 90, radius = 3 * mm() }, %)
|
||||
|> xLineTo(0 + .001, %, $c1)
|
||||
|> yLineTo(lugThreadDepth, %)
|
||||
|> xLineTo(lugThreadDiameter, %)
|
||||
|> yLineTo(0, %)
|
||||
|> xLine(endAbsolute = 0 + .001, tag = $c1)
|
||||
|> yLine(endAbsolute = lugThreadDepth)
|
||||
|> xLine(endAbsolute = lugThreadDiameter)
|
||||
|> yLine(endAbsolute = 0)
|
||||
|> close()
|
||||
|> revolve({ axis = "Y" }, %)
|
||||
|> appearance(color = "#dbcd70", roughness = 90, metalness = 90)
|
||||
|
||||
@ -68,19 +68,19 @@ primaryTube(3, 25.2, 5, 5, 3)
|
||||
// Create the mounting flange for the header
|
||||
flangeSketch = startSketchOn('XY')
|
||||
|> startProfileAt([3 + 1.3, -1.25], %)
|
||||
|> xLine(-2.6, %, $seg01)
|
||||
|> xLine(length = -2.6, tag = $seg01)
|
||||
|> tangentialArc({ radius = .3, offset = -40 }, %)
|
||||
|> tangentialArc({ radius = .9, offset = 80 }, %)
|
||||
|> tangentialArc({ radius = .3, offset = -40 }, %)
|
||||
|> xLine(-1.4, %, $seg03)
|
||||
|> yLine(segLen(seg01), %, $seg04)
|
||||
|> xLine(3.1, %, $seg05)
|
||||
|> xLine(length = -1.4, tag = $seg03)
|
||||
|> yLine(length = segLen(seg01), tag = $seg04)
|
||||
|> xLine(length = 3.1, tag = $seg05)
|
||||
|> tangentialArc({ radius = .3, offset = -40 }, %)
|
||||
|> tangentialArc({ radius = 1.5, offset = 80 }, %)
|
||||
|> tangentialArc({ radius = .3, offset = -40 }, %)
|
||||
|> xLine(segLen(seg05), %, $seg07)
|
||||
|> yLineTo(profileStartY(%), %, $seg08)
|
||||
|> xLine(-segLen(seg03), %, $seg09)
|
||||
|> xLine(length = segLen(seg05), tag = $seg07)
|
||||
|> yLine(endAbsolute = profileStartY(%), tag = $seg08)
|
||||
|> xLine(length = -segLen(seg03), tag = $seg09)
|
||||
|> tangentialArc({ radius = .3, offset = -40 }, %)
|
||||
|> tangentialArc({ radius = .9, offset = 80 }, %)
|
||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||
|
||||
@ -49,7 +49,7 @@ sketch000 = startSketchOn('XY')
|
||||
// create a profile of the flipper
|
||||
flipperProfile = startProfileAt([-flipperLength, -32.0], sketch000)
|
||||
|> line(end = [flipperLength, 2.0])
|
||||
|> yLine(60.0, %, $backEdge)
|
||||
|> yLine(length = 60.0, tag = $backEdge)
|
||||
|> line(end = [-flipperLength, 2.0])
|
||||
|> arc({
|
||||
angleEnd = 196.912390,
|
||||
@ -96,7 +96,7 @@ handleProfile = startProfileAt([0.0, flipperThickness], sketch001)
|
||||
|> line(end = [-1.710101, 4.698463])
|
||||
|> line(end = [-141.995517, -51.682142], tag = $handleTopEdge)
|
||||
|> line(end = [-36.139148, -36.139148])
|
||||
|> xLine(7.071068, %)
|
||||
|> xLine(length = 7.071068)
|
||||
|> close()
|
||||
|
||||
// create an extrusion extrude001
|
||||
@ -127,25 +127,25 @@ sketch002 = startSketchOn(handlePlane)
|
||||
|
||||
// create a profile of the grip
|
||||
gripProfile = startProfileAt([-26.806746, -10.0], sketch002)
|
||||
|> xLine(gripWidth - (2 * gripFilletRadius), %)
|
||||
|> xLine(length = gripWidth - (2 * gripFilletRadius))
|
||||
|> arc({
|
||||
angleStart = -90.0,
|
||||
angleEnd = 0.0,
|
||||
radius = gripFilletRadius
|
||||
}, %)
|
||||
|> yLine(gripHeight - (2 * gripFilletRadius), %)
|
||||
|> yLine(length = gripHeight - (2 * gripFilletRadius))
|
||||
|> arc({
|
||||
angleStart = 0.0,
|
||||
angleEnd = 90.0,
|
||||
radius = gripFilletRadius
|
||||
}, %)
|
||||
|> xLine(-(gripWidth - (2 * gripFilletRadius)), %)
|
||||
|> xLine(length = -(gripWidth - (2 * gripFilletRadius)))
|
||||
|> arc({
|
||||
angleStart = 90.0,
|
||||
angleEnd = 180.0,
|
||||
radius = gripFilletRadius
|
||||
}, %)
|
||||
|> yLine(-(gripHeight - (2 * gripFilletRadius)), %, $gripEdgeTop)
|
||||
|> yLine(length = -(gripHeight - (2 * gripFilletRadius)), tag = $gripEdgeTop)
|
||||
|> arc({
|
||||
angleStart = 180.0,
|
||||
angleEnd = 270.0,
|
||||
|
||||
@ -38,8 +38,8 @@ plane001 = {
|
||||
// Cross section of the metal supports
|
||||
sketch002 = startSketchOn(plane001)
|
||||
|> startProfileAt([carafeDiameter / 2, 5.7], %)
|
||||
|> xLine(0.1, %)
|
||||
|> yLine(-5.2, %, $edge1)
|
||||
|> xLine(length = 0.1)
|
||||
|> yLine(length = -5.2, tag = $edge1)
|
||||
|> arc({
|
||||
angleStart = 180,
|
||||
angleEnd = 205,
|
||||
@ -57,9 +57,9 @@ sketch002 = startSketchOn(plane001)
|
||||
angleEnd = 90,
|
||||
radius = 0.5
|
||||
}, %)
|
||||
|> xLineTo(0.1, %, $edgeLen)
|
||||
|> yLine(0.1, %)
|
||||
|> xLine(segLen(edgeLen) + 0.035, %, $edge4)
|
||||
|> xLine(endAbsolute = 0.1, tag = $edgeLen)
|
||||
|> yLine(length = 0.1)
|
||||
|> xLine(length = segLen(edgeLen) + 0.035, tag = $edge4)
|
||||
|> arc({
|
||||
angleStart = 90,
|
||||
angleEnd = 60,
|
||||
@ -105,7 +105,7 @@ extrude001 = extrude(sketch003, length = 0.050)
|
||||
|
||||
sketch004 = startSketchOn(extrude001, 'END')
|
||||
|> startProfileAt([0.3, 0.17], %)
|
||||
|> yLine(1.2, %)
|
||||
|> yLine(length = 1.2)
|
||||
|> arc({
|
||||
angleStart = 90,
|
||||
angleEnd = -30,
|
||||
@ -125,14 +125,14 @@ extrude002 = extrude(sketch004, length = -0.050)
|
||||
// Filter screen
|
||||
sketch005 = startSketchOn('XZ')
|
||||
|> startProfileAt([0.15, 1.11], %)
|
||||
|> xLineTo(carafeDiameter / 2 - 0.2, %)
|
||||
|> xLine(endAbsolute = carafeDiameter / 2 - 0.2)
|
||||
|> angledLineToX({
|
||||
angle = 30,
|
||||
to = carafeDiameter / 2 - 0.07
|
||||
}, %, $seg1)
|
||||
|> angledLine({ angle = -60, length = 0.050 }, %)
|
||||
|> angledLine({ angle = 30, length = -segLen(seg1) }, %)
|
||||
|> xLineTo(0.15, %)
|
||||
|> xLine(endAbsolute = 0.15)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> revolve({ axis = 'y' }, %)
|
||||
@ -142,9 +142,9 @@ sketch006 = startSketchOn('XZ')
|
||||
|> startProfileAt([0.1, 1], %)
|
||||
|> line(end = [0.1, 0])
|
||||
|> angledLineToX({ angle = 10, to = 0.05 }, %)
|
||||
|> yLine(10, %)
|
||||
|> yLine(length = 10)
|
||||
|> line(end = [0.6, 0])
|
||||
|> yLine(-.05, %)
|
||||
|> yLine(length = -.05)
|
||||
|> tangentialArc({ radius = 0.6, offset = -90 }, %)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
@ -198,10 +198,10 @@ extrude006 = extrude(sketch010, length = carafeHeight)
|
||||
// Draw and revolve the lid
|
||||
sketch011 = startSketchOn('XZ')
|
||||
|> startProfileAt([0.2, carafeHeight - 0.7], %)
|
||||
|> xLine(carafeDiameter / 2 - 0.3, %)
|
||||
|> yLine(0.7, %)
|
||||
|> xLine(0.3, %)
|
||||
|> yLine(0.4, %)
|
||||
|> xLine(length = carafeDiameter / 2 - 0.3)
|
||||
|> yLine(length = 0.7)
|
||||
|> xLine(length = 0.3)
|
||||
|> yLine(length = 0.4)
|
||||
|> line(end = [-0.02, 0.02])
|
||||
|> bezierCurve({
|
||||
to = [-carafeDiameter / 2 - 0.1, 1],
|
||||
|
||||
@ -95,9 +95,9 @@ keyWay = startSketchOn(body, 'END')
|
||||
holeRadius * cos(startAngle),
|
||||
holeRadius * sin(startAngle)
|
||||
], %)
|
||||
|> xLine(keywayDepth, %)
|
||||
|> yLine(-keywayWidth, %)
|
||||
|> xLine(-keywayDepth, %)
|
||||
|> xLine(length = keywayDepth)
|
||||
|> yLine(length = -keywayWidth)
|
||||
|> xLine(length = -keywayDepth)
|
||||
|> arc({
|
||||
angleEnd = 180,
|
||||
angleStart = -1 * 180 / PI * startAngle + 360,
|
||||
|
||||
@ -25,9 +25,9 @@ height = firstStep + secondStep + thirdStep
|
||||
fn face(plane) {
|
||||
faceSketch = startSketchOn(plane)
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> yLine(height, %)
|
||||
|> yLine(length = height)
|
||||
|> angledLineOfYLength({ angle = -45, length = thirdStep }, %)
|
||||
|> yLine(-secondStep, %)
|
||||
|> yLine(length = -secondStep)
|
||||
|> angledLineOfYLength({ angle = -45, length = firstStep }, %)
|
||||
|> close()
|
||||
return faceSketch
|
||||
@ -100,38 +100,38 @@ fn magnetCenterCutout(plane) {
|
||||
firstStep + thirdStep,
|
||||
2 * magOuterDiam
|
||||
], %)
|
||||
|> xLine(2 * magOuterDiam - (firstStep + thirdStep) - (magOuterDiam / 2), %)
|
||||
|> xLine(length = 2 * magOuterDiam - (firstStep + thirdStep) - (magOuterDiam / 2))
|
||||
|> arc({
|
||||
angleStart = 90.0,
|
||||
angleEnd = 0.0,
|
||||
radius = magOuterDiam / 2
|
||||
}, %)
|
||||
|> yLine(-(2 * magOuterDiam - (firstStep + thirdStep) - (magOuterDiam / 2)), %)
|
||||
|> xLine(binLength - (4 * magOuterDiam), %)
|
||||
|> yLine(2 * magOuterDiam - (firstStep + thirdStep) - (magOuterDiam / 2), %)
|
||||
|> yLine(length = -(2 * magOuterDiam - (firstStep + thirdStep) - (magOuterDiam / 2)))
|
||||
|> xLine(length = binLength - (4 * magOuterDiam))
|
||||
|> yLine(length = 2 * magOuterDiam - (firstStep + thirdStep) - (magOuterDiam / 2))
|
||||
|> arc({
|
||||
angleStart = 180.0,
|
||||
angleEnd = 90.0,
|
||||
radius = magOuterDiam / 2
|
||||
}, %)
|
||||
|> xLine(2 * magOuterDiam - (firstStep + thirdStep) - (magOuterDiam / 2), %)
|
||||
|> yLine(binLength - (4 * magOuterDiam), %)
|
||||
|> xLine(-(2 * magOuterDiam - (firstStep + thirdStep) - (magOuterDiam / 2)), %)
|
||||
|> xLine(length = 2 * magOuterDiam - (firstStep + thirdStep) - (magOuterDiam / 2))
|
||||
|> yLine(length = binLength - (4 * magOuterDiam))
|
||||
|> xLine(length = -(2 * magOuterDiam - (firstStep + thirdStep) - (magOuterDiam / 2)))
|
||||
|> arc({
|
||||
angleStart = 270.0,
|
||||
angleEnd = 180.0,
|
||||
radius = magOuterDiam / 2
|
||||
}, %)
|
||||
|> yLine(2 * magOuterDiam - (firstStep + thirdStep) - (magOuterDiam / 2), %)
|
||||
|> xLine(-(binLength - (4 * magOuterDiam)), %, $line012)
|
||||
|> yLine(-(2 * magOuterDiam - (firstStep + thirdStep) - (magOuterDiam / 2)), %)
|
||||
|> yLine(length = 2 * magOuterDiam - (firstStep + thirdStep) - (magOuterDiam / 2))
|
||||
|> xLine(length = -(binLength - (4 * magOuterDiam)), tag = $line012)
|
||||
|> yLine(length = -(2 * magOuterDiam - (firstStep + thirdStep) - (magOuterDiam / 2)))
|
||||
|> arc({
|
||||
angleStart = 360.0,
|
||||
angleEnd = 270.0,
|
||||
radius = magOuterDiam / 2
|
||||
}, %)
|
||||
|> xLine(-(2 * magOuterDiam - (firstStep + thirdStep) - (magOuterDiam / 2)), %)
|
||||
|> yLine(-(binLength - (4 * magOuterDiam)), %)
|
||||
|> xLine(length = -(2 * magOuterDiam - (firstStep + thirdStep) - (magOuterDiam / 2)))
|
||||
|> yLine(length = -(binLength - (4 * magOuterDiam)))
|
||||
|> close()
|
||||
return magnetSketch
|
||||
}
|
||||
@ -140,9 +140,9 @@ fn magnetCenterCutout(plane) {
|
||||
fn magnetBase(plane) {
|
||||
magnetBaseSketch = startSketchOn(plane)
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> xLine(binLength, %, $line001)
|
||||
|> yLine(binLength, %, $line002)
|
||||
|> xLineTo(profileStartX(%), %, $line003)
|
||||
|> xLine(length = binLength, tag = $line001)
|
||||
|> yLine(length = binLength, tag = $line002)
|
||||
|> xLine(endAbsolute = profileStartX(%), tag = $line003)
|
||||
|> close(tag = $line004)
|
||||
|> hole(magnetCenterCutout(plane), %)
|
||||
return magnetBaseSketch
|
||||
|
||||
@ -22,9 +22,9 @@ height = firstStep + secondStep + thirdStep
|
||||
fn face(plane) {
|
||||
faceSketch = startSketchOn(plane)
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> yLine(height, %)
|
||||
|> yLine(length = height)
|
||||
|> angledLineOfYLength({ angle = -45, length = thirdStep }, %)
|
||||
|> yLine(-secondStep, %)
|
||||
|> yLine(length = -secondStep)
|
||||
|> angledLineOfYLength({ angle = -45, length = firstStep }, %)
|
||||
|> close()
|
||||
return faceSketch
|
||||
|
||||
@ -37,10 +37,10 @@ lipHeight = lipStep1 + lipStep2 + lipStep3 + lipStep4 + lipStep5
|
||||
fn face(plane) {
|
||||
faceSketch = startSketchOn(plane)
|
||||
|> startProfileAt([binBaseLength + binTol, 0], %)
|
||||
|> yLine(height, %)
|
||||
|> xLine(-binBaseLength, %)
|
||||
|> yLine(length = height)
|
||||
|> xLine(length = -binBaseLength)
|
||||
|> angledLineOfYLength({ angle = -45, length = thirdStep }, %)
|
||||
|> yLine(-secondStep, %)
|
||||
|> yLine(length = -secondStep)
|
||||
|> angledLineOfYLength({ angle = -45, length = firstStep }, %)
|
||||
|> close()
|
||||
return faceSketch
|
||||
@ -98,7 +98,7 @@ singleBinFill = startSketchOn("XY")
|
||||
], %)
|
||||
|> line(end = [binLength - (binBaseLength * 2), 0], tag = $line000)
|
||||
|> line(end = [0, binLength - (binBaseLength * 2)], tag = $line001)
|
||||
|> xLineTo(profileStartX(%), %, $line002)
|
||||
|> xLine(endAbsolute = profileStartX(%), tag = $line002)
|
||||
|> close(tag = $line003)
|
||||
|> extrude(length = height)
|
||||
|> fillet(
|
||||
@ -172,9 +172,9 @@ binFill = patternLinear3d(
|
||||
//
|
||||
binTop = startSketchOn(offsetPlane("XY", offset = height))
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> xLine((binLength + 2 * binTol) * countBinWidth, %, $line010)
|
||||
|> yLine((binLength + 2 * binTol) * countBinLength, %, $line011)
|
||||
|> xLineTo(profileStartX(%), %, $line012)
|
||||
|> xLine(length = (binLength + 2 * binTol) * countBinWidth, tag = $line010)
|
||||
|> yLine(length = (binLength + 2 * binTol) * countBinLength, tag = $line011)
|
||||
|> xLine(endAbsolute = profileStartX(%), tag = $line012)
|
||||
|> close(tag = $line013)
|
||||
|> extrude(length = binHeight * countBinHeight)
|
||||
|> fillet(
|
||||
@ -192,7 +192,7 @@ binTop = startSketchOn(offsetPlane("XY", offset = height))
|
||||
fn lipFace(plane) {
|
||||
faceSketch = startSketchOn(plane)
|
||||
|> startProfileAt([0, 0], %)
|
||||
// |> yLine(lipHeight, %, $line100)
|
||||
// |> yLine(length = lipHeight, tag = $line100)
|
||||
|> line(end = [0.0, 5.792893], tag = $line000)
|
||||
|> arc({
|
||||
angleStart = 180.0,
|
||||
@ -201,9 +201,9 @@ fn lipFace(plane) {
|
||||
}, %, $arc000)
|
||||
// |> angledLineOfYLength({ angle: -45, length: lipStep5 }, %)
|
||||
|> line(end = [1.046447, -1.046447], tag = $line001)
|
||||
|> yLine(-lipStep4, %)
|
||||
|> yLine(length = -lipStep4)
|
||||
|> angledLineOfYLength({ angle = -45, length = lipStep3 }, %)
|
||||
|> yLine(-lipStep2, %)
|
||||
|> yLine(length = -lipStep2)
|
||||
|> angledLineOfYLength({ angle = -135, length = lipStep1 }, %)
|
||||
|> close()
|
||||
return faceSketch
|
||||
|
||||
@ -30,10 +30,10 @@ height = firstStep + secondStep + thirdStep
|
||||
fn face(plane) {
|
||||
faceSketch = startSketchOn(plane)
|
||||
|> startProfileAt([binBaseLength + binTol, 0], %)
|
||||
|> yLine(height, %)
|
||||
|> xLine(-binBaseLength, %)
|
||||
|> yLine(length = height)
|
||||
|> xLine(length = -binBaseLength)
|
||||
|> angledLineOfYLength({ angle = -45, length = thirdStep }, %)
|
||||
|> yLine(-secondStep, %)
|
||||
|> yLine(length = -secondStep)
|
||||
|> angledLineOfYLength({ angle = -45, length = firstStep }, %)
|
||||
|> close()
|
||||
return faceSketch
|
||||
@ -91,7 +91,7 @@ singleBinFill = startSketchOn("XY")
|
||||
], %)
|
||||
|> line(end = [binLength - (binBaseLength * 2), 0], tag = $line000)
|
||||
|> line(end = [0, binLength - (binBaseLength * 2)], tag = $line001)
|
||||
|> xLineTo(profileStartX(%), %, $line002)
|
||||
|> xLine(endAbsolute = profileStartX(%), tag = $line002)
|
||||
|> close(tag = $line003)
|
||||
|> extrude(length = height)
|
||||
|> fillet(
|
||||
@ -165,9 +165,9 @@ binFill = patternLinear3d(
|
||||
// create the top of the bin
|
||||
binTop = startSketchOn(offsetPlane("XY", offset = height))
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> xLine((binLength + 2 * binTol) * countBinWidth, %, $line010)
|
||||
|> yLine((binLength + 2 * binTol) * countBinLength, %, $line011)
|
||||
|> xLineTo(profileStartX(%), %, $line012)
|
||||
|> xLine(length = (binLength + 2 * binTol) * countBinWidth, tag = $line010)
|
||||
|> yLine(length = (binLength + 2 * binTol) * countBinLength, tag = $line011)
|
||||
|> xLine(endAbsolute = profileStartX(%), tag = $line012)
|
||||
|> close(tag = $line013)
|
||||
|> extrude(length = binHeight * countBinHeight)
|
||||
|> fillet(
|
||||
|
||||
@ -13,10 +13,10 @@ wallThickness = 0.293
|
||||
// Sketch a quadrant of the beam cross section, then mirror for symmetry across each axis. Extrude to the appropriate length
|
||||
sketch001 = startSketchOn('-XZ')
|
||||
|> startProfileAt([0, beamHeight/2], %)
|
||||
|> xLine(beamWidth/2, %)
|
||||
|> yLine(-wallThickness, %)
|
||||
|> xLineTo(wallThickness/2, %)
|
||||
|> yLineTo(0, %)
|
||||
|> xLine(length = beamWidth/2)
|
||||
|> yLine(length = -wallThickness)
|
||||
|> xLine(endAbsolute = wallThickness/2)
|
||||
|> yLine(endAbsolute = 0)
|
||||
|> mirror2d({ axis = 'X' }, %)
|
||||
|> mirror2d({ axis = 'Y' }, %)
|
||||
|> extrude(length = beamLength)
|
||||
|
||||
@ -69,7 +69,7 @@ fn capScrew(start, length, dia) {
|
||||
-start[0] + wallToWallLength / 2,
|
||||
start[2]
|
||||
], %)
|
||||
|> yLine(-hexWallLength / 2, %)
|
||||
|> yLine(length = -hexWallLength / 2)
|
||||
|> angledLine({
|
||||
angle = hexStartingAngle,
|
||||
length = hexWallLength
|
||||
|
||||
@ -24,7 +24,7 @@ pipeSketch = startSketchOn('XY')
|
||||
length = pipeTransitionLength
|
||||
}, %)
|
||||
|> line(end = [0, -pipeLargeDiaLength])
|
||||
|> xLine(-thickness, %)
|
||||
|> xLine(length = -thickness)
|
||||
|> line(end = [0, pipeLargeDiaLength])
|
||||
|> angledLineToX({
|
||||
angle = -pipeTransitionAngle + 180,
|
||||
|
||||
@ -14,20 +14,20 @@ frontLength = 7
|
||||
|
||||
sketch001 = startSketchOn("-YZ")
|
||||
|> startProfileAt([wallsWidth / 2, 0], %)
|
||||
|> xLine(wallThickness / 2, %)
|
||||
|> xLine(length = wallThickness / 2)
|
||||
|> angledLineToX({ angle = 60, to = wallsWidth }, %, $seg01)
|
||||
|> yLineTo(height, %)
|
||||
|> xLine(-wallThickness, %)
|
||||
|> yLineTo(segEndY(seg01), %)
|
||||
|> yLine(endAbsolute = height)
|
||||
|> xLine(length = -wallThickness)
|
||||
|> yLine(endAbsolute = segEndY(seg01))
|
||||
|> angledLineToX({
|
||||
angle = 60,
|
||||
to = wallsWidth / 2 + wallThickness / 2
|
||||
}, %)
|
||||
|> xLine(-wallThickness, %)
|
||||
|> xLine(length = -wallThickness)
|
||||
|> angledLineToX({ angle = 180 - 60, to = wallThickness }, %)
|
||||
|> yLineTo(height, %)
|
||||
|> xLineTo(0, %)
|
||||
|> yLineTo(segEndY(seg01), %)
|
||||
|> yLine(endAbsolute = height)
|
||||
|> xLine(endAbsolute = 0)
|
||||
|> yLine(endAbsolute = segEndY(seg01))
|
||||
|> angledLineToY({ angle = 180 - 60, to = 0 }, %)
|
||||
|> close()
|
||||
part001 = revolve({
|
||||
@ -42,20 +42,20 @@ part001 = revolve({
|
||||
|
||||
sketch002 = startSketchOn('-YZ')
|
||||
|> startProfileAt([wallsWidth / 2, 0], %)
|
||||
|> xLine(wallThickness / 2, %)
|
||||
|> xLine(length = wallThickness / 2)
|
||||
|> angledLineToX({ angle = 60, to = wallsWidth }, %, $seg02)
|
||||
|> yLineTo(height, %)
|
||||
|> xLine(-wallThickness, %)
|
||||
|> yLineTo(segEndY(seg01), %)
|
||||
|> yLine(endAbsolute = height)
|
||||
|> xLine(length = -wallThickness)
|
||||
|> yLine(endAbsolute = segEndY(seg01))
|
||||
|> angledLineToX({
|
||||
angle = 60,
|
||||
to = wallsWidth / 2 + wallThickness / 2
|
||||
}, %)
|
||||
|> xLine(-wallThickness, %)
|
||||
|> xLine(length = -wallThickness)
|
||||
|> angledLineToX({ angle = 180 - 60, to = wallThickness }, %)
|
||||
|> yLineTo(height, %)
|
||||
|> xLineTo(0, %)
|
||||
|> yLineTo(segEndY(seg02), %)
|
||||
|> yLine(endAbsolute = height)
|
||||
|> xLine(endAbsolute = 0)
|
||||
|> yLine(endAbsolute = segEndY(seg02))
|
||||
|> angledLineToY({ angle = 180 - 60, to = 0 }, %)
|
||||
|> close()
|
||||
|> extrude(length = backLength - height)
|
||||
@ -81,23 +81,23 @@ sketch003 = startSketchOn(customPlane)
|
||||
|
||||
sketch004 = startSketchOn(sketch002, 'END')
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> yLineTo(height, %)
|
||||
|> xLineTo(wallThickness, %)
|
||||
|> yLineTo(segEndY(seg01), %)
|
||||
|> yLine(endAbsolute = height)
|
||||
|> xLine(endAbsolute = wallThickness)
|
||||
|> yLine(endAbsolute = segEndY(seg01))
|
||||
|> angledLineToX({
|
||||
angle = 180 - 60,
|
||||
to = wallsWidth / 2 - (wallThickness / 2)
|
||||
}, %)
|
||||
|> xLine(wallThickness, %)
|
||||
|> xLine(length = wallThickness)
|
||||
|> angledLineToY({ angle = 60, to = segEndY(seg01) }, %)
|
||||
|> yLineTo(height, %)
|
||||
|> xLine(wallThickness, %)
|
||||
|> yLine(endAbsolute = height)
|
||||
|> xLine(length = wallThickness)
|
||||
|> tangentialArcTo([
|
||||
(frontLength - wallsWidth) / 2 + wallsWidth,
|
||||
height - ((height - exitHeight) / 2)
|
||||
], %)
|
||||
|> tangentialArcTo([frontLength, exitHeight], %)
|
||||
|> yLineTo(0, %)
|
||||
|> yLine(endAbsolute = 0)
|
||||
|> close(tag = $seg04)
|
||||
|> extrude(length = wallThickness)
|
||||
|
||||
@ -115,30 +115,30 @@ customPlane2 = {
|
||||
}
|
||||
sketch005 = startSketchOn(customPlane2)
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> yLineTo(height, %)
|
||||
|> xLineTo(wallsWidth, %)
|
||||
|> yLine(endAbsolute = height)
|
||||
|> xLine(endAbsolute = wallsWidth)
|
||||
|> tangentialArcTo([
|
||||
(frontLength - wallsWidth) / 2 + wallsWidth,
|
||||
height - ((height - exitHeight) / 2)
|
||||
], %)
|
||||
|> tangentialArcTo([frontLength, exitHeight], %)
|
||||
|> yLineTo(0, %, $seg03)
|
||||
|> yLine(endAbsolute = 0, tag = $seg03)
|
||||
|> close()
|
||||
|> extrude(length = wallThickness)
|
||||
|
||||
sketch006 = startSketchOn(sketch005, seg03)
|
||||
|> startProfileAt([0, -1 * (backLength - height)], %)
|
||||
|> xLineTo(-exitHeight, %)
|
||||
|> yLine(-wallsWidth, %)
|
||||
|> xLineTo(0, %)
|
||||
|> xLine(endAbsolute = -exitHeight)
|
||||
|> yLine(length = -wallsWidth)
|
||||
|> xLine(endAbsolute = 0)
|
||||
|> close()
|
||||
|> extrude(length = wallThickness)
|
||||
|
||||
sketch007 = startSketchOn(sketch004, 'END')
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> xLineTo(wallThickness, %)
|
||||
|> yLineTo(height, %)
|
||||
|> xLineTo(0, %)
|
||||
|> xLine(endAbsolute = wallThickness)
|
||||
|> yLine(endAbsolute = height)
|
||||
|> xLine(endAbsolute = 0)
|
||||
|> close()
|
||||
|> extrude(length = wallsWidth - (2 * wallThickness))
|
||||
|
||||
@ -157,8 +157,8 @@ customPlane3 = {
|
||||
|
||||
sketch008 = startSketchOn(customPlane3)
|
||||
|> startProfileAt([wallThickness, wallThickness], %)
|
||||
|> xLineTo(frontLength, %)
|
||||
|> yLine(wallsWidth - (2 * wallThickness), %)
|
||||
|> xLineTo(wallThickness, %)
|
||||
|> xLine(endAbsolute = frontLength)
|
||||
|> yLine(length = wallsWidth - (2 * wallThickness))
|
||||
|> xLine(endAbsolute = wallThickness)
|
||||
|> close()
|
||||
|> extrude(length = -wallThickness)
|
||||
|
||||
@ -15,28 +15,28 @@ depth = 30
|
||||
distanceToInsideEdge = slateWidthHalf + templateThickness + templateGap
|
||||
sketch001 = startSketchOn('XZ')
|
||||
|> startProfileAt([ZERO, depth + templateGap], %)
|
||||
|> xLine(slateWidthHalf - radius, %, $seg01)
|
||||
|> xLine(length = slateWidthHalf - radius, tag = $seg01)
|
||||
|> arc({
|
||||
angleEnd = 0,
|
||||
angleStart = 90,
|
||||
radius = 10 + templateGap
|
||||
}, %, $seg09)
|
||||
|> yLineTo(-templateThickness, %, $seg03)
|
||||
|> xLine(templateThickness, %, $seg07)
|
||||
|> yLineTo((segEndY(seg01) + templateThickness) / 2 - templateThickness, %, $seg02)
|
||||
|> xLineTo(segEndX(seg03) + minClampingDistance, %, $seg06)
|
||||
|> yLine(templateThickness * 2, %, $seg08)
|
||||
|> xLineTo(segEndX(seg02) + 0, %, $seg05)
|
||||
|> yLineTo(segEndY(seg01) + templateThickness, %, $seg10)
|
||||
|> xLineTo(ZERO, %, $seg04)
|
||||
|> xLine(-segLen(seg04), %)
|
||||
|> yLine(-segLen(seg10), %)
|
||||
|> xLine(-segLen(seg05), %)
|
||||
|> yLine(-segLen(seg08), %)
|
||||
|> xLine(segLen(seg06), %)
|
||||
|> yLine(-segLen(seg02), %)
|
||||
|> xLine(segLen(seg07), %)
|
||||
|> yLine(segLen(seg03), %)
|
||||
|> yLine(endAbsolute = -templateThickness, tag = $seg03)
|
||||
|> xLine(length = templateThickness, tag = $seg07)
|
||||
|> yLine(endAbsolute = (segEndY(seg01) + templateThickness) / 2 - templateThickness, tag = $seg02)
|
||||
|> xLine(endAbsolute = segEndX(seg03) + minClampingDistance, tag = $seg06)
|
||||
|> yLine(length = templateThickness * 2, tag = $seg08)
|
||||
|> xLine(endAbsolute = segEndX(seg02) + 0, tag = $seg05)
|
||||
|> yLine(endAbsolute = segEndY(seg01) + templateThickness, tag = $seg10)
|
||||
|> xLine(endAbsolute = ZERO, tag = $seg04)
|
||||
|> xLine(length = -segLen(seg04))
|
||||
|> yLine(length = -segLen(seg10))
|
||||
|> xLine(length = -segLen(seg05))
|
||||
|> yLine(length = -segLen(seg08))
|
||||
|> xLine(length = segLen(seg06))
|
||||
|> yLine(length = -segLen(seg02))
|
||||
|> xLine(length = segLen(seg07))
|
||||
|> yLine(length = segLen(seg03))
|
||||
|> arc({
|
||||
angleEnd = 90,
|
||||
angleStart = 180,
|
||||
|
||||
@ -19,21 +19,21 @@ length002 = depth + minClampingDistance
|
||||
// Create the first sketch
|
||||
sketch001 = startSketchOn('XZ')
|
||||
|> startProfileAt([0, depth - templateGap], %)
|
||||
|> xLine(length001, %, $seg01)
|
||||
|> xLine(length = length001, tag = $seg01)
|
||||
|> arc({
|
||||
angleEnd = 0,
|
||||
angleStart = 90,
|
||||
radius = radius - templateGap
|
||||
}, %)
|
||||
|> yLineTo(-templateGap * 2 - (templateDiameter / 2), %, $seg05)
|
||||
|> xLineTo(slateWidthHalf + templateThickness, %, $seg04)
|
||||
|> yLine(-length002, %, $seg03)
|
||||
|> xLineTo(ZERO, %, $seg02)
|
||||
|> yLine(endAbsolute = -templateGap * 2 - (templateDiameter / 2), tag = $seg05)
|
||||
|> xLine(endAbsolute = slateWidthHalf + templateThickness, tag = $seg04)
|
||||
|> yLine(length = -length002, tag = $seg03)
|
||||
|> xLine(endAbsolute = ZERO, tag = $seg02)
|
||||
// |> line(end = [7.78, 11.16])
|
||||
|> xLine(-segLen(seg02), %)
|
||||
|> yLine(segLen(seg03), %)
|
||||
|> xLine(segLen(seg04), %)
|
||||
|> yLine(segLen(seg05), %)
|
||||
|> xLine(length = -segLen(seg02))
|
||||
|> yLine(length = segLen(seg03))
|
||||
|> xLine(length = segLen(seg04))
|
||||
|> yLine(length = segLen(seg05))
|
||||
|> arc({
|
||||
angleEnd = 90,
|
||||
angleStart = 180,
|
||||
@ -51,7 +51,7 @@ sketch002 = startSketchOn(extrude001, 'START')
|
||||
-slateWidthHalf,
|
||||
-templateGap * 2 - (templateDiameter / 2)
|
||||
], %)
|
||||
|> xLine(-7, %, $rectangleSegmentA001)
|
||||
|> xLine(length = -7, tag = $rectangleSegmentA001)
|
||||
|> angledLine([
|
||||
segAng(rectangleSegmentA001) + 90,
|
||||
minClampingDistance
|
||||
@ -72,7 +72,7 @@ sketch003 = startSketchOn(extrude001, 'START')
|
||||
slateWidthHalf,
|
||||
-templateGap * 2 - (templateDiameter / 2)
|
||||
], %)
|
||||
|> xLine(7, %, $rectangleSegmentA002)
|
||||
|> xLine(length = 7, tag = $rectangleSegmentA002)
|
||||
|> angledLine([
|
||||
segAng(rectangleSegmentA002) - 90,
|
||||
minClampingDistance
|
||||
|
||||
@ -32,7 +32,7 @@ fn capScrew(start, length, dia, capHeadLength) {
|
||||
// Define the sketch of the hex pattern on the screw head
|
||||
hexPatternSketch = startSketchOn(screwHead, 'end')
|
||||
|> startProfileAt([hexWallToWall / 2, 0], %)
|
||||
|> yLine(-hexWallLength / 2, %)
|
||||
|> yLine(length = -hexWallLength / 2)
|
||||
|> angledLine({
|
||||
angle = hexStartingAngle,
|
||||
length = hexWallLength
|
||||
|
||||
@ -40,9 +40,9 @@ sketch002 = startSketchOn(loftPlane)
|
||||
origin[0] + (antennaBaseWidth - antennaTopWidth) / 2,
|
||||
origin[1] - ((antennaBaseHeight - antennaTopHeight) / 2)
|
||||
], %)
|
||||
|> xLine(antennaTopWidth, %)
|
||||
|> yLine(-antennaTopHeight, %)
|
||||
|> xLine(-antennaTopWidth, %)
|
||||
|> xLine(length = antennaTopWidth)
|
||||
|> yLine(length = -antennaTopHeight)
|
||||
|> xLine(length = -antennaTopWidth)
|
||||
|> close()
|
||||
|
||||
// Create the antenna using a loft
|
||||
|
||||
@ -10,9 +10,9 @@ import height, width, thickness, chamferLength, offset, screenWidth, screenHeigh
|
||||
|
||||
bodySketch = startSketchOn('XZ')
|
||||
|> startProfileAt([-width / 2, height / 2], %)
|
||||
|> xLine(width, %, $chamfer1)
|
||||
|> yLine(-height, %, $chamfer2)
|
||||
|> xLine(-width, %, $chamfer3)
|
||||
|> xLine(length = width, tag = $chamfer1)
|
||||
|> yLine(length = -height, tag = $chamfer2)
|
||||
|> xLine(length = -width, tag = $chamfer3)
|
||||
|> close(tag = $chamfer4)
|
||||
bodyExtrude = extrude(bodySketch, length = thickness)
|
||||
|> chamfer(
|
||||
@ -59,9 +59,9 @@ extrude002 = extrude(sketch002, length = -0.0625)
|
||||
// Create the pocket for the screen
|
||||
sketch003 = startSketchOn(extrude002, 'start')
|
||||
|> startProfileAt([-screenWidth / 2, screenYPosition], %)
|
||||
|> xLine(screenWidth, %, $seg01)
|
||||
|> yLine(-screenHeight, %)
|
||||
|> xLine(-segLen(seg01), %)
|
||||
|> xLine(length = screenWidth, tag = $seg01)
|
||||
|> yLine(length = -screenHeight)
|
||||
|> xLine(length = -segLen(seg01))
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
extrude003 = extrude(sketch003, length = screenDepth)
|
||||
@ -69,9 +69,9 @@ extrude003 = extrude(sketch003, length = screenDepth)
|
||||
// Create the speaker box
|
||||
sketch004 = startSketchOn(extrude002, 'start')
|
||||
|> startProfileAt([-1.25 / 2, -.125], %)
|
||||
|> xLine(speakerBoxWidth, %)
|
||||
|> yLine(-speakerBoxHeight, %)
|
||||
|> xLine(-speakerBoxWidth, %)
|
||||
|> xLine(length = speakerBoxWidth)
|
||||
|> yLine(length = -speakerBoxHeight)
|
||||
|> xLine(length = -speakerBoxWidth)
|
||||
|> close()
|
||||
extrude(sketch004, length = -.5)
|
||||
|> appearance(
|
||||
|
||||
@ -14,9 +14,9 @@ plane = offsetPlane("XZ", offset = 1)
|
||||
fn screenHole(sketchStart) {
|
||||
sketch006 = startSketchOn(sketchStart)
|
||||
|> startProfileAt([-screenWidth / 2, screenYPosition], %)
|
||||
|> xLine(screenWidth, %)
|
||||
|> yLine(-screenHeight, %)
|
||||
|> xLine(-screenWidth, %)
|
||||
|> xLine(length = screenWidth)
|
||||
|> yLine(length = -screenHeight)
|
||||
|> xLine(length = -screenWidth)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
return sketch006
|
||||
|
||||
@ -25,14 +25,14 @@ knobPlane = {
|
||||
// Create the knob sketch and revolve
|
||||
startSketchOn(knobPlane)
|
||||
|> startProfileAt([0.0001, 0], %)
|
||||
|> xLine(knobDiameter / 2, %)
|
||||
|> yLine(knobHeight - 0.05, %)
|
||||
|> xLine(length = knobDiameter / 2)
|
||||
|> yLine(length = knobHeight - 0.05)
|
||||
|> arc({
|
||||
angleStart = 0,
|
||||
angleEnd = 90,
|
||||
radius = .05
|
||||
}, %)
|
||||
|> xLineTo(0.0001, %)
|
||||
|> xLine(endAbsolute = 0.0001)
|
||||
|> close()
|
||||
|> revolve({ axis = "Y" }, %)
|
||||
|> appearance(color = '#D0FF01', metalness = 90, roughness = 50)
|
||||
|
||||
@ -27,9 +27,9 @@ talkButtonSketch = startSketchOn(talkButtonPlane)
|
||||
-talkButtonSideLength / 2,
|
||||
talkButtonSideLength / 2
|
||||
], %)
|
||||
|> xLine(talkButtonSideLength, %, $tag1)
|
||||
|> yLine(-talkButtonSideLength, %, $tag2)
|
||||
|> xLine(-talkButtonSideLength, %, $tag3)
|
||||
|> 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
|
||||
|
||||
@ -7,29 +7,29 @@ export fn zLogo(surface, origin, scale) {
|
||||
0 + origin[0],
|
||||
0.15 * scale + origin[1]
|
||||
], %)
|
||||
|> yLine(-0.15 * scale, %)
|
||||
|> xLine(0.15 * scale, %)
|
||||
|> yLine(length = -0.15 * scale)
|
||||
|> xLine(length = 0.15 * scale)
|
||||
|> angledLineToX({
|
||||
angle = 47.15,
|
||||
to = 0.3 * scale + origin[0]
|
||||
}, %, $seg1)
|
||||
|> yLineTo(0 + origin[1], %, $seg3)
|
||||
|> xLine(0.63 * scale, %)
|
||||
|> yLine(0.225 * scale, %)
|
||||
|> xLine(-0.57 * scale, %)
|
||||
|> yLine(endAbsolute = 0 + origin[1], tag = $seg3)
|
||||
|> xLine(length = 0.63 * scale)
|
||||
|> yLine(length = 0.225 * scale)
|
||||
|> xLine(length = -0.57 * scale)
|
||||
|> angledLineToX({
|
||||
angle = 47.15,
|
||||
to = 0.93 * scale + origin[0]
|
||||
}, %)
|
||||
|> yLine(0.15 * scale, %)
|
||||
|> xLine(-0.15 * scale, %)
|
||||
|> yLine(length = 0.15 * scale)
|
||||
|> xLine(length = -0.15 * scale)
|
||||
|> angledLine({
|
||||
angle = 47.15,
|
||||
length = -segLen(seg1)
|
||||
}, %, $seg2)
|
||||
|> yLine(segLen(seg3), %)
|
||||
|> xLineTo(0 + origin[0], %)
|
||||
|> yLine(-0.225 * scale, %)
|
||||
|> yLine(length = segLen(seg3))
|
||||
|> xLine(endAbsolute = 0 + origin[0])
|
||||
|> yLine(length = -0.225 * scale)
|
||||
|> angledLineThatIntersects({
|
||||
angle = 0,
|
||||
intersectTag = seg2,
|
||||
|
||||
Reference in New Issue
Block a user