diff --git a/__pycache__/bearing_bracket.cpython-311.pyc b/__pycache__/bearing_bracket.cpython-311.pyc index f4de60e..b161858 100644 Binary files a/__pycache__/bearing_bracket.cpython-311.pyc and b/__pycache__/bearing_bracket.cpython-311.pyc differ diff --git a/__pycache__/clamp_base.cpython-311.pyc b/__pycache__/clamp_base.cpython-311.pyc new file mode 100644 index 0000000..5c8d2f6 Binary files /dev/null and b/__pycache__/clamp_base.cpython-311.pyc differ diff --git a/bearing_bracket.py b/bearing_bracket.py index 92f7316..eee473b 100644 --- a/bearing_bracket.py +++ b/bearing_bracket.py @@ -1,4 +1,5 @@ from build123d import * +from ocp_vscode import * densa = 7800 / 1e6 # carbon steel density g/mm^3 densb = 2700 / 1e6 # aluminum alloy @@ -22,13 +23,11 @@ with BuildPart() as p: with Locations((42 / 2 + 6, 0)): CounterBoreHole(24 / 2, 34 / 2, 4) mirror(about=Plane.XZ) - # debug(test) with BuildSketch() as s4: RectangleRounded(115, 50, 6) s = extrude(amount=80, mode=Mode.INTERSECT) # fillet does not work right, mode intersect is safer - # debug(s) with BuildSketch(Plane.YZ) as s4: with BuildLine() as bl: @@ -38,9 +37,8 @@ with BuildPart() as p: mirror(about=Plane.YZ) make_face() extrude(amount=115 / 2, both=True, mode=Mode.SUBTRACT) - debug(s4) -show_object(p) +show(p) got_mass = p.part.volume*densa want_mass = 797.15 diff --git a/clamp_base.py b/clamp_base.py new file mode 100644 index 0000000..91fd347 --- /dev/null +++ b/clamp_base.py @@ -0,0 +1,23 @@ +from build123d import * +from ocp_vscode import * + +set_defaults(helper_scale=1, transparent=False, reset_camera=Camera.KEEP) + + +with BuildPart() as p: + with BuildSketch(Plane.XZ) as s: + with BuildLine() as line1: + Polyline((0, 0), (95 / 2, 0), (95 / 2, 34), close=False) + offset(amount=16, side=Side.LEFT) + make_face() + mirror(about=Plane.YZ) + extrude(amount=34) + e1 = p.faces().sort_by(Axis.X)[0].edges().sort_by(Axis.Z)[0] + e2 = p.faces().sort_by(Axis.X)[-1].edges().sort_by(Axis.Z)[0] + eplus = e1 + e2 + fillet(eplus, 18) + +show_all() +# show(t1) + +# show(p)