mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-03 17:34:12 +02:00
cc23cf820f
A script laying out a drawing could read where a symbol is (elementGeometry) but not where its terminals are, so it could not place one symbol with a terminal exactly in line with another's -- the one thing that makes the wire between them straight. And it could read a wire's drawn path only through conductorSegments(), which names the wire by a terminal and so refuses any terminal carrying two wires: 282 of the 3120 wires in the shipped examples. terminalPosition(folio, element, terminal) returns where a wire docks on the terminal, in folio coordinates, and which way it leaves (n/e/s/w, the element's rotation included). conductorPath(folio, uuid) returns any wire's drawn path as points, by its uuid. tst_scriptlayoutreads checks the two against each other on every wire of a fixture: each path starts and ends where its terminals' positions say, and leaves each the way it faces; where conductorSegments() can name a wire, both give the same points; and a quarter turn turns the facing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015FPuYPS4T7QuEwjNu22rXD