|
|
|
|
@ -613,6 +613,23 @@ class AutoRoutingTest(unittest.TestCase):
|
|
|
|
|
self.assertEqual((0.65, 0.2, 1.0), terminal_access.ViewObject.LineColor)
|
|
|
|
|
self.assertEqual("Solid", terminal_access.ViewObject.DrawStyle)
|
|
|
|
|
|
|
|
|
|
def test_route_carrier_exposes_capacity_property_for_auto_routing(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")
|
|
|
|
|
|
|
|
|
|
carrier = routing_network.create_route_carrier(
|
|
|
|
|
doc,
|
|
|
|
|
[app.Vector(0, 0, 20), app.Vector(100, 0, 20)],
|
|
|
|
|
project_uuid="project-1",
|
|
|
|
|
kind="WireDuct",
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
self.assertIn("QetRouteCarrierCapacity", carrier.PropertiesList)
|
|
|
|
|
self.assertEqual(1, carrier.QetRouteCarrierCapacity)
|
|
|
|
|
|
|
|
|
|
def test_route_graph_connects_crossing_carriers_at_intersection(self):
|
|
|
|
|
_install_fake_freecad()
|
|
|
|
|
terminal_objects, _wiring_objects, routing_network, auto_routing = _reload_modules()
|
|
|
|
|
|