rozkminka
This commit is contained in:
parent
e5cb4e76f9
commit
45dce34ba2
|
|
@ -1,5 +1,9 @@
|
||||||
from build123d import *
|
from build123d import *
|
||||||
|
|
||||||
|
densa = 7800 / 1e6 # carbon steel density g/mm^3
|
||||||
|
densb = 2700 / 1e6 # aluminum alloy
|
||||||
|
densc = 1020 / 1e6 # ABS
|
||||||
|
|
||||||
with BuildPart() as p:
|
with BuildPart() as p:
|
||||||
with BuildSketch() as s:
|
with BuildSketch() as s:
|
||||||
Rectangle(115, 50)
|
Rectangle(115, 50)
|
||||||
|
|
@ -7,5 +11,22 @@ with BuildPart() as p:
|
||||||
SlotOverall(90, 12, mode=Mode.SUBTRACT)
|
SlotOverall(90, 12, mode=Mode.SUBTRACT)
|
||||||
extrude(amount=15)
|
extrude(amount=15)
|
||||||
|
|
||||||
|
with BuildSketch(Plane.XZ.offset(50 / 2)) as s3:
|
||||||
|
with Locations((-115 / 2 + 26, 15)):
|
||||||
|
SlotOverall(42 + 2 * 26 + 12, 2 * 26, rotation=90)
|
||||||
|
zz = extrude(amount=-12)
|
||||||
|
split(bisect_by=Plane.XY)
|
||||||
|
edgs = p.part.edges().filter_by(Axis.Y).group_by(Axis.X)[-2]
|
||||||
|
fillet(edgs, 9)
|
||||||
|
|
||||||
show_object(p)
|
show_object(p)
|
||||||
|
# debug(s3)
|
||||||
|
# debug(edgs)
|
||||||
|
|
||||||
|
|
||||||
|
# got_mass = p.part.volume*densa
|
||||||
|
# want_mass = 797.15
|
||||||
|
# tolerance = 1
|
||||||
|
# delta = abs(got_mass - want_mass)
|
||||||
|
# print(f"Mass: {got_mass:0.2f} g")
|
||||||
|
# assert delta < tolerance, f'{got_mass=}, {want_mass=}, {delta=}, {tolerance=}'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue