fix: negate y-axis in graphics transform for correct symbol bounding boxes
Library symbols use y-up coordinates while schematics use y-down. The _transform_local_point function was not negating y, causing asymmetric symbols (e.g. power:VEE) to have their bounding boxes computed in the wrong direction — missing overlaps with adjacent components. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -332,8 +332,12 @@ def _transform_local_point(
|
||||
) -> Tuple[float, float]:
|
||||
"""
|
||||
Transform a point from local symbol coordinates to absolute schematic
|
||||
coordinates using KiCad's transform order: mirror → rotate → translate.
|
||||
coordinates using KiCad's transform order:
|
||||
negate-y (lib y-up → schematic y-down) → mirror → rotate → translate.
|
||||
"""
|
||||
# Library symbols use y-up; schematic uses y-down
|
||||
ly = -ly
|
||||
|
||||
# Apply mirroring in local coords
|
||||
if mirror_x:
|
||||
ly = -ly
|
||||
|
||||
Reference in New Issue
Block a user