Skip to content

Commit

Permalink
tutorial_joints.py -> use Compound() constructor instead of ..make_co…
Browse files Browse the repository at this point in the history
…mpound
  • Loading branch information
jdegenstein authored Sep 24, 2024
1 parent 720bee9 commit d424e97
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions docs/tutorial_joints.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,11 @@ def write_svg(part, filename: str, view_port_origin=(-100, 100, 150)):
#
# SVG Export options
write_svg(
Compound.make_compound([box, box.joints["hinge_attachment"].symbol]),
Compound([box, box.joints["hinge_attachment"].symbol]),
"tutorial_joint_box",
)
write_svg(
Compound.make_compound(
Compound(
[
hinge_inner,
hinge_inner.joints["leaf"].symbol,
Expand All @@ -257,7 +257,7 @@ def write_svg(part, filename: str, view_port_origin=(-100, 100, 150)):
(100, 100, -50),
)
write_svg(
Compound.make_compound(
Compound(
[
hinge_outer,
hinge_outer.joints["leaf"].symbol,
Expand All @@ -271,17 +271,17 @@ def write_svg(part, filename: str, view_port_origin=(-100, 100, 150)):
(100, 100, -50),
)
write_svg(
Compound.make_compound([box, hinge_outer]),
Compound([box, hinge_outer]),
"tutorial_joint_box_outer",
(-100, -100, 50),
)
write_svg(
Compound.make_compound([lid, lid.joints["hinge_attachment"].symbol]),
Compound([lid, lid.joints["hinge_attachment"].symbol]),
"tutorial_joint_lid",
(-100, 100, 150),
)
write_svg(
Compound.make_compound([m6_screw, m6_joint.symbol]),
Compound([m6_screw, m6_joint.symbol]),
"tutorial_joint_m6_screw",
(-100, 100, 150),
)
Expand All @@ -290,23 +290,23 @@ def write_svg(part, filename: str, view_port_origin=(-100, 100, 150)):
box.joints["hinge_attachment"].connect_to(hinge_outer.joints["leaf"])
# [Connect Box to Outer Hinge]
write_svg(
Compound.make_compound([box, hinge_outer]),
Compound([box, hinge_outer]),
"tutorial_joint_box_outer",
(-100, -100, 50),
)
# [Connect Hinge Leaves]
hinge_outer.joints["hinge_axis"].connect_to(hinge_inner.joints["hinge_axis"], angle=120)
# [Connect Hinge Leaves]
write_svg(
Compound.make_compound([box, hinge_outer, hinge_inner]),
Compound([box, hinge_outer, hinge_inner]),
"tutorial_joint_box_outer_inner",
(-100, -100, 50),
)
# [Connect Hinge to Lid]
hinge_inner.joints["leaf"].connect_to(lid.joints["hinge_attachment"])
# [Connect Hinge to Lid]
write_svg(
Compound.make_compound([box, hinge_outer, hinge_inner, lid]),
Compound([box, hinge_outer, hinge_inner, lid]),
"tutorial_joint_box_outer_inner_lid",
(-100, -100, 50),
)
Expand Down

0 comments on commit d424e97

Please sign in to comment.