|
|
|
|
@ -1033,6 +1033,28 @@ class AutoRoutingTest(unittest.TestCase):
|
|
|
|
|
self.assertIn("布线路径网络检查发现", message)
|
|
|
|
|
self.assertIn("首个问题:external_issue", message)
|
|
|
|
|
|
|
|
|
|
def test_format_routing_path_network_report_calls_out_wire_duct_break_point(self):
|
|
|
|
|
_install_fake_freecad()
|
|
|
|
|
terminal_objects, _wiring_objects, routing_network, auto_routing = _reload_modules()
|
|
|
|
|
app = sys.modules["FreeCAD"]
|
|
|
|
|
doc = FakeDocument()
|
|
|
|
|
terminal_objects.ensure_root_group(doc, "project-1")
|
|
|
|
|
routing_network.create_route_carrier(
|
|
|
|
|
doc,
|
|
|
|
|
[app.Vector(0, 0, 20), app.Vector(100, 0, 20)],
|
|
|
|
|
label="线槽A",
|
|
|
|
|
project_uuid="project-1",
|
|
|
|
|
kind="WireDuct",
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
result = auto_routing.check_eplan_routing_path_network(doc, project_uuid="project-1")
|
|
|
|
|
message = auto_routing.format_routing_path_network_report(result["diagnostic"])
|
|
|
|
|
|
|
|
|
|
self.assertIn("线槽端点疑似断开", message)
|
|
|
|
|
self.assertIn("线槽A", message)
|
|
|
|
|
self.assertIn("(0.0, 0.0, 20.0)", message)
|
|
|
|
|
self.assertIn("补齐相邻线槽", message)
|
|
|
|
|
|
|
|
|
|
def test_generate_routing_path_network_skips_far_terminal_access_to_protect_view_bbox(self):
|
|
|
|
|
_install_fake_freecad()
|
|
|
|
|
terminal_objects, _wiring_objects, _routing_network, _auto_routing = _reload_modules()
|
|
|
|
|
|