@@ -65,7 +65,7 @@ clockRidge = extrude(profile002, length = ridgeThickness, tagEnd = $capEnd001)
65
65
getCommonEdge(faces = [seg01, capEnd001])
66
66
],
67
67
)
68
- |> appearance(%, color = "#ab4321")
68
+ |> appearance(color = "#ab4321")
69
69
70
70
// Create an object that has all of the x and y starting positions of every number
71
71
numberObject = {
@@ -205,19 +205,16 @@ fn letterI(startX, startY) {
205
205
iWidth = 8
206
206
iLength = 40
207
207
return startSketchOn(offsetPlane(XY, offset = 50))
208
- |> startProfile(
209
- %,
210
- at = [
211
- startX - (iWidth / 2),
212
- startY + iLength / 2
213
- ],
214
- )
215
- |> xLine(%, length = iWidth)
216
- |> yLine(%, length = -iLength)
217
- |> xLine(%, length = -iWidth)
218
- |> close(%)
219
- |> extrude(%, length = numberThickness)
220
- |> appearance(%, color = "#140f0f")
208
+ |> startProfile(at = [
209
+ startX - (iWidth / 2),
210
+ startY + iLength / 2
211
+ ])
212
+ |> xLine(length = iWidth)
213
+ |> yLine(length = -iLength)
214
+ |> xLine(length = -iWidth)
215
+ |> close()
216
+ |> extrude(length = numberThickness)
217
+ |> appearance(color = "#140f0f")
221
218
}
222
219
223
220
// Function for the letter X
@@ -226,49 +223,43 @@ fn letterX(startX, startY) {
226
223
xLength = 40
227
224
228
225
return startSketchOn(offsetPlane(XY, offset = 50))
229
- |> startProfile(
230
- %,
231
- at = [
232
- startX - (xWidth / 2),
233
- startY + xLength / 2
234
- ],
235
- )
236
- |> xLine(%, length = xWidth / 6)
237
- |> angledLine(%, angle = -70, lengthY = xLength * 1 / 3)
238
- |> angledLine(%, angle = 70, lengthY = xLength * 1 / 3)
239
- |> xLine(%, length = xWidth / 6)
240
- |> angledLine(%, angle = 70 + 180, lengthY = xLength * 1 / 2)
241
- |> angledLine(%, angle = -70, lengthY = xLength * 1 / 2)
242
- |> xLine(%, length = -xWidth / 6)
243
- |> angledLine(%, angle = -70 - 180, lengthY = xLength * 1 / 3)
244
- |> angledLine(%, angle = 70 + 180, lengthY = xLength * 1 / 3)
245
- |> xLine(%, length = -xWidth / 6)
246
- |> angledLine(%, angle = 70, lengthY = xLength * 1 / 2)
247
- |> close(%)
248
- |> extrude(%, length = numberThickness)
249
- |> appearance(%, color = "#140f0f")
226
+ |> startProfile(at = [
227
+ startX - (xWidth / 2),
228
+ startY + xLength / 2
229
+ ])
230
+ |> xLine(length = xWidth / 6)
231
+ |> angledLine(angle = -70, lengthY = xLength * 1 / 3)
232
+ |> angledLine(angle = 70, lengthY = xLength * 1 / 3)
233
+ |> xLine(length = xWidth / 6)
234
+ |> angledLine(angle = 70 + 180, lengthY = xLength * 1 / 2)
235
+ |> angledLine(angle = -70, lengthY = xLength * 1 / 2)
236
+ |> xLine(length = -xWidth / 6)
237
+ |> angledLine(angle = -70 - 180, lengthY = xLength * 1 / 3)
238
+ |> angledLine(angle = 70 + 180, lengthY = xLength * 1 / 3)
239
+ |> xLine(length = -xWidth / 6)
240
+ |> angledLine(angle = 70, lengthY = xLength * 1 / 2)
241
+ |> close()
242
+ |> extrude(length = numberThickness)
243
+ |> appearance(color = "#140f0f")
250
244
}
251
245
252
246
// Function for the letter V
253
247
fn letterV(startX, startY) {
254
248
vWidth = 25
255
249
vLength = 40
256
250
return startSketchOn(offsetPlane(XY, offset = 50))
257
- |> startProfile(
258
- %,
259
- at = [
260
- startX - (vWidth / 2),
261
- startY + vLength / 2
262
- ],
263
- )
264
- |> xLine(%, length = vWidth * 1 / 3)
265
- |> line(%, end = [vWidth / 6, -vLength / 2])
266
- |> line(%, end = [vWidth / 6, vLength / 2])
267
- |> xLine(%, length = vWidth * 1 / 3)
268
- |> line(%, end = [-vWidth * 1 / 2, -vLength])
269
- |> close(%)
270
- |> extrude(%, length = numberThickness)
271
- |> appearance(%, color = "#140f0f")
251
+ |> startProfile(at = [
252
+ startX - (vWidth / 2),
253
+ startY + vLength / 2
254
+ ])
255
+ |> xLine(length = vWidth * 1 / 3)
256
+ |> line(end = [vWidth / 6, -vLength / 2])
257
+ |> line(end = [vWidth / 6, vLength / 2])
258
+ |> xLine(length = vWidth * 1 / 3)
259
+ |> line(end = [-vWidth * 1 / 2, -vLength])
260
+ |> close()
261
+ |> extrude(length = numberThickness)
262
+ |> appearance(color = "#140f0f")
272
263
}
273
264
274
265
// Create the numbers on the face of the clock
@@ -326,7 +317,7 @@ letterI(startX = numberObject.twelve.i2[0], startY = numberObject.twelve.i2[1])
326
317
// Create nub for the minute and hour hands
327
318
startSketchOn(clockBody, face = END)
328
319
|> circle(center = [0, 0], diameter = nubDiameter)
329
- |> extrude(%, length = numHeight)
320
+ |> extrude(length = numHeight)
330
321
331
322
// Create the hour hand
332
323
sketch005 = startSketchOn(offsetPlane(XY, offset = 55))
@@ -338,7 +329,6 @@ profile007 = startProfile(
338
329
],
339
330
)
340
331
|> arc(
341
- %,
342
332
interiorAbsolute = [
343
333
nubDiameter / 2 * 1.375 * cos(hourHandAngle + 180),
344
334
nubDiameter / 2 * 1.375 * sin(hourHandAngle + 180)
@@ -348,30 +338,24 @@ profile007 = startProfile(
348
338
nubDiameter / 2 * 1.375 * sin(hourHandAngle + 340)
349
339
],
350
340
)
351
- |> angledLine(%, angle = hourHandAngle, length = hourHandArmLength)
352
- |> angledLine(
353
- %,
354
- angle = hourHandAngle - 90,
355
- length = hourHandWidth / 2,
356
- tag = $seg004,
357
- )
341
+ |> angledLine(angle = hourHandAngle, length = hourHandArmLength)
342
+ |> angledLine(angle = hourHandAngle - 90, length = hourHandWidth / 2, tag = $seg004)
358
343
|> line(
359
- %,
360
344
endAbsolute = [
361
345
hourHandLargeDiameter / 2 * cos(hourHandAngle),
362
346
hourHandLargeDiameter / 2 * sin(hourHandAngle)
363
347
],
364
348
tag = $seg002,
365
349
)
366
- |> angledLine(%, angle = segAng(seg002) + 120, length = segLen(seg002))
367
- // |> angledLineThatIntersects(%, angle = segAng(seg002) + hourHandAngle - 90, intersectTag = seg004)
368
- |> angledLine(%, angle = hourHandAngle - 90, length = segLen(seg004))
369
- |> line(%, endAbsolute = [profileStartX(%), profileStartY(%)])
370
- |> close(% )
350
+ |> angledLine(angle = segAng(seg002) + 120, length = segLen(seg002))
351
+ // |> angledLineThatIntersects(angle = segAng(seg002) + hourHandAngle - 90, intersectTag = seg004)
352
+ |> angledLine(angle = hourHandAngle - 90, length = segLen(seg004))
353
+ |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
354
+ |> close()
371
355
profile008 = circle(sketch005, center = [0, 0], diameter = nubDiameter)
372
356
subtract2d(profile007, tool = profile008)
373
- |> extrude(%, length = 5)
374
- |> appearance(%, color = "#404040")
357
+ |> extrude(length = 5)
358
+ |> appearance(color = "#404040")
375
359
376
360
// create the minute hand
377
361
sketch006 = startSketchOn(offsetPlane(XY, offset = 50))
@@ -383,7 +367,6 @@ profile009 = startProfile(
383
367
],
384
368
)
385
369
|> arc(
386
- %,
387
370
interiorAbsolute = [
388
371
nubDiameter / 2 * 1.375 * cos(minuteHandAngle + 180),
389
372
nubDiameter / 2 * 1.375 * sin(minuteHandAngle + 180)
@@ -393,29 +376,23 @@ profile009 = startProfile(
393
376
nubDiameter / 2 * 1.375 * sin(minuteHandAngle + 340)
394
377
],
395
378
)
396
- |> angledLine(%, angle = minuteHandAngle, length = minuteHandArmLength)
397
- |> angledLine(
398
- %,
399
- angle = minuteHandAngle - 90,
400
- length = minuteHandWidth / 2,
401
- tag = $seg003,
402
- )
379
+ |> angledLine(angle = minuteHandAngle, length = minuteHandArmLength)
380
+ |> angledLine(angle = minuteHandAngle - 90, length = minuteHandWidth / 2, tag = $seg003)
403
381
|> line(
404
- %,
405
382
endAbsolute = [
406
383
minuteHandLargeDiameter / 2 * cos(minuteHandAngle),
407
384
minuteHandLargeDiameter / 2 * sin(minuteHandAngle)
408
385
],
409
386
tag = $seg005,
410
387
)
411
- |> angledLine(%, angle = segAng(seg005) + 120, length = segLen(seg005))
412
- |> angledLine(%, angle = minuteHandAngle - 90, length = segLen(seg003))
413
- |> line(%, endAbsolute = [profileStartX(%), profileStartY(%)])
414
- |> close(% )
388
+ |> angledLine(angle = segAng(seg005) + 120, length = segLen(seg005))
389
+ |> angledLine(angle = minuteHandAngle - 90, length = segLen(seg003))
390
+ |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
391
+ |> close()
415
392
profile010 = circle(sketch006, center = [0, 0], diameter = 30)
416
393
subtract2d(profile009, tool = profile010)
417
- |> extrude(%, length = 5)
418
- |> appearance(%, color = "#404040")
394
+ |> extrude(length = 5)
395
+ |> appearance(color = "#404040")
419
396
420
397
// Define parameters of the screw slot for hanging the clock
421
398
screwHeadDiameter = 9.53
@@ -427,15 +404,10 @@ slotLength = 40
427
404
sketch003 = startSketchOn(clockBody, face = START)
428
405
profile004 = startProfile(sketch003, at = [-slotWidth / 2, 200])
429
406
|> yLine(length = -slotLength)
430
- |> arc(
431
- %,
432
- radius = screwHeadDiameter / 2 + screwTolerance,
433
- angleStart = 120,
434
- angleEnd = 420,
435
- )
436
- |> yLine(%, length = slotLength)
407
+ |> arc(radius = screwHeadDiameter / 2 + screwTolerance, angleStart = 120, angleEnd = 420)
408
+ |> yLine(length = slotLength)
437
409
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
438
410
|> close()
439
- |> extrude(%, length = -20)
411
+ |> extrude(length = -20)
440
412
441
413
// todo: create cavity for the screw to slide into (need csg update)
0 commit comments