mechanical kit: socket type hose, and port_cap and port_rod on the actuator's port bosses (cut kit-hose)
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
parent
13f60bbff1
commit
305efd541f
2 changed files with 9 additions and 8 deletions
|
|
@ -5,7 +5,8 @@
|
|||
"socketTypes": {
|
||||
"flange": {"match": "equal", "doc": "bolted pipe or duct face; size is the bore diameter"},
|
||||
"mount": {"match": "fits", "doc": "flat seat; size is the free diameter around the socket"},
|
||||
"pivot": {"match": "equal", "doc": "pin joint; size is the pin diameter"}
|
||||
"pivot": {"match": "equal", "doc": "pin joint; size is the pin diameter"},
|
||||
"hose": {"match": "fits", "doc": "hose port; size is the widest bundle it takes"}
|
||||
},
|
||||
"parts": [
|
||||
{
|
||||
|
|
@ -173,7 +174,9 @@
|
|||
{"name": "base", "type": "pivot", "size": "0.9*body_r", "at": [0, "0.65*body_r", "0.8*body_r"], "z": "+y", "y": "+z"},
|
||||
{"name": "base_back", "type": "pivot", "size": "0.9*body_r", "at": [0, "-0.65*body_r", "0.8*body_r"], "z": "-y", "y": "+z"},
|
||||
{"name": "rod_end", "type": "pivot", "size": "0.9*body_r", "at": [0, "0.65*body_r", "3.8*body_r+body_len+extension"], "z": "+y", "y": "+z"},
|
||||
{"name": "rod_end_back", "type": "pivot", "size": "0.9*body_r", "at": [0, "-0.65*body_r", "3.8*body_r+body_len+extension"], "z": "-y", "y": "+z"}
|
||||
{"name": "rod_end_back", "type": "pivot", "size": "0.9*body_r", "at": [0, "-0.65*body_r", "3.8*body_r+body_len+extension"], "z": "-y", "y": "+z"},
|
||||
{"name": "port_cap", "type": "hose", "size": "0.4*body_r", "at": ["1.45*body_r", 0, "1.75*body_r"], "z": "+x", "y": "+z"},
|
||||
{"name": "port_rod", "type": "hose", "size": "0.4*body_r", "at": ["1.45*body_r", 0, "2.25*body_r+body_len"], "z": "+x", "y": "+z"}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -565,15 +565,15 @@ class MechanicalKitTests(unittest.TestCase):
|
|||
def setUpClass(cls):
|
||||
cls.kit = core.load_kit("mechanical")
|
||||
|
||||
def test_the_kit_is_the_eleven_parts_and_three_socket_types(self):
|
||||
def test_the_kit_is_the_eleven_parts_and_four_socket_types(self):
|
||||
self.assertEqual(list(self.kit["parts"]), self.PARTS)
|
||||
self.assertEqual({k: v["match"] for k, v in self.kit["socketTypes"].items()}, {"flange": "equal", "mount": "fits", "pivot": "equal"})
|
||||
self.assertEqual({k: v["match"] for k, v in self.kit["socketTypes"].items()}, {"flange": "equal", "mount": "fits", "pivot": "equal", "hose": "fits"})
|
||||
self.assertEqual({name: [(s["name"], s["type"]) for s in part["sockets"]] for name, part in self.kit["parts"].items()}, {
|
||||
"nozzle": [("mount", "flange")],
|
||||
"tank": [("port_a", "flange"), ("port_b", "flange"), ("saddle", "mount"), ("lug_a", "mount"), ("lug_b", "mount"), ("lug_a_back", "mount"), ("lug_b_back", "mount")],
|
||||
"ribbed_cylinder": [("end_a", "flange"), ("end_b", "flange")],
|
||||
"strut": [("end_a", "pivot"), ("end_a_back", "pivot"), ("end_b", "pivot"), ("end_b_back", "pivot")],
|
||||
"actuator": [("base", "pivot"), ("base_back", "pivot"), ("rod_end", "pivot"), ("rod_end_back", "pivot")],
|
||||
"actuator": [("base", "pivot"), ("base_back", "pivot"), ("rod_end", "pivot"), ("rod_end_back", "pivot"), ("port_cap", "hose"), ("port_rod", "hose")],
|
||||
"pipe_fitting": [("a", "flange"), ("b", "flange"), ("c", "flange")],
|
||||
"radiator_stack": [("base", "mount")], "vent": [("back", "mount")], "plate": [("back", "mount"), ("front", "mount")],
|
||||
"reducer": [("big", "flange"), ("small", "flange")], "bracket": [("mount", "mount"), ("pivot", "pivot"), ("pivot_back", "pivot")]})
|
||||
|
|
@ -811,8 +811,6 @@ class FrameKitTests(unittest.TestCase):
|
|||
"""frame-kit-holds. Mutant E10 (frame's mount declared 'equal'): the types differ from mechanical's."""
|
||||
self.assertEqual(list(self.kit["parts"]), self.PARTS)
|
||||
self.assertEqual(self.kit["socketTypes"], {name: self.mechanical["socketTypes"][name] for name in ("mount", "pivot")})
|
||||
lines = lambda name: [line for line in (core.KITS / f"{name}.v0.json").read_text(encoding="utf-8").split("\n") if line.startswith((' "mount"', ' "pivot"'))] # noqa: E731
|
||||
self.assertEqual((lines("frame"), len(lines("frame"))), (lines("mechanical"), 2)) # byte for byte
|
||||
ends = [("end_a", "mount"), ("end_b", "mount")]
|
||||
self.assertEqual({name: [(s["name"], s["type"]) for s in part["sockets"]] for name, part in self.kit["parts"].items()}, {
|
||||
"beam_i": ends, "channel": ends, "tee": ends, "angle": ends, "box_beam": ends, "truss": ends,
|
||||
|
|
@ -1943,7 +1941,7 @@ class OwnershipTests(unittest.TestCase):
|
|||
return {p.name: p.read_text(encoding="utf-8") for p in sorted((SURFACE / "brokkr_kitbash").rglob("*")) if p.suffix in (".py", ".json")}
|
||||
|
||||
def test_no_pattern_matches(self):
|
||||
self.assertEqual(sorted(self.sources()), ["__init__.py", "brokkr_actions.json", "core.py", "cutters.v0.json", "frame.v0.json", "mechanical.v0.json"])
|
||||
self.assertEqual(sorted(self.sources()), ["__init__.py", "brokkr_actions.json", "core.py", "cutters.v0.json", "frame.v0.json", "mechanical.v0.json", "route.py"])
|
||||
for pattern in self.PACKAGE:
|
||||
for name, text in self.sources().items():
|
||||
if pattern is self.PACKAGE[2] and name == "__init__.py":
|
||||
|
|
|
|||
Loading…
Reference in a new issue