Hi,
I try to write a plugin that creates a line but I get errors
Start(… needs VECTOR2 and I cannot give it what it want
any help from a script guru ?
thanks
line = pcbnew.PCB_SHAPE(board)
start_point = pcbnew.wxPoint(int(x * 1e6), int(0))
end_point = pcbnew.wxPoint(int(x * 1e6), int(100 * 1e6))
line.SetStart(start_point)
line.SetEnd(end_point)
eelik
2
KiCad version info? -------
Application: KiCad x64 on x64
Version: 8.0.2, release build
Libraries:
wxWidgets 3.2.4
FreeType 2.12.1
HarfBuzz 8.3.0
FontConfig 2.14.2
libcurl/8.5.0-DEV Schannel zlib/1.3
Platform: Windows 10 (build 19045), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
Date: Apr 27 2024 23:05:17
wxWidgets: 3.2.4 (wchar_t,wx containers)
Boost: 1.83.0
OCC: 7.7.1
Curl: 8.5.0-DEV
ngspice: 42
Compiler: Visual C++ 1936 without C++ ABI
Build settings:
eelik
4
start_point = pcbnew.VECTOR2I(pcbnew.FromMM(1), pcbnew.FromMM(1))
thanks, it was so simple
btw I cannot set the layer to user 9 or user9
any idea how to achieve this?
line.SetLayer(pcbnew.User.9)
eelik
6
1 Like
thanks
for people who want to know, it is User_9
1 Like
system
Closed
8
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.