I am trying to make the replicate plugin Fix footprint positing for v6.99 by hildogjr · Pull Request #13 · MitjaNemec/ReplicateLayout · GitHub work on v6.99 Nightly. Ii could fix some issues related with the new, not documented API, but I still having a issue:
File "/home/lab/.local/share/kicad/6.99/3rdparty/plugins/com_github_MitjaNemec_ReplicateLayout/replicate_layout.py", line 880, in replicate_tracks
new_track.Rotate(dst_anchor_fp_position, delta_orientation)
File "/usr/lib/kicad-nightly/lib/python3/dist-packages/pcbnew.py", line 15736, in Rotate
return _pcbnew.PCB_TRACK_Rotate(self, aRotCentre, aAngle)
TypeError: in method 'PCB_TRACK_Rotate', argument 3 of type 'EDA_ANGLE const &'
The arguments that I am passing to new_track.Rotate(dst_anchor_fp_position, delta_orientation)
are “<class ‘pcbnew.VECTOR2I’>(102120000, 125129999) - <class ‘float’>0.0”.
If I understood, delta_orientation
must be a EDA_ANGLE
type, which I can from pcbnew import EDA_ANGLE
. But this EDA_ANGLE
can not be initialized be ale double argument as angle. What am I missing?
To reproduce this, it is possible to simple try to rotate a track:
import pcbnew
board = pcbnew.GetBoard()
tracks = board.GetTracks()
t = tracks[0]
from pcbnew import VECTOR2I, EDA_ANGLE
t.Rotate(VECTOR2I(0, 0), 0.0) # or t.Rotate(VECTOR2I(0, 0), EDA_ANGLE(0))