ictdesigntools.cabling.cables¶
Cables for the fill and pulling calculations: types, lines (a type and a count) and the spaces they are checked in.
Values are metric: outside diameters in mm, weights in kg per metre of one cable, pulling limits in newtons. The typical cable types are published in inches, lb/ft and lbf, and are converted exactly when this module loads.
FillError ¶
Bases: ValueError
Raised when a pathway, its size or its cables are not valid.
CableLine
dataclass
¶
CableLine(
label: str,
od_mm: float,
count: int,
weight_kg_per_m: float | None = None,
max_tension_n: float | None = None,
cable_type: str | None = None,
min_bend_radius_mm: float | None = None,
max_swbp_n_per_m: float | None = None,
)
count cables of one kind. Make one with CableLine.of (a typical type) or
CableLine.custom; label is free text for reports.
of
classmethod
¶
of(
cable_type: str,
count: int,
*,
weight_kg_per_m: float | None = None,
max_tension_n: float | None = None,
label: str | None = None,
min_bend_radius_mm: float | None = None,
max_swbp_n_per_m: float | None = None,
) -> CableLine
Cables of a typical type; a value given replaces the typical one.
Source code in src/ictdesigntools/cabling/cables.py
Compartment
dataclass
¶
Compartment(
label: str,
lines: list[CableLine],
container_area_mm2: float,
limit_pct: float,
target_pct: float | None = None,
kind: str = "",
inner_mm: float = 0.0,
outer_mm: float = 0.0,
remaining_width: bool = False,
)
One separately checked space: a tray lane or a subduct.
merge_lines ¶
Combine the cable lines of several groups into one list (for colours and the legend).
Lines that differ only in their count are merged and their counts added. Returns the merged lines and, for each group, the merged index of each of its lines.