ictdesigntools.cabling.connectors¶
Connectors and the ports of panels, as parameterised drawing components.
connectors() reads the footprints in data/connectors.toml (RJ45 keystone, LC, SC, SN,
MPO, MMC and F, each with its NetBox port type). connector_component is one port's face as
an engine Component, so every port of that type is one SVG <use> target and one DXF
block. Ports are NetBox ports: one per connector (each LC of a duplex pair is its own port),
with the fibers behind it as positions; connectors that share a cutout (two LC in a duplex
adapter, two MMC in an SC footprint) are drawn in their adapter_component.
panel_layout places ports on a panel face in rows and groups, and patch_panel builds a
whole panel face from its parameters: panels with the same parameters share one component,
and a 24-port and a 48-port panel come from the same function.
>>> [p.n for p in panel_layout(24, "8p8c", 1)][:3], len(panel_layout(48, "8p8c", 2))
([1, 2, 3], 48)
>>> patch_panel(24, "8p8c") is patch_panel(24, "8p8c")
True
connectors
cached
¶
The connector footprints, by slug.
Source code in src/ictdesigntools/cabling/connectors.py
connector_for ¶
The footprint for a NetBox port type: slug when given (needed for types NetBox has
no slug of their own for, such as MMC under other), else the one footprint of that type;
None when there is none.
Source code in src/ictdesigntools/cabling/connectors.py
adapter_component
cached
¶
The body of an adapter that holds several ports (an LC duplex adapter), centred.
Source code in src/ictdesigntools/cabling/connectors.py
connector_component
cached
¶
One port's face, centred on (0, 0), in mm: the cutout and the opening inside it, or for
a connector that shares an adapter, just its own opening (adapter_component draws the
body once per adapter).
Source code in src/ictdesigntools/cabling/connectors.py
panel_layout ¶
panel_layout(
ports: int,
slug: str,
u_height: float = 1.0,
rows_: int | None = None,
group: int = 6,
label_mm: float = 0.0,
right_mm: float = 0.0,
) -> list[PortPlace]
Where ports connectors of type slug go on a panel u_height units high, in
adapters of per_adapter ports (two LC to a duplex adapter, numbered top then bottom):
adapters in rows_ rows (as few as fit when None), left to right and top to bottom, in
groups of group adapters with a wider gap between groups, centred in the rack opening after
label_mm kept free on its left and right_mm on its right. Raises ValueError when
they do not fit.
Source code in src/ictdesigntools/cabling/connectors.py
adapters ¶
The adapter bodies for places (none when each port is its own cutout).
Source code in src/ictdesigntools/cabling/connectors.py
patch_panel
cached
¶
patch_panel(
ports: int,
slug: str,
u_height: float = 1.0,
rows_: int | None = None,
numbers: bool = True,
) -> Component
A panel face built from its parameters: the faceplate, and each port as a placement of the connector's component, with port numbers above. Calls with the same parameters return the same component, so a page or a DXF file holds it once.
Source code in src/ictdesigntools/cabling/connectors.py
panel_drawing ¶
A panel on its own, for a data sheet or a check of the layout.