added alg123d only where needed

This commit is contained in:
Bernhard 2023-03-20 20:20:33 +01:00
parent e9964e465b
commit aaae6f5a08
15 changed files with 99 additions and 80 deletions

View file

@ -1,13 +1,14 @@
from alg123d import *
from build123d import *
import alg123d as ad
clock_radius = 10
l1 = CenterArc((0, 0), clock_radius * 0.975, 0.75, 4.5)
l2 = CenterArc((0, 0), clock_radius * 0.925, 0.75, 4.5)
l1 = ad.CenterArc((0, 0), clock_radius * 0.975, 0.75, 4.5)
l2 = ad.CenterArc((0, 0), clock_radius * 0.925, 0.75, 4.5)
l3 = Line(l1 @ 0, l2 @ 0)
l4 = Line(l1 @ 1, l2 @ 1)
minute_indicator = make_face([l1, l3, l2, l4])
minute_indicator = fillet(
minute_indicator = ad.make_face([l1, l3, l2, l4])
minute_indicator = ad.fillet(
minute_indicator, minute_indicator.vertices(), radius=clock_radius * 0.01
)
@ -16,7 +17,7 @@ clock_face -= [loc * minute_indicator for loc in PolarLocations(0, 60)]
clock_face -= [
loc * SlotOverall(clock_radius * 0.05, clock_radius * 0.025)
loc * ad.SlotOverall(clock_radius * 0.05, clock_radius * 0.025)
for loc in PolarLocations(clock_radius * 0.875, 12)
]
@ -26,7 +27,7 @@ clock_face -= [
str(hour + 1),
font_size=clock_radius * 0.175,
font_style=FontStyle.BOLD,
align=Align.CENTER,
align=(Align.CENTER, Align.CENTER, Align.CENTER),
)
for hour, loc in enumerate(
PolarLocations(clock_radius * 0.75, 12, 60, -360, rotate=False)