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,4 +1,5 @@
from alg123d import *
from build123d import *
import alg123d as ad
height, width, thickness, padding = 60, 80, 10, 12
screw_shaft_radius, screw_head_radius, screw_head_height = 1.5, 3, 3
@ -6,19 +7,19 @@ bearing_axle_radius, bearing_radius, bearing_thickness = 4, 11, 7
# Build pillow block as an extruded sketch with counter bore holes
plan = Rectangle(width, height)
plan = fillet(plan, plan.vertices(), 5)
pillow_block = extrude(plan, thickness)
plan = ad.fillet(plan, plan.vertices(), 5)
pillow_block = ad.extrude(plan, thickness)
plane = Plane(pillow_block.faces().max())
pillow_block -= plane * CounterBore(
pillow_block -= plane * ad.CounterBore(
pillow_block, bearing_axle_radius, bearing_radius, bearing_thickness
)
for loc in GridLocations(width - 2 * padding, height - 2 * padding, 2, 2):
pillow_block -= (
plane
* loc
* CounterBore(
* ad.CounterBore(
pillow_block, screw_shaft_radius, screw_head_radius, screw_head_height
)
)