lecimy z jointami
This commit is contained in:
parent
37b113608d
commit
ecd9c429f7
Binary file not shown.
34
uchwyt.py
34
uchwyt.py
|
|
@ -10,27 +10,47 @@ zaokraglenie = 8
|
|||
with BuildPart() as termometr:
|
||||
with BuildSketch() as s1:
|
||||
RectangleRounded(dlugosc, szerokosc, 8)
|
||||
extrude(amount=wysokosc, both=True)
|
||||
extrude(amount=wysokosc / 2, both=True)
|
||||
|
||||
|
||||
with BuildPart() as uchwyt:
|
||||
with BuildSketch() as s1:
|
||||
RectangleRounded(dlugosc + 20, szerokosc - 10 , zaokraglenie)
|
||||
extrude(amount=wysokosc + 5, both=True)
|
||||
extrude(amount=wysokosc / 2 + 5, both=True)
|
||||
|
||||
powiekszony = scale(termometr.part, by=1.05)
|
||||
|
||||
|
||||
with BuildPart() as sciana:
|
||||
with BuildSketch() as s1:
|
||||
RectangleRounded(dlugosc + 20, 50 , zaokraglenie)
|
||||
extrude(amount=1, both=True)
|
||||
|
||||
|
||||
base_face = sciana.faces().sort_by(Axis.Z)[0]
|
||||
|
||||
|
||||
|
||||
sciana.joints["mount"] = RigidJoint(
|
||||
label="mount",
|
||||
to_part=sciana,
|
||||
joint_location=Location(base_face.center()) # Centrum znalezionej ściany
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
with BuildPart() as polaczone:
|
||||
add(uchwyt)
|
||||
with Locations((0,-15,0)):
|
||||
add(powiekszony, mode=Mode.SUBTRACT)
|
||||
with Locations((0,-7,0)):
|
||||
Box(40,34.4,70, mode=Mode.SUBTRACT)
|
||||
with Locations((0,-10,0)):
|
||||
add(termometr)
|
||||
tylnias = polaczone.faces().sort_by(Axis.Z)[-1]
|
||||
RigidJoint("tylna_sciana", joint_location=Location(tylnias.center()))
|
||||
|
||||
|
||||
|
||||
show(polaczone)
|
||||
sciana.joints["mount"].connect_to(polaczone.part.joints["tylna_sciana"])
|
||||
|
||||
show(polaczone,sciana, render_joints=True )
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue