Alex Shvartzkop
4497aaa3fa
Prevent crash when a python script tries to use pcbnew too early.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15414
(cherry picked from commit b1b66f66f4
)
2023-08-25 00:17:03 +03:00
Jan Mrázek
8451e6dcf1
Fix failure on multiple DRC runs via scripting
...
(cherry picked from commit 2d010278ad
)
2023-08-15 01:40:04 +00:00
Salvador E. Tropea
9c1509b8c3
Provide some degree of compatibility for GetShownText in Python
...
This patch keeps the new API for GetShownText (argument order inverted), but also allows calling the member without parameters.
2023-05-11 23:39:09 +00:00
qu1ck
d1d0d61b4f
Add usable PCB_GROUP::GetItems() swig wrapper
...
(cherry picked from commit 9b58f50c68
)
2023-05-11 01:15:17 +00:00
Marek Roszko
9956c04526
Load custom drawing sheets for pcb cli
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14171
(cherry picked from commit 9f64c7f354
)
2023-04-21 03:18:27 +00:00
jean-pierre charras
c599385c8b
footprint wizards: fixes and enhancements
...
From master branch
2023-04-16 17:32:31 +02:00
jean-pierre charras
7843e6a709
Python: re-add "def Duplicate(self)" with the correct call to C++ Duplicate().
...
From master branch.
2023-04-15 16:20:42 +02:00
Jeff Young
ad612864ce
Update DRC exclusions model to match terminology.
...
DRC exclusions were originally written following the C++
pragma model (ie: allow this violation here). However, the
"exclusion" terminology we used in the GUI suggests a model
model where the exclusions go away when the violation no
longer exists.
Fixes https://gitlab.com/kicad/code/kicad/issues/14351
2023-04-15 12:10:23 +01:00
Ian McInerney
8e579ec8e0
Remove python-based board_item duplicate method
...
This method shadows the C++ method, and doesn't properly handle updating
the duplicated object's KIID to be unique.
Also add tests to ensure the KIIDs are unique after duplication.
Fixes https://gitlab.com/kicad/code/kicad/issues/14460
(Cherry-picked from 5d0b5e16ff
)
2023-04-12 16:07:00 +01:00
Salvador E. Tropea
e5087ca3db
Load the global fp-lib-table before running the Python DRC
...
Without this we get parity errors for all the KiCad footprints
2023-03-17 21:00:41 +00:00
Jeff Young
249bcd9e1a
Update dimension units when opening PCBs in CLI.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/14170
(cherry picked from commit a0adb59437
)
2023-03-14 11:56:33 +00:00
mitxela
2358ff6f07
Helper function to allow net.GetNetClassName()
...
(cherry picked from commit 734d3667a8
)
2023-03-09 14:03:02 +00:00
mitxela
541f7467c6
Fix python GetAllNetClasses
...
(cherry picked from commit 716328e511
)
2023-03-09 14:02:34 +00:00
qu1ck
d610486c1e
Add vector3 to swig
...
Fixes regression in 7.0 making fp 3d model offsets not accessible in
python
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14179
(cherry picked from commit 88062c5fc3
)
2023-03-06 11:23:09 -08:00
Salvador E. Tropea
d311915f9d
Fix the CONNECTIVITY_DATA::GetNetItems Python API
...
- The C++ member now uses std::vector<KICAD_T>
- The Python side can use a single value or a list,
like in v6.
The std::vector translation is based on the v6 KICAD_T[]
translation.
2023-03-01 18:49:12 +00:00
qu1ck
396bda5611
Sync pcbnew selection with selected items after plugin is run
...
(cherry picked from commit 9f10c142c4
)
2023-02-26 17:58:57 +00:00
qu1ck
5b574901b3
Fix swig mappings for PCB_BITMAP
...
From Master branch.
2023-02-26 10:28:59 +01:00
Jon Evans
6948a0bebd
Expose new netclass storage to SWIG
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13337
2023-02-11 09:50:24 -05:00
Marek Roszko
0ff32d20cd
wxS more things
2023-01-22 09:41:42 -05:00
Seth Hillbrand
1d223d1439
Safely load python plugins
...
Catch potential exceptions when doing the initial python plugin load
Fixes https://gitlab.com/kicad/code/kicad/issues/12231
2023-01-17 12:56:15 -08:00
qu1ck
f153ff8453
Add GetCurrentSelection() python scripting helper
2023-01-10 16:39:48 +00:00
jean-pierre charras
ae8bbcad32
PadArray.py: ensure parameters used to create a VECTOR2I are ints.
...
Fixes #13430
https://gitlab.com/kicad/code/kicad/issues/13430
2023-01-08 09:10:13 +01:00
qu1ck
7dfa100ff0
Correctly refresh the board after action plugin run and maintain
...
selection
2023-01-05 14:05:15 -08:00
Seth Hillbrand
98d55ce82f
Avoid rebuilding with each commit
...
We shouldn't include the kicad_build_info.h outside of the wrapper
build_info.h. Also adds an error directive to prevent re-introduction
of define dependencies
2023-01-04 11:32:15 -08:00
Jan Mrázek
f601c87cea
Export UNITS_PROVIDE into SWIG
2022-12-19 17:30:37 +00:00
jean-pierre charras
abff7975f1
Python scripting: fix some issues when trying to create a DRC Report:
...
- avoid aborting the DRC report on a .dru issue without any error message.
- ensure the list of layer names is up to date (contains both canonical
and user layers names, that can be used in DRC tests.
Fixes #11410
https://gitlab.com/kicad/code/kicad/issues/11410
2022-12-19 12:39:20 +01:00
jean-pierre charras
6c73fe05e9
python scripting: better fix for commit 5a79821
(fix crash due to a null pointer):
...
Try to use a better error message for severity.
Fixes #13160
https://gitlab.com/kicad/code/kicad/issues/13160
2022-12-18 18:31:19 +01:00
Jan Mrázek
90fb315113
Add missing text alignment types to SWIG export
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13174
2022-12-16 18:55:21 +00:00
Jan Mrázek
e699c25d98
Add operators for the SWIG wrapper of EDA_ANGLE
2022-12-16 18:55:21 +00:00
Jan Mrázek
66c2462c7e
Eliminate angle as double in SWIG wrapper
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13171
2022-12-16 18:55:21 +00:00
jean-pierre charras
5a7982161d
python scripting: fix crash due to a null pointer use.
...
Fixes #13160
https://gitlab.com/kicad/code/kicad/issues/13160
2022-12-15 14:27:29 +01:00
Yang sheng
aff5245041
Fix enum class DRILL_MARKS no export to python
2022-12-09 18:07:58 +00:00
qu1ck
25688eb75e
Include plotprint_opts.h in swig
2022-12-07 04:02:59 +00:00
Jeff Young
97fd99ec99
Re-resolve netclasses after assigning netclass to pattern.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/12965
2022-11-22 14:54:08 +00:00
Marek Roszko
cd30da179a
Round out the cli with position file export
2022-11-07 19:53:35 -05:00
Jeff Young
64a6fc0fd4
Push UNITS_PROVIDER down into a low-level mixin.
...
This allows us to also construct cheap UNIT_PROVIDERs for specific
tasks when necessary.
2022-09-19 17:10:59 +01:00
jean-pierre charras
97963a2bba
Better after base_units.cpp changes in python stuff.
...
Move an include to kicad.i
2022-09-17 11:21:48 +02:00
jean-pierre charras
71bb7d63d9
Fix isses after base_units.cpp changes.
2022-09-17 10:56:56 +02:00
Marek Roszko
1e0eca0916
Eyeball swig fix after the units changes
2022-09-16 22:31:52 -04:00
Marek Roszko
3d5913c825
Remove convert_to_biu.h, merge contents to base_units.h
2022-09-16 21:09:28 -04:00
Marek Roszko
7a5829f8d6
Move IU2Mils
2022-09-16 21:09:27 -04:00
Marek Roszko
e6ed275c25
Repoint IU_PER_MILS
2022-09-16 21:09:26 -04:00
Mark Roszko
b00178adb3
Nuke base_units from orbit
2022-09-16 04:38:10 +00:00
Jeff Young
77c79b6f6a
Apply searchArea architecture to courtyard functions.
2022-08-28 21:20:03 +01:00
Jeff Young
f99761e5bd
entirelyInsideArea() prototype.
2022-08-26 13:22:57 +01:00
Seth Hillbrand
e4bb1560c5
Set locale in python save routine
...
Fixes https://gitlab.com/kicad/code/kicad/issues/11006
(cherry picked from commit c3496d61eb
)
2022-08-23 09:53:18 -07:00
Seth Hillbrand
af34835fdf
Restore removed data
...
Functions and definitions used in Python scripting should not be
removed. Comments in header files should never be removed (only
updated/corrected)
2022-08-20 08:40:08 -07:00
Jeff Young
8b0efa8ac4
A bit of cleanup from last commit.
2022-08-20 11:14:44 +01:00
Jeff Young
aa2ad3b44c
Move KICAD_T[] to std::initializer_list<KICAD_T>.
2022-08-20 10:28:11 +01:00
Jeff Young
1f347582f8
Introduce new marker type so we can track DRC errors on the drawing sheet.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/12221
2022-08-15 18:03:03 +01:00