Skip to content

Commit

Permalink
Update ttt-ppp0101.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ABoss authored May 16, 2024
1 parent 80119b4 commit 6c58dae
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions docs/assets/ttt/ttt-ppp0101.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from build123d import *
from ocp_vscode import *
import math

densa = 7800 / 1e6 # carbon steel density g/mm^3
densb = 2700 / 1e6 # aluminum alloy
Expand Down Expand Up @@ -35,9 +34,14 @@
extrude(amount=80, mode=Mode.INTERSECT)
# fillet does not work right, mode intersect is safer

with BuildSketch(Plane.YZ) as s2:
Trapezoid(2*8/math.tan(60/180*math.pi)+18, 8, 180 - 60, align=(Align.CENTER, Align.MIN))
with BuildSketch(Plane.YZ) as s4:
with BuildLine() as bl:
l1 = Line((0, 0), (18 / 2, 0))
l2 = PolarLine(l1 @ 1, 8, 60, length_mode=LengthMode.VERTICAL)
l3 = Line(l2 @ 1, (0, 8))
mirror(about=Plane.YZ)
make_face()
extrude(amount=115/2, both=True, mode=Mode.SUBTRACT)

show(p)
show_object(p)
print(f"\npart mass = {p.part.volume*densa:0.2f}")

0 comments on commit 6c58dae

Please sign in to comment.