|
|
|
@ -38,6 +38,7 @@ DEFAULT_ROUTE_PATH_FACE_OFFSET = 2.0
|
|
|
|
DEFAULT_AUTO_WIRE_DUCT_MIN_ASPECT = 2.5
|
|
|
|
DEFAULT_AUTO_WIRE_DUCT_MIN_ASPECT = 2.5
|
|
|
|
DEFAULT_TERMINAL_ACCESS_MAX_DISTANCE = 1000.0
|
|
|
|
DEFAULT_TERMINAL_ACCESS_MAX_DISTANCE = 1000.0
|
|
|
|
DEFAULT_ADJOINING_DUCT_TOLERANCE = 5.0
|
|
|
|
DEFAULT_ADJOINING_DUCT_TOLERANCE = 5.0
|
|
|
|
|
|
|
|
DEFAULT_WIRING_CUT_OUT_BRIDGE_EXTENSION = 20.0
|
|
|
|
WIRE_DUCT_OBSTACLE_MODE = "PassThrough"
|
|
|
|
WIRE_DUCT_OBSTACLE_MODE = "PassThrough"
|
|
|
|
SUPPORT_SURFACE_OBSTACLE_MODE = "SupportSurface"
|
|
|
|
SUPPORT_SURFACE_OBSTACLE_MODE = "SupportSurface"
|
|
|
|
WIRE_DUCT_NAME_KEYWORDS = (
|
|
|
|
WIRE_DUCT_NAME_KEYWORDS = (
|
|
|
|
@ -1466,7 +1467,7 @@ def _sync_wire_duct_source_carriers(doc, source, spec, project_uuid="", capacity
|
|
|
|
return True
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _wiring_cut_out_points_from_bbox(bbox):
|
|
|
|
def _wiring_cut_out_points_from_bbox(bbox, bridge_extension=0.0):
|
|
|
|
extents = _bbox_extents(bbox)
|
|
|
|
extents = _bbox_extents(bbox)
|
|
|
|
if not extents:
|
|
|
|
if not extents:
|
|
|
|
return []
|
|
|
|
return []
|
|
|
|
@ -1482,6 +1483,9 @@ def _wiring_cut_out_points_from_bbox(bbox):
|
|
|
|
fallback = max(other_extents or [DEFAULT_WIRE_DUCT_OPEN_END_MIN_LENGTH])
|
|
|
|
fallback = max(other_extents or [DEFAULT_WIRE_DUCT_OPEN_END_MIN_LENGTH])
|
|
|
|
low = _axis_value(center, through_axis) - fallback * 0.5
|
|
|
|
low = _axis_value(center, through_axis) - fallback * 0.5
|
|
|
|
high = _axis_value(center, through_axis) + fallback * 0.5
|
|
|
|
high = _axis_value(center, through_axis) + fallback * 0.5
|
|
|
|
|
|
|
|
extension = max(float(bridge_extension or 0.0), 0.0)
|
|
|
|
|
|
|
|
low -= extension
|
|
|
|
|
|
|
|
high += extension
|
|
|
|
start = _set_axis(center, through_axis, low)
|
|
|
|
start = _set_axis(center, through_axis, low)
|
|
|
|
end = _set_axis(center, through_axis, high)
|
|
|
|
end = _set_axis(center, through_axis, high)
|
|
|
|
if _distance(start, end) <= DEFAULT_NODE_TOLERANCE:
|
|
|
|
if _distance(start, end) <= DEFAULT_NODE_TOLERANCE:
|
|
|
|
@ -1887,7 +1891,11 @@ def create_wire_duct_carriers_from_document(
|
|
|
|
return created
|
|
|
|
return created
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def create_wiring_cut_out_carriers_from_document(doc, project_uuid=""):
|
|
|
|
def create_wiring_cut_out_carriers_from_document(
|
|
|
|
|
|
|
|
doc,
|
|
|
|
|
|
|
|
project_uuid="",
|
|
|
|
|
|
|
|
bridge_extension=DEFAULT_WIRING_CUT_OUT_BRIDGE_EXTENSION,
|
|
|
|
|
|
|
|
):
|
|
|
|
"""Create pass-through route carriers for wiring cut-out objects."""
|
|
|
|
"""Create pass-through route carriers for wiring cut-out objects."""
|
|
|
|
cleanup_invalid_source_carriers(doc)
|
|
|
|
cleanup_invalid_source_carriers(doc)
|
|
|
|
created = []
|
|
|
|
created = []
|
|
|
|
@ -1895,7 +1903,7 @@ def create_wiring_cut_out_carriers_from_document(doc, project_uuid=""):
|
|
|
|
bbox = _bound_box_from_object(source)
|
|
|
|
bbox = _bound_box_from_object(source)
|
|
|
|
if bbox is None:
|
|
|
|
if bbox is None:
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
points = _wiring_cut_out_points_from_bbox(bbox)
|
|
|
|
points = _wiring_cut_out_points_from_bbox(bbox, bridge_extension=bridge_extension)
|
|
|
|
if len(points) < 2:
|
|
|
|
if len(points) < 2:
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
live_carrier = _live_source_carrier(doc, source)
|
|
|
|
live_carrier = _live_source_carrier(doc, source)
|
|
|
|
|