Działamy dalej

This commit is contained in:
Rafal Paluch 2025-12-13 20:51:09 +01:00
parent fed8432269
commit 03ae39fda7
2 changed files with 28 additions and 18 deletions

View File

@ -2,26 +2,30 @@ from build123d import *
with BuildPart() as p: with BuildPart() as p:
with BuildSketch(Plane.XZ) as sk1: with BuildSketch(Plane.XZ) as sk1:
test1 = Rectangle(49, 48 - 8, align=(Align.CENTER, Align.MIN)) test = Rectangle(49, 48 - 8, align=(Align.CENTER, Align.MIN))
test2 = Rectangle(9, 48, align=(Align.CENTER, Align.MIN)) test2 = Rectangle(9, 48, align=(Align.CENTER, Align.MIN))
with Locations((9 / 2, 40)): # with Locations((9 / 2, 40)):
Ellipse(20, 8) # Ellipse(20, 8)
test3 = split(bisect_by=Plane.YZ) test3 = split(bisect_by=Plane.YZ)
revolve(axis=Axis.Z) revolve(axis=Axis.Z)
with BuildSketch(Plane.YZ.offset(-15)) as xc1: # with BuildSketch(Plane.YZ.offset(-15)) as xc1:
with Locations((0, 40 / 2 - 17)): # with Locations((0, 40 / 2 - 17)):
test4 = Ellipse(10 / 2, 4 / 2) # test4 = Ellipse(10 / 2, 4 / 2)
with BuildLine(Plane.XZ) as l1: # with BuildLine(Plane.XZ) as l1:
test5 = CenterArc((-15, 40 / 2), 17, 90, 180) # test5 = CenterArc((-15, 40 / 2), 17, 90, 180)
sweep(path=l1) # sweep(path=l1)
show_object(p)
debug(test)
debug(test2)
debug(test3)
# export_step(p.part, "/home/pali112/Build123d/debug.step")
# debug(test1) # debug(test1)
# debug(test2) # debug(test2)
# debug(test3) # debug(test3)
# debug(test4, name="ELL") # debug(test4, name="ELL")
# debug(test5, name="CA") # debug(test5, name="CA")
# show_object(p, name="calosc") # show_object(p, name="calosc")
debug(xc1) # debug(xc1)

View File

@ -1,15 +1,21 @@
from build123d import * from build123d import *
# Szerokość koła: 40 mm
# Średnica zewnętrzna: 100 mm (czyli promień zewnętrzny 50 mm)
# Otwór na wał: 20 mm (czyli promień wewnętrzny 10 mm)
# Rowek na pasek: Wcięcie w kształcie trapezu (lub trójkąta) na środku zewnętrznej krawędzi.
with BuildPart() as p: with BuildPart() as p:
with BuildSketch(Plane.XZ) as s: with BuildSketch(Plane.XZ) as s:
with Locations((20, 0)): with Locations((30, 0)):
test = Rectangle(40, 40) t = Rectangle(40, 40)
test2 = split(bisect_by=Plane.YZ) with Locations((50 - 10 / 2, 0)):
t2 = Trapezoid(12, 10, 80, rotation=90, mode=Mode.SUBTRACT)
revolve(axis=Axis.Z) revolve(axis=Axis.Z)
debug(test, name="Rectangle") # debug(t)
debug(test2, name="split") # debug(t2, name="trapez")
show_object(p, name="calosc") show_object(p, name="calosc")
# debug(t)
export_step(p.part, "/home/pali112/Build123d/debug.step") # export_step(p.part, "/home/pali112/Build123d/debug.step")