mirror of
https://github.com/gumyr/build123d.git
synced 2025-12-26 12:21:31 -08:00
fixed examples to work with build1223d
This commit is contained in:
parent
70c14fdd0d
commit
f65bc75976
13 changed files with 32 additions and 135 deletions
|
|
@ -1,5 +1,4 @@
|
|||
from build123d import *
|
||||
import build123d.alg_compat as COMPAT
|
||||
|
||||
height, width, thickness, padding = 60, 80, 10, 12
|
||||
screw_shaft_radius, screw_head_radius, screw_head_height = 1.5, 3, 3
|
||||
|
|
@ -7,20 +6,20 @@ 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 = COMPAT.fillet(plan, plan.vertices(), 5)
|
||||
plan = fillet(*plan.vertices(), radius=5, target=plan)
|
||||
pillow_block = extrude(plan, thickness)
|
||||
|
||||
plane = Plane(pillow_block.faces().max())
|
||||
plane = Plane(pillow_block.faces().sort_by().last)
|
||||
|
||||
pillow_block -= plane * COMPAT.CounterBore(
|
||||
pillow_block, bearing_axle_radius, bearing_radius, bearing_thickness
|
||||
pillow_block -= plane * CounterBoreHole(
|
||||
bearing_axle_radius, bearing_radius, bearing_thickness, height
|
||||
)
|
||||
for loc in GridLocations(width - 2 * padding, height - 2 * padding, 2, 2):
|
||||
pillow_block -= (
|
||||
plane
|
||||
* loc
|
||||
* COMPAT.CounterBore(
|
||||
pillow_block, screw_shaft_radius, screw_head_radius, screw_head_height
|
||||
* CounterBoreHole(
|
||||
screw_shaft_radius, screw_head_radius, screw_head_height, height
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue