mirror of
https://github.com/gumyr/build123d.git
synced 2025-12-06 02:30:55 -08:00
Removing bd_warehouse dependency
This commit is contained in:
parent
8dd1336948
commit
cdaf1caa4c
2 changed files with 4 additions and 17 deletions
Binary file not shown.
|
Before Width: | Height: | Size: 149 KiB After Width: | Height: | Size: 64 KiB |
|
|
@ -47,16 +47,9 @@ license:
|
|||
"""
|
||||
|
||||
# [Code]
|
||||
import copy
|
||||
|
||||
from bd_warehouse.bearing import PressFitHole, SingleRowAngularContactBallBearing
|
||||
from bd_warehouse.fastener import ClearanceHole, SocketHeadCapScrew
|
||||
from build123d import *
|
||||
from ocp_vscode import show
|
||||
|
||||
bearing = SingleRowAngularContactBallBearing("M17-47-14")
|
||||
screw = SocketHeadCapScrew("M10-1.5", length=30 * MM, simple=False)
|
||||
|
||||
A, A1, Db2, H, J = 26, 11, 57, 98.5, 76.5
|
||||
with BuildPart() as oval_flanged_bearing_unit:
|
||||
with BuildSketch() as plan:
|
||||
|
|
@ -70,17 +63,11 @@ with BuildPart() as oval_flanged_bearing_unit:
|
|||
draft(drafted_faces, Plane.XY, 4)
|
||||
fillet(oval_flanged_bearing_unit.edges(), 1)
|
||||
with Locations(oval_flanged_bearing_unit.faces().sort_by(Axis.Z)[-1]):
|
||||
PressFitHole(bearing)
|
||||
with Locations(Pos(Z=A1)):
|
||||
CounterBoreHole(14 / 2, 47 / 2, 14)
|
||||
with Locations(*bolt_centers):
|
||||
ClearanceHole(screw, counter_sunk=False)
|
||||
Hole(5)
|
||||
|
||||
oval_flanged_bearing_unit.part.color = Color(0x4C6377)
|
||||
|
||||
# Create an assembly of all the positioned parts
|
||||
oval_flanged_bearing_unit_assembly = Compound(
|
||||
children=[oval_flanged_bearing_unit.part, bearing.moved(bearing.hole_locations[0])]
|
||||
+ [copy.copy(screw).moved(l) for l in screw.hole_locations]
|
||||
)
|
||||
show(oval_flanged_bearing_unit_assembly)
|
||||
show(oval_flanged_bearing_unit)
|
||||
# [End]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue