ROOM » Utilities » pin_retarget
room::pin_retarget
Aligns Qucs <Lib> pin centers with ROOM/Xschem symbol pin centers during cross-tool schematic export. Moreā¦
| Header: | #include "pin_retarget.h" |
|---|---|
| CMake: | target_link_libraries(mytarget PRIVATE ROOM::room_utils) |
Public Functions
pinRetargetBaseName(ref) | Strip path and .sym suffix. |
pinRetargetModelName(inst) | Resolve LibComp model name from instance properties. |
appendQucsToXschemPinRetargets(inst, dbuPerEditorUnit, out) | Build Qucs → Xschem pin map for one instance. |
appendXschemToQucsPinRetargets(inst, dbuPerEditorUnit, out) | Build Xschem → Qucs pin map. |
retargetPoint(pt, retargets, dbuPerEditorUnit) | Snap a wire endpoint to the nearest mapped pin center. |
retargetWirePolylinesQucsToCore(polylines, pinRetargets, dbuPerEditorUnit) | Retarget Qucs wire polylines onto ROOM pin centers and lift T-junction buses. |
Detailed Description
Qucs and Xschem draw the same ROOM topology with different native symbol geometries. When QucsExporter or xschem_bridge emits wires, pin retargeting keeps wire endpoints on the visible pin centers of attached primitive symbols instead of stale LibComp anchor points.
Tolerance scales with dbuPerEditorUnit (typically 1 for Qucs-origin,
1000 for Xschem-origin views). See Coordinate scale for
orientation helpers in coord_scale.h (orientFromQucsPlacement, PDK E–W → N–S compensation).