KiCad Pcbnew Python Scripting
pcbnew.py
Go to the documentation of this file.
1# This file was automatically generated by SWIG (http://www.swig.org).
2# Version 4.0.2
3#
4# Do not make changes to this file unless you know what you are doing--modify
5# the SWIG interface file instead.
6
7from sys import version_info as _swig_python_version_info
8if _swig_python_version_info < (2, 7, 0):
9 raise RuntimeError("Python 2.7 or later required")
10
11# Import the low-level C/C++ module
12if __package__ or "." in __name__:
13 from . import _pcbnew
14else:
15 import _pcbnew
16
17try:
18 import builtins as __builtin__
19except ImportError:
20 import __builtin__
21
22def _swig_repr(self):
23 try:
24 strthis = "proxy of " + self.this.__repr__()
25 except __builtin__.Exception:
26 strthis = ""
27 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
28
29
30def _swig_setattr_nondynamic_instance_variable(set):
31 def set_instance_attr(self, name, value):
32 if name == "thisown":
33 self.this.own(value)
34 elif name == "this":
35 set(self, name, value)
36 elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
37 set(self, name, value)
38 else:
39 raise AttributeError("You cannot add instance attributes to %s" % self)
40 return set_instance_attr
41
42
43def _swig_setattr_nondynamic_class_variable(set):
44 def set_class_attr(cls, name, value):
45 if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
46 set(cls, name, value)
47 else:
48 raise AttributeError("You cannot add class attributes to %s" % cls)
49 return set_class_attr
50
51
52def _swig_add_metaclass(metaclass):
53 """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
54 def wrapper(cls):
55 return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
56 return wrapper
57
58
60 """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
61 __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
62
63
64class SwigPyIterator(object):
65 r"""Proxy of C++ swig::SwigPyIterator class."""
66
67 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
68
69 def __init__(self, *args, **kwargs):
70 raise AttributeError("No constructor defined - class is abstract")
71 __repr__ = _swig_repr
72 __swig_destroy__ = _pcbnew.delete_SwigPyIterator
73
74 def value(self):
75 r"""value(SwigPyIterator self) -> PyObject *"""
76 return _pcbnew.SwigPyIterator_value(self)
77
78 def incr(self, n=1):
79 r"""incr(SwigPyIterator self, size_t n=1) -> SwigPyIterator"""
80 return _pcbnew.SwigPyIterator_incr(self, n)
81
82 def decr(self, n=1):
83 r"""decr(SwigPyIterator self, size_t n=1) -> SwigPyIterator"""
84 return _pcbnew.SwigPyIterator_decr(self, n)
85
86 def distance(self, x):
87 r"""distance(SwigPyIterator self, SwigPyIterator x) -> ptrdiff_t"""
88 return _pcbnew.SwigPyIterator_distance(self, x)
89
90 def equal(self, x):
91 r"""equal(SwigPyIterator self, SwigPyIterator x) -> bool"""
92 return _pcbnew.SwigPyIterator_equal(self, x)
93
94 def copy(self):
95 r"""copy(SwigPyIterator self) -> SwigPyIterator"""
96 return _pcbnew.SwigPyIterator_copy(self)
97
98 def next(self):
99 r"""next(SwigPyIterator self) -> PyObject *"""
100 return _pcbnew.SwigPyIterator_next(self)
101
102 def __next__(self):
103 r"""__next__(SwigPyIterator self) -> PyObject *"""
104 return _pcbnew.SwigPyIterator___next__(self)
105
106 def previous(self):
107 r"""previous(SwigPyIterator self) -> PyObject *"""
108 return _pcbnew.SwigPyIterator_previous(self)
109
110 def advance(self, n):
111 r"""advance(SwigPyIterator self, ptrdiff_t n) -> SwigPyIterator"""
112 return _pcbnew.SwigPyIterator_advance(self, n)
113
114 def __eq__(self, x):
115 r"""__eq__(SwigPyIterator self, SwigPyIterator x) -> bool"""
116 return _pcbnew.SwigPyIterator___eq__(self, x)
117
118 def __ne__(self, x):
119 r"""__ne__(SwigPyIterator self, SwigPyIterator x) -> bool"""
120 return _pcbnew.SwigPyIterator___ne__(self, x)
121
122 def __iadd__(self, n):
123 r"""__iadd__(SwigPyIterator self, ptrdiff_t n) -> SwigPyIterator"""
124 return _pcbnew.SwigPyIterator___iadd__(self, n)
125
126 def __isub__(self, n):
127 r"""__isub__(SwigPyIterator self, ptrdiff_t n) -> SwigPyIterator"""
128 return _pcbnew.SwigPyIterator___isub__(self, n)
129
130 def __add__(self, n):
131 r"""__add__(SwigPyIterator self, ptrdiff_t n) -> SwigPyIterator"""
132 return _pcbnew.SwigPyIterator___add__(self, n)
133
134 def __sub__(self, *args):
135 r"""
136 __sub__(SwigPyIterator self, ptrdiff_t n) -> SwigPyIterator
137 __sub__(SwigPyIterator self, SwigPyIterator x) -> ptrdiff_t
138 """
139 return _pcbnew.SwigPyIterator___sub__(self, *args)
140 def __iter__(self):
141 return self
142
143# Register SwigPyIterator in _pcbnew:
144_pcbnew.SwigPyIterator_swigregister(SwigPyIterator)
145
147 r"""Proxy of C++ std::basic_string< char > class."""
148
149 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
150 __repr__ = _swig_repr
151
152 def length(self):
153 r"""length(string self) -> std::basic_string< char >::size_type"""
154 return _pcbnew.string_length(self)
155
156 def max_size(self):
157 r"""max_size(string self) -> std::basic_string< char >::size_type"""
158 return _pcbnew.string_max_size(self)
159
160 def capacity(self):
161 r"""capacity(string self) -> std::basic_string< char >::size_type"""
162 return _pcbnew.string_capacity(self)
163
164 def reserve(self, __res_arg=0):
165 r"""reserve(string self, std::basic_string< char >::size_type __res_arg=0)"""
166 return _pcbnew.string_reserve(self, __res_arg)
167
168 def copy(self, __s, __n, __pos=0):
169 r"""copy(string self, char * __s, std::basic_string< char >::size_type __n, std::basic_string< char >::size_type __pos=0) -> std::basic_string< char >::size_type"""
170 return _pcbnew.string_copy(self, __s, __n, __pos)
171
172 def c_str(self):
173 r"""c_str(string self) -> char const *"""
174 return _pcbnew.string_c_str(self)
175
176 def find(self, *args):
177 r"""
178 find(string self, char const * __s, std::basic_string< char >::size_type __pos, std::basic_string< char >::size_type __n) -> std::basic_string< char >::size_type
179 find(string self, string __str, std::basic_string< char >::size_type __pos=0) -> std::basic_string< char >::size_type
180 find(string self, char __c, std::basic_string< char >::size_type __pos=0) -> std::basic_string< char >::size_type
181 """
182 return _pcbnew.string_find(self, *args)
183
184 def rfind(self, *args):
185 r"""
186 rfind(string self, string __str, std::basic_string< char >::size_type __pos=std::basic_string< char >::npos) -> std::basic_string< char >::size_type
187 rfind(string self, char const * __s, std::basic_string< char >::size_type __pos, std::basic_string< char >::size_type __n) -> std::basic_string< char >::size_type
188 rfind(string self, char __c, std::basic_string< char >::size_type __pos=std::basic_string< char >::npos) -> std::basic_string< char >::size_type
189 """
190 return _pcbnew.string_rfind(self, *args)
191
192 def find_first_of(self, *args):
193 r"""
194 find_first_of(string self, string __str, std::basic_string< char >::size_type __pos=0) -> std::basic_string< char >::size_type
195 find_first_of(string self, char const * __s, std::basic_string< char >::size_type __pos, std::basic_string< char >::size_type __n) -> std::basic_string< char >::size_type
196 find_first_of(string self, char __c, std::basic_string< char >::size_type __pos=0) -> std::basic_string< char >::size_type
197 """
198 return _pcbnew.string_find_first_of(self, *args)
199
200 def find_last_of(self, *args):
201 r"""
202 find_last_of(string self, string __str, std::basic_string< char >::size_type __pos=std::basic_string< char >::npos) -> std::basic_string< char >::size_type
203 find_last_of(string self, char const * __s, std::basic_string< char >::size_type __pos, std::basic_string< char >::size_type __n) -> std::basic_string< char >::size_type
204 find_last_of(string self, char __c, std::basic_string< char >::size_type __pos=std::basic_string< char >::npos) -> std::basic_string< char >::size_type
205 """
206 return _pcbnew.string_find_last_of(self, *args)
207
208 def find_first_not_of(self, *args):
209 r"""
210 find_first_not_of(string self, string __str, std::basic_string< char >::size_type __pos=0) -> std::basic_string< char >::size_type
211 find_first_not_of(string self, char const * __s, std::basic_string< char >::size_type __pos, std::basic_string< char >::size_type __n) -> std::basic_string< char >::size_type
212 find_first_not_of(string self, char __c, std::basic_string< char >::size_type __pos=0) -> std::basic_string< char >::size_type
213 """
214 return _pcbnew.string_find_first_not_of(self, *args)
215
216 def find_last_not_of(self, *args):
217 r"""
218 find_last_not_of(string self, string __str, std::basic_string< char >::size_type __pos=std::basic_string< char >::npos) -> std::basic_string< char >::size_type
219 find_last_not_of(string self, char const * __s, std::basic_string< char >::size_type __pos, std::basic_string< char >::size_type __n) -> std::basic_string< char >::size_type
220 find_last_not_of(string self, char __c, std::basic_string< char >::size_type __pos=std::basic_string< char >::npos) -> std::basic_string< char >::size_type
221 """
222 return _pcbnew.string_find_last_not_of(self, *args)
223
224 def substr(self, *args):
225 r"""substr(string self, std::basic_string< char >::size_type __pos=0, std::basic_string< char >::size_type __n=std::basic_string< char >::npos) -> string"""
226 return _pcbnew.string_substr(self, *args)
227
228 def empty(self):
229 r"""empty(string self) -> bool"""
230 return _pcbnew.string_empty(self)
231
232 def size(self):
233 r"""size(string self) -> std::basic_string< char >::size_type"""
234 return _pcbnew.string_size(self)
235
236 def swap(self, v):
237 r"""swap(string self, string v)"""
238 return _pcbnew.string_swap(self, v)
239
240 def begin(self):
241 r"""begin(string self) -> std::basic_string< char >::iterator"""
242 return _pcbnew.string_begin(self)
243
244 def end(self):
245 r"""end(string self) -> std::basic_string< char >::iterator"""
246 return _pcbnew.string_end(self)
247
248 def rbegin(self):
249 r"""rbegin(string self) -> std::basic_string< char >::reverse_iterator"""
250 return _pcbnew.string_rbegin(self)
251
252 def rend(self):
253 r"""rend(string self) -> std::basic_string< char >::reverse_iterator"""
254 return _pcbnew.string_rend(self)
255
256 def get_allocator(self):
257 r"""get_allocator(string self) -> std::basic_string< char >::allocator_type"""
258 return _pcbnew.string_get_allocator(self)
259
260 def erase(self, *args):
261 r"""
262 erase(string self, std::basic_string< char >::size_type __pos=0, std::basic_string< char >::size_type __n=std::basic_string< char >::npos) -> string
263 erase(string self, std::basic_string< char >::iterator pos) -> std::basic_string< char >::iterator
264 erase(string self, std::basic_string< char >::iterator first, std::basic_string< char >::iterator last) -> std::basic_string< char >::iterator
265 """
266 return _pcbnew.string_erase(self, *args)
267
268 def __init__(self, *args):
269 r"""
270 __init__(string self, char const * __s, std::basic_string< char >::size_type __n) -> string
271 __init__(string self) -> string
272 __init__(string self, string other) -> string
273 __init__(string self, std::basic_string< char >::size_type size, std::basic_string< char >::value_type value) -> string
274 """
275 _pcbnew.string_swiginit(self, _pcbnew.new_string(*args))
276
277 def assign(self, *args):
278 r"""
279 assign(string self, string __str) -> string
280 assign(string self, string __str, std::basic_string< char >::size_type __pos, std::basic_string< char >::size_type __n) -> string
281 assign(string self, char const * __s, std::basic_string< char >::size_type __n) -> string
282 assign(string self, std::basic_string< char >::size_type n, std::basic_string< char >::value_type x)
283 """
284 return _pcbnew.string_assign(self, *args)
285
286 def resize(self, *args):
287 r"""
288 resize(string self, std::basic_string< char >::size_type new_size)
289 resize(string self, std::basic_string< char >::size_type new_size, std::basic_string< char >::value_type x)
290 """
291 return _pcbnew.string_resize(self, *args)
292
293 def iterator(self):
294 r"""iterator(string self) -> SwigPyIterator"""
295 return _pcbnew.string_iterator(self)
296 def __iter__(self):
297 return self.iterator()
298
299 def __nonzero__(self):
300 r"""__nonzero__(string self) -> bool"""
301 return _pcbnew.string___nonzero__(self)
302
303 def __bool__(self):
304 r"""__bool__(string self) -> bool"""
305 return _pcbnew.string___bool__(self)
306
307 def __len__(self):
308 r"""__len__(string self) -> std::basic_string< char >::size_type"""
309 return _pcbnew.string___len__(self)
310
311 def __getslice__(self, i, j):
312 r"""__getslice__(string self, std::basic_string< char >::difference_type i, std::basic_string< char >::difference_type j) -> string"""
313 return _pcbnew.string___getslice__(self, i, j)
314
315 def __setslice__(self, *args):
316 r"""
317 __setslice__(string self, std::basic_string< char >::difference_type i, std::basic_string< char >::difference_type j)
318 __setslice__(string self, std::basic_string< char >::difference_type i, std::basic_string< char >::difference_type j, string v)
319 """
320 return _pcbnew.string___setslice__(self, *args)
321
322 def __delslice__(self, i, j):
323 r"""__delslice__(string self, std::basic_string< char >::difference_type i, std::basic_string< char >::difference_type j)"""
324 return _pcbnew.string___delslice__(self, i, j)
325
326 def __delitem__(self, *args):
327 r"""
328 __delitem__(string self, std::basic_string< char >::difference_type i)
329 __delitem__(string self, PySliceObject * slice)
330 """
331 return _pcbnew.string___delitem__(self, *args)
332
333 def __getitem__(self, *args):
334 r"""
335 __getitem__(string self, PySliceObject * slice) -> string
336 __getitem__(string self, std::basic_string< char >::difference_type i) -> std::basic_string< char >::value_type
337 """
338 return _pcbnew.string___getitem__(self, *args)
339
340 def __setitem__(self, *args):
341 r"""
342 __setitem__(string self, PySliceObject * slice, string v)
343 __setitem__(string self, PySliceObject * slice)
344 __setitem__(string self, std::basic_string< char >::difference_type i, std::basic_string< char >::value_type x)
345 """
346 return _pcbnew.string___setitem__(self, *args)
347
348 def insert(self, *args):
349 r"""
350 insert(string self, std::basic_string< char >::size_type __pos1, string __str) -> string
351 insert(string self, std::basic_string< char >::size_type __pos1, string __str, std::basic_string< char >::size_type __pos2, std::basic_string< char >::size_type __n) -> string
352 insert(string self, std::basic_string< char >::size_type __pos, char const * __s, std::basic_string< char >::size_type __n) -> string
353 insert(string self, std::basic_string< char >::size_type __pos, std::basic_string< char >::size_type __n, char __c) -> string
354 insert(string self, std::basic_string< char >::iterator pos, std::basic_string< char >::value_type x) -> std::basic_string< char >::iterator
355 insert(string self, std::basic_string< char >::iterator pos, std::basic_string< char >::size_type n, std::basic_string< char >::value_type x)
356 insert(string self, std::basic_string< char >::iterator __p, std::basic_string< char >::size_type __n, char __c)
357 """
358 return _pcbnew.string_insert(self, *args)
359
360 def replace(self, *args):
361 r"""
362 replace(string self, std::basic_string< char >::size_type __pos, std::basic_string< char >::size_type __n, string __str) -> string
363 replace(string self, std::basic_string< char >::size_type __pos1, std::basic_string< char >::size_type __n1, string __str, std::basic_string< char >::size_type __pos2, std::basic_string< char >::size_type __n2) -> string
364 replace(string self, std::basic_string< char >::size_type __pos, std::basic_string< char >::size_type __n1, char const * __s, std::basic_string< char >::size_type __n2) -> string
365 replace(string self, std::basic_string< char >::size_type __pos, std::basic_string< char >::size_type __n1, std::basic_string< char >::size_type __n2, char __c) -> string
366 replace(string self, std::basic_string< char >::iterator __i1, std::basic_string< char >::iterator __i2, string __str) -> string
367 replace(string self, std::basic_string< char >::iterator __i1, std::basic_string< char >::iterator __i2, char const * __s, std::basic_string< char >::size_type __n) -> string
368 replace(string self, std::basic_string< char >::iterator __i1, std::basic_string< char >::iterator __i2, std::basic_string< char >::size_type __n, char __c) -> string
369 replace(string self, std::basic_string< char >::iterator __i1, std::basic_string< char >::iterator __i2, char const * __k1, char const * __k2) -> string
370 replace(string self, std::basic_string< char >::iterator __i1, std::basic_string< char >::iterator __i2, std::basic_string< char >::const_iterator __k1, std::basic_string< char >::const_iterator __k2) -> string
371 """
372 return _pcbnew.string_replace(self, *args)
373
374 def __iadd__(self, v):
375 r"""__iadd__(string self, string v) -> string"""
376 return _pcbnew.string___iadd__(self, v)
377
378 def __add__(self, v):
379 r"""__add__(string self, string v) -> string"""
380 return _pcbnew.string___add__(self, v)
381
382 def __radd__(self, v):
383 r"""__radd__(string self, string v) -> string"""
384 return _pcbnew.string___radd__(self, v)
385
386 def __str__(self):
387 r"""__str__(string self) -> string"""
388 return _pcbnew.string___str__(self)
389
390 def __rlshift__(self, out):
391 r"""__rlshift__(string self, std::basic_ostream< char,std::char_traits< char > > & out) -> std::basic_ostream< char,std::char_traits< char > > &"""
392 return _pcbnew.string___rlshift__(self, out)
393
394 def __eq__(self, v):
395 r"""__eq__(string self, string v) -> bool"""
396 return _pcbnew.string___eq__(self, v)
397
398 def __ne__(self, v):
399 r"""__ne__(string self, string v) -> bool"""
400 return _pcbnew.string___ne__(self, v)
401
402 def __gt__(self, v):
403 r"""__gt__(string self, string v) -> bool"""
404 return _pcbnew.string___gt__(self, v)
405
406 def __lt__(self, v):
407 r"""__lt__(string self, string v) -> bool"""
408 return _pcbnew.string___lt__(self, v)
409
410 def __ge__(self, v):
411 r"""__ge__(string self, string v) -> bool"""
412 return _pcbnew.string___ge__(self, v)
413
414 def __le__(self, v):
415 r"""__le__(string self, string v) -> bool"""
416 return _pcbnew.string___le__(self, v)
417 __swig_destroy__ = _pcbnew.delete_string
418
419# Register string in _pcbnew:
420_pcbnew.string_swigregister(string)
421cvar = _pcbnew.cvar
422string.npos = _pcbnew.cvar.string_npos
423
424SHARED_PTR_DISOWN = _pcbnew.SHARED_PTR_DISOWN
425
427 r"""Proxy of C++ KI_PARAM_ERROR class."""
428
429 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
430 __repr__ = _swig_repr
431
432 def __init__(self, *args):
433 r"""
434 __init__(KI_PARAM_ERROR self, wxString aMessage) -> KI_PARAM_ERROR
435 __init__(KI_PARAM_ERROR self) -> KI_PARAM_ERROR
436 """
437 _pcbnew.KI_PARAM_ERROR_swiginit(self, _pcbnew.new_KI_PARAM_ERROR(*args))
438
439 def What(self):
440 r"""What(KI_PARAM_ERROR self) -> wxString"""
441 return _pcbnew.KI_PARAM_ERROR_What(self)
442 __swig_destroy__ = _pcbnew.delete_KI_PARAM_ERROR
443
444# Register KI_PARAM_ERROR in _pcbnew:
445_pcbnew.KI_PARAM_ERROR_swigregister(KI_PARAM_ERROR)
446
448 r"""Proxy of C++ IO_ERROR class."""
449
450 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
451 __repr__ = _swig_repr
452
453 def __init__(self, *args):
454 r"""
455 __init__(IO_ERROR self, wxString aProblem, char const * aThrowersFile, char const * aThrowersFunction, int aThrowersLineNumber) -> IO_ERROR
456 __init__(IO_ERROR self) -> IO_ERROR
457 """
458 _pcbnew.IO_ERROR_swiginit(self, _pcbnew.new_IO_ERROR(*args))
459
460 def init(self, aProblem, aThrowersFile, aThrowersFunction, aThrowersLineNumber):
461 r"""init(IO_ERROR self, wxString aProblem, char const * aThrowersFile, char const * aThrowersFunction, int aThrowersLineNumber)"""
462 return _pcbnew.IO_ERROR_init(self, aProblem, aThrowersFile, aThrowersFunction, aThrowersLineNumber)
463
464 def Problem(self):
465 r"""Problem(IO_ERROR self) -> wxString"""
466 return _pcbnew.IO_ERROR_Problem(self)
467
468 def Where(self):
469 r"""Where(IO_ERROR self) -> wxString"""
470 return _pcbnew.IO_ERROR_Where(self)
471
472 def What(self):
473 r"""What(IO_ERROR self) -> wxString"""
474 return _pcbnew.IO_ERROR_What(self)
475 __swig_destroy__ = _pcbnew.delete_IO_ERROR
476
477# Register IO_ERROR in _pcbnew:
478_pcbnew.IO_ERROR_swigregister(IO_ERROR)
479
480
482 r"""wxSetDefaultPyEncoding(char const * encoding)"""
483 return _pcbnew.wxSetDefaultPyEncoding(encoding)
484
486 r"""wxGetDefaultPyEncoding() -> char const *"""
487 return _pcbnew.wxGetDefaultPyEncoding()
489 r"""Proxy of C++ wxRect class."""
490
491 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
492 __repr__ = _swig_repr
493
494 def __init__(self, *args):
495 r"""
496 __init__(wxRect self) -> wxRect
497 __init__(wxRect self, int xx, int yy, int ww, int hh) -> wxRect
498 __init__(wxRect self, wxPoint topLeft, wxPoint bottomRight) -> wxRect
499 __init__(wxRect self, wxPoint pt, wxSize size) -> wxRect
500 __init__(wxRect self, wxSize size) -> wxRect
501 """
502 _pcbnew.wxRect_swiginit(self, _pcbnew.new_wxRect(*args))
503
504 def GetX(self):
505 r"""GetX(wxRect self) -> int"""
506 return _pcbnew.wxRect_GetX(self)
507
508 def SetX(self, xx):
509 r"""SetX(wxRect self, int xx)"""
510 return _pcbnew.wxRect_SetX(self, xx)
511
512 def GetY(self):
513 r"""GetY(wxRect self) -> int"""
514 return _pcbnew.wxRect_GetY(self)
515
516 def SetY(self, yy):
517 r"""SetY(wxRect self, int yy)"""
518 return _pcbnew.wxRect_SetY(self, yy)
519
520 def GetWidth(self):
521 r"""GetWidth(wxRect self) -> int"""
522 return _pcbnew.wxRect_GetWidth(self)
523
524 def SetWidth(self, w):
525 r"""SetWidth(wxRect self, int w)"""
526 return _pcbnew.wxRect_SetWidth(self, w)
527
528 def GetHeight(self):
529 r"""GetHeight(wxRect self) -> int"""
530 return _pcbnew.wxRect_GetHeight(self)
531
532 def SetHeight(self, h):
533 r"""SetHeight(wxRect self, int h)"""
534 return _pcbnew.wxRect_SetHeight(self, h)
535
536 def GetPosition(self):
537 r"""GetPosition(wxRect self) -> wxPoint"""
538 return _pcbnew.wxRect_GetPosition(self)
539
540 def SetPosition(self, p):
541 r"""SetPosition(wxRect self, wxPoint p)"""
542 return _pcbnew.wxRect_SetPosition(self, p)
543 x = property(_pcbnew.wxRect_x_get, _pcbnew.wxRect_x_set, doc=r"""x : int""")
544 y = property(_pcbnew.wxRect_y_get, _pcbnew.wxRect_y_set, doc=r"""y : int""")
545 width = property(_pcbnew.wxRect_width_get, _pcbnew.wxRect_width_set, doc=r"""width : int""")
546 height = property(_pcbnew.wxRect_height_get, _pcbnew.wxRect_height_set, doc=r"""height : int""")
547
548 def Get(self):
549 r"""Get(wxRect self) -> PyObject *"""
550 return _pcbnew.wxRect_Get(self)
551
552
553 def __eq__(self,other):
554 return self.x==other.x and self.y==other.y and self.width==other.width and self.height==other.height
555 def __str__(self): return str(self.Get())
556 def __repr__(self): return 'wxRect'+str(self.Get())
557 def __len__(self): return len(self.Get())
558 def __getitem__(self, index): return self.Get()[index]
559 def __setitem__(self, index, val):
560 if index == 0: self.SetX(val)
561 elif index == 1: self.SetY(val)
562 elif index == 2: self.SetWidth(val)
563 elif index == 3: self.SetHeight(val)
564 else: raise IndexError
565 def __nonzero__(self): return self.Get() != (0,0,0,0)
566 __safe_for_unpickling__ = True
567
568 __swig_destroy__ = _pcbnew.delete_wxRect
569
570# Register wxRect in _pcbnew:
571_pcbnew.wxRect_swigregister(wxRect)
572
574 r"""Proxy of C++ wxSize class."""
575
576 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
577 __repr__ = _swig_repr
578 x = property(_pcbnew.wxSize_x_get, _pcbnew.wxSize_x_set, doc=r"""x : int""")
579 y = property(_pcbnew.wxSize_y_get, _pcbnew.wxSize_y_set, doc=r"""y : int""")
580
581 def __init__(self, *args):
582 r"""
583 __init__(wxSize self, int xx, int yy) -> wxSize
584 __init__(wxSize self, double xx, double yy) -> wxSize
585 """
586 _pcbnew.wxSize_swiginit(self, _pcbnew.new_wxSize(*args))
587
588 def Get(self):
589 r"""Get(wxSize self) -> PyObject *"""
590 return _pcbnew.wxSize_Get(self)
591 __swig_destroy__ = _pcbnew.delete_wxSize
592
593 def SetWidth(self, w):
594 r"""SetWidth(wxSize self, int w)"""
595 return _pcbnew.wxSize_SetWidth(self, w)
596
597 def SetHeight(self, h):
598 r"""SetHeight(wxSize self, int h)"""
599 return _pcbnew.wxSize_SetHeight(self, h)
600
601 def GetWidth(self):
602 r"""GetWidth(wxSize self) -> int"""
603 return _pcbnew.wxSize_GetWidth(self)
604
605 def GetHeight(self):
606 r"""GetHeight(wxSize self) -> int"""
607 return _pcbnew.wxSize_GetHeight(self)
608
609 def Scale(self,xscale,yscale):
610 return wxSize(self.x*xscale,self.y*yscale)
611 def __eq__(self,other):
612 return self.GetWidth()==other.GetWidth() and self.GetHeight()==other.GetHeight()
613 def __str__(self): return str(self.Get())
614 def __repr__(self): return 'wxSize'+str(self.Get())
615 def __len__(self): return len(self.Get())
616 def __getitem__(self, index): return self.Get()[index]
617 def __setitem__(self, index, val):
618 if index == 0: self.SetWidth(val)
619 elif index == 1: self.SetHeight(val)
620 else: raise IndexError
621 def __nonzero__(self): return self.Get() != (0,0)
622 __safe_for_unpickling__ = True
623
624
625
626# Register wxSize in _pcbnew:
627_pcbnew.wxSize_swigregister(wxSize)
628
630 r"""Proxy of C++ wxPoint class."""
631
632 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
633 __repr__ = _swig_repr
634 x = property(_pcbnew.wxPoint_x_get, _pcbnew.wxPoint_x_set, doc=r"""x : int""")
635 y = property(_pcbnew.wxPoint_y_get, _pcbnew.wxPoint_y_set, doc=r"""y : int""")
636
637 def __init__(self, *args):
638 r"""
639 __init__(wxPoint self, int xx, int yy) -> wxPoint
640 __init__(wxPoint self, double xx, double yy) -> wxPoint
641 """
642 _pcbnew.wxPoint_swiginit(self, _pcbnew.new_wxPoint(*args))
643 __swig_destroy__ = _pcbnew.delete_wxPoint
644
645 def __add__(self, pt):
646 r"""__add__(wxPoint self, wxPoint pt) -> wxPoint"""
647 return _pcbnew.wxPoint___add__(self, pt)
648
649 def __sub__(self, pt):
650 r"""__sub__(wxPoint self, wxPoint pt) -> wxPoint"""
651 return _pcbnew.wxPoint___sub__(self, pt)
652
653 def Set(self, x, y):
654 r"""Set(wxPoint self, long x, long y)"""
655 return _pcbnew.wxPoint_Set(self, x, y)
656
657 def Get(self):
658 r"""Get(wxPoint self) -> PyObject *"""
659 return _pcbnew.wxPoint_Get(self)
660
661 def __eq__(self,other): return (self.x==other.x and self.y==other.y)
662 def __ne__(self,other): return not (self==other)
663 def __str__(self): return str(self.Get())
664 def __repr__(self): return 'wxPoint'+str(self.Get())
665 def __len__(self): return len(self.Get())
666 def __getitem__(self, index): return self.Get()[index]
667 def __setitem__(self, index, val):
668 if index == 0:
669 self.x = val
670 elif index == 1:
671 self.y = val
672 else:
673 raise IndexError
674 def __nonzero__(self): return self.Get() != (0,0)
675
676
677
678# Register wxPoint in _pcbnew:
679_pcbnew.wxPoint_swigregister(wxPoint)
680
682 r"""Proxy of C++ wxString class."""
683
684 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
685 __repr__ = _swig_repr
686 __swig_destroy__ = _pcbnew.delete_wxString
687
688 def __str__(self):
689 r"""__str__(wxString self) -> PyObject *"""
690 return _pcbnew.wxString___str__(self)
691
692 def __repr__(self): return 'wxString(\'' + self.__str__() + '\')'
693
694
695 def __init__(self):
696 r"""__init__(wxString self) -> wxString"""
697 _pcbnew.wxString_swiginit(self, _pcbnew.new_wxString())
698
699# Register wxString in _pcbnew:
700_pcbnew.wxString_swigregister(wxString)
701
703 r"""Proxy of C++ std::vector< wxPoint > class."""
704
705 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
706 __repr__ = _swig_repr
707
708 def iterator(self):
709 r"""iterator(wxPoint_Vector self) -> SwigPyIterator"""
710 return _pcbnew.wxPoint_Vector_iterator(self)
711 def __iter__(self):
712 return self.iterator()
713
714 def __nonzero__(self):
715 r"""__nonzero__(wxPoint_Vector self) -> bool"""
716 return _pcbnew.wxPoint_Vector___nonzero__(self)
717
718 def __bool__(self):
719 r"""__bool__(wxPoint_Vector self) -> bool"""
720 return _pcbnew.wxPoint_Vector___bool__(self)
721
722 def __len__(self):
723 r"""__len__(wxPoint_Vector self) -> std::vector< wxPoint >::size_type"""
724 return _pcbnew.wxPoint_Vector___len__(self)
725
726 def __getslice__(self, i, j):
727 r"""__getslice__(wxPoint_Vector self, std::vector< wxPoint >::difference_type i, std::vector< wxPoint >::difference_type j) -> wxPoint_Vector"""
728 return _pcbnew.wxPoint_Vector___getslice__(self, i, j)
729
730 def __setslice__(self, *args):
731 r"""
732 __setslice__(wxPoint_Vector self, std::vector< wxPoint >::difference_type i, std::vector< wxPoint >::difference_type j)
733 __setslice__(wxPoint_Vector self, std::vector< wxPoint >::difference_type i, std::vector< wxPoint >::difference_type j, wxPoint_Vector v)
734 """
735 return _pcbnew.wxPoint_Vector___setslice__(self, *args)
736
737 def __delslice__(self, i, j):
738 r"""__delslice__(wxPoint_Vector self, std::vector< wxPoint >::difference_type i, std::vector< wxPoint >::difference_type j)"""
739 return _pcbnew.wxPoint_Vector___delslice__(self, i, j)
740
741 def __delitem__(self, *args):
742 r"""
743 __delitem__(wxPoint_Vector self, std::vector< wxPoint >::difference_type i)
744 __delitem__(wxPoint_Vector self, PySliceObject * slice)
745 """
746 return _pcbnew.wxPoint_Vector___delitem__(self, *args)
747
748 def __getitem__(self, *args):
749 r"""
750 __getitem__(wxPoint_Vector self, PySliceObject * slice) -> wxPoint_Vector
751 __getitem__(wxPoint_Vector self, std::vector< wxPoint >::difference_type i) -> wxPoint
752 """
753 return _pcbnew.wxPoint_Vector___getitem__(self, *args)
754
755 def __setitem__(self, *args):
756 r"""
757 __setitem__(wxPoint_Vector self, PySliceObject * slice, wxPoint_Vector v)
758 __setitem__(wxPoint_Vector self, PySliceObject * slice)
759 __setitem__(wxPoint_Vector self, std::vector< wxPoint >::difference_type i, wxPoint x)
760 """
761 return _pcbnew.wxPoint_Vector___setitem__(self, *args)
762
763 def pop(self):
764 r"""pop(wxPoint_Vector self) -> wxPoint"""
765 return _pcbnew.wxPoint_Vector_pop(self)
766
767 def append(self, x):
768 r"""append(wxPoint_Vector self, wxPoint x)"""
769 return _pcbnew.wxPoint_Vector_append(self, x)
770
771 def empty(self):
772 r"""empty(wxPoint_Vector self) -> bool"""
773 return _pcbnew.wxPoint_Vector_empty(self)
774
775 def size(self):
776 r"""size(wxPoint_Vector self) -> std::vector< wxPoint >::size_type"""
777 return _pcbnew.wxPoint_Vector_size(self)
778
779 def swap(self, v):
780 r"""swap(wxPoint_Vector self, wxPoint_Vector v)"""
781 return _pcbnew.wxPoint_Vector_swap(self, v)
782
783 def begin(self):
784 r"""begin(wxPoint_Vector self) -> std::vector< wxPoint >::iterator"""
785 return _pcbnew.wxPoint_Vector_begin(self)
786
787 def end(self):
788 r"""end(wxPoint_Vector self) -> std::vector< wxPoint >::iterator"""
789 return _pcbnew.wxPoint_Vector_end(self)
790
791 def rbegin(self):
792 r"""rbegin(wxPoint_Vector self) -> std::vector< wxPoint >::reverse_iterator"""
793 return _pcbnew.wxPoint_Vector_rbegin(self)
794
795 def rend(self):
796 r"""rend(wxPoint_Vector self) -> std::vector< wxPoint >::reverse_iterator"""
797 return _pcbnew.wxPoint_Vector_rend(self)
798
799 def clear(self):
800 r"""clear(wxPoint_Vector self)"""
801 return _pcbnew.wxPoint_Vector_clear(self)
802
803 def get_allocator(self):
804 r"""get_allocator(wxPoint_Vector self) -> std::vector< wxPoint >::allocator_type"""
805 return _pcbnew.wxPoint_Vector_get_allocator(self)
806
807 def pop_back(self):
808 r"""pop_back(wxPoint_Vector self)"""
809 return _pcbnew.wxPoint_Vector_pop_back(self)
810
811 def erase(self, *args):
812 r"""
813 erase(wxPoint_Vector self, std::vector< wxPoint >::iterator pos) -> std::vector< wxPoint >::iterator
814 erase(wxPoint_Vector self, std::vector< wxPoint >::iterator first, std::vector< wxPoint >::iterator last) -> std::vector< wxPoint >::iterator
815 """
816 return _pcbnew.wxPoint_Vector_erase(self, *args)
817
818 def __init__(self, *args):
819 r"""
820 __init__(wxPoint_Vector self) -> wxPoint_Vector
821 __init__(wxPoint_Vector self, wxPoint_Vector other) -> wxPoint_Vector
822 __init__(wxPoint_Vector self, std::vector< wxPoint >::size_type size) -> wxPoint_Vector
823 __init__(wxPoint_Vector self, std::vector< wxPoint >::size_type size, wxPoint value) -> wxPoint_Vector
824 """
825 _pcbnew.wxPoint_Vector_swiginit(self, _pcbnew.new_wxPoint_Vector(*args))
826
827 def push_back(self, x):
828 r"""push_back(wxPoint_Vector self, wxPoint x)"""
829 return _pcbnew.wxPoint_Vector_push_back(self, x)
830
831 def front(self):
832 r"""front(wxPoint_Vector self) -> wxPoint"""
833 return _pcbnew.wxPoint_Vector_front(self)
834
835 def back(self):
836 r"""back(wxPoint_Vector self) -> wxPoint"""
837 return _pcbnew.wxPoint_Vector_back(self)
838
839 def assign(self, n, x):
840 r"""assign(wxPoint_Vector self, std::vector< wxPoint >::size_type n, wxPoint x)"""
841 return _pcbnew.wxPoint_Vector_assign(self, n, x)
842
843 def resize(self, *args):
844 r"""
845 resize(wxPoint_Vector self, std::vector< wxPoint >::size_type new_size)
846 resize(wxPoint_Vector self, std::vector< wxPoint >::size_type new_size, wxPoint x)
847 """
848 return _pcbnew.wxPoint_Vector_resize(self, *args)
849
850 def insert(self, *args):
851 r"""
852 insert(wxPoint_Vector self, std::vector< wxPoint >::iterator pos, wxPoint x) -> std::vector< wxPoint >::iterator
853 insert(wxPoint_Vector self, std::vector< wxPoint >::iterator pos, std::vector< wxPoint >::size_type n, wxPoint x)
854 """
855 return _pcbnew.wxPoint_Vector_insert(self, *args)
856
857 def reserve(self, n):
858 r"""reserve(wxPoint_Vector self, std::vector< wxPoint >::size_type n)"""
859 return _pcbnew.wxPoint_Vector_reserve(self, n)
860
861 def capacity(self):
862 r"""capacity(wxPoint_Vector self) -> std::vector< wxPoint >::size_type"""
863 return _pcbnew.wxPoint_Vector_capacity(self)
864 __swig_destroy__ = _pcbnew.delete_wxPoint_Vector
865
866# Register wxPoint_Vector in _pcbnew:
867_pcbnew.wxPoint_Vector_swigregister(wxPoint_Vector)
868
870 r"""Proxy of C++ std::vector< enum PCB_LAYER_ID > class."""
871
872 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
873 __repr__ = _swig_repr
874
875 def iterator(self):
876 r"""iterator(base_seqVect self) -> SwigPyIterator"""
877 return _pcbnew.base_seqVect_iterator(self)
878 def __iter__(self):
879 return self.iterator()
880
881 def __nonzero__(self):
882 r"""__nonzero__(base_seqVect self) -> bool"""
883 return _pcbnew.base_seqVect___nonzero__(self)
884
885 def __bool__(self):
886 r"""__bool__(base_seqVect self) -> bool"""
887 return _pcbnew.base_seqVect___bool__(self)
888
889 def __len__(self):
890 r"""__len__(base_seqVect self) -> std::vector< enum PCB_LAYER_ID >::size_type"""
891 return _pcbnew.base_seqVect___len__(self)
892
893 def __getslice__(self, i, j):
894 r"""__getslice__(base_seqVect self, std::vector< enum PCB_LAYER_ID >::difference_type i, std::vector< enum PCB_LAYER_ID >::difference_type j) -> base_seqVect"""
895 return _pcbnew.base_seqVect___getslice__(self, i, j)
896
897 def __setslice__(self, *args):
898 r"""
899 __setslice__(base_seqVect self, std::vector< enum PCB_LAYER_ID >::difference_type i, std::vector< enum PCB_LAYER_ID >::difference_type j)
900 __setslice__(base_seqVect self, std::vector< enum PCB_LAYER_ID >::difference_type i, std::vector< enum PCB_LAYER_ID >::difference_type j, base_seqVect v)
901 """
902 return _pcbnew.base_seqVect___setslice__(self, *args)
903
904 def __delslice__(self, i, j):
905 r"""__delslice__(base_seqVect self, std::vector< enum PCB_LAYER_ID >::difference_type i, std::vector< enum PCB_LAYER_ID >::difference_type j)"""
906 return _pcbnew.base_seqVect___delslice__(self, i, j)
907
908 def __delitem__(self, *args):
909 r"""
910 __delitem__(base_seqVect self, std::vector< enum PCB_LAYER_ID >::difference_type i)
911 __delitem__(base_seqVect self, PySliceObject * slice)
912 """
913 return _pcbnew.base_seqVect___delitem__(self, *args)
914
915 def __getitem__(self, *args):
916 r"""
917 __getitem__(base_seqVect self, PySliceObject * slice) -> base_seqVect
918 __getitem__(base_seqVect self, std::vector< enum PCB_LAYER_ID >::difference_type i) -> std::vector< enum PCB_LAYER_ID >::value_type const &
919 """
920 return _pcbnew.base_seqVect___getitem__(self, *args)
921
922 def __setitem__(self, *args):
923 r"""
924 __setitem__(base_seqVect self, PySliceObject * slice, base_seqVect v)
925 __setitem__(base_seqVect self, PySliceObject * slice)
926 __setitem__(base_seqVect self, std::vector< enum PCB_LAYER_ID >::difference_type i, std::vector< enum PCB_LAYER_ID >::value_type const & x)
927 """
928 return _pcbnew.base_seqVect___setitem__(self, *args)
929
930 def pop(self):
931 r"""pop(base_seqVect self) -> std::vector< enum PCB_LAYER_ID >::value_type"""
932 return _pcbnew.base_seqVect_pop(self)
933
934 def append(self, x):
935 r"""append(base_seqVect self, std::vector< enum PCB_LAYER_ID >::value_type const & x)"""
936 return _pcbnew.base_seqVect_append(self, x)
937
938 def empty(self):
939 r"""empty(base_seqVect self) -> bool"""
940 return _pcbnew.base_seqVect_empty(self)
941
942 def size(self):
943 r"""size(base_seqVect self) -> std::vector< enum PCB_LAYER_ID >::size_type"""
944 return _pcbnew.base_seqVect_size(self)
945
946 def swap(self, v):
947 r"""swap(base_seqVect self, base_seqVect v)"""
948 return _pcbnew.base_seqVect_swap(self, v)
949
950 def begin(self):
951 r"""begin(base_seqVect self) -> std::vector< enum PCB_LAYER_ID >::iterator"""
952 return _pcbnew.base_seqVect_begin(self)
953
954 def end(self):
955 r"""end(base_seqVect self) -> std::vector< enum PCB_LAYER_ID >::iterator"""
956 return _pcbnew.base_seqVect_end(self)
957
958 def rbegin(self):
959 r"""rbegin(base_seqVect self) -> std::vector< enum PCB_LAYER_ID >::reverse_iterator"""
960 return _pcbnew.base_seqVect_rbegin(self)
961
962 def rend(self):
963 r"""rend(base_seqVect self) -> std::vector< enum PCB_LAYER_ID >::reverse_iterator"""
964 return _pcbnew.base_seqVect_rend(self)
965
966 def clear(self):
967 r"""clear(base_seqVect self)"""
968 return _pcbnew.base_seqVect_clear(self)
969
970 def get_allocator(self):
971 r"""get_allocator(base_seqVect self) -> std::vector< enum PCB_LAYER_ID >::allocator_type"""
972 return _pcbnew.base_seqVect_get_allocator(self)
973
974 def pop_back(self):
975 r"""pop_back(base_seqVect self)"""
976 return _pcbnew.base_seqVect_pop_back(self)
977
978 def erase(self, *args):
979 r"""
980 erase(base_seqVect self, std::vector< enum PCB_LAYER_ID >::iterator pos) -> std::vector< enum PCB_LAYER_ID >::iterator
981 erase(base_seqVect self, std::vector< enum PCB_LAYER_ID >::iterator first, std::vector< enum PCB_LAYER_ID >::iterator last) -> std::vector< enum PCB_LAYER_ID >::iterator
982 """
983 return _pcbnew.base_seqVect_erase(self, *args)
984
985 def __init__(self, *args):
986 r"""
987 __init__(base_seqVect self) -> base_seqVect
988 __init__(base_seqVect self, base_seqVect other) -> base_seqVect
989 __init__(base_seqVect self, std::vector< enum PCB_LAYER_ID >::size_type size) -> base_seqVect
990 __init__(base_seqVect self, std::vector< enum PCB_LAYER_ID >::size_type size, std::vector< enum PCB_LAYER_ID >::value_type const & value) -> base_seqVect
991 """
992 _pcbnew.base_seqVect_swiginit(self, _pcbnew.new_base_seqVect(*args))
993
994 def push_back(self, x):
995 r"""push_back(base_seqVect self, std::vector< enum PCB_LAYER_ID >::value_type const & x)"""
996 return _pcbnew.base_seqVect_push_back(self, x)
997
998 def front(self):
999 r"""front(base_seqVect self) -> std::vector< enum PCB_LAYER_ID >::value_type const &"""
1000 return _pcbnew.base_seqVect_front(self)
1001
1002 def back(self):
1003 r"""back(base_seqVect self) -> std::vector< enum PCB_LAYER_ID >::value_type const &"""
1004 return _pcbnew.base_seqVect_back(self)
1005
1006 def assign(self, n, x):
1007 r"""assign(base_seqVect self, std::vector< enum PCB_LAYER_ID >::size_type n, std::vector< enum PCB_LAYER_ID >::value_type const & x)"""
1008 return _pcbnew.base_seqVect_assign(self, n, x)
1009
1010 def resize(self, *args):
1011 r"""
1012 resize(base_seqVect self, std::vector< enum PCB_LAYER_ID >::size_type new_size)
1013 resize(base_seqVect self, std::vector< enum PCB_LAYER_ID >::size_type new_size, std::vector< enum PCB_LAYER_ID >::value_type const & x)
1014 """
1015 return _pcbnew.base_seqVect_resize(self, *args)
1016
1017 def insert(self, *args):
1018 r"""
1019 insert(base_seqVect self, std::vector< enum PCB_LAYER_ID >::iterator pos, std::vector< enum PCB_LAYER_ID >::value_type const & x) -> std::vector< enum PCB_LAYER_ID >::iterator
1020 insert(base_seqVect self, std::vector< enum PCB_LAYER_ID >::iterator pos, std::vector< enum PCB_LAYER_ID >::size_type n, std::vector< enum PCB_LAYER_ID >::value_type const & x)
1021 """
1022 return _pcbnew.base_seqVect_insert(self, *args)
1023
1024 def reserve(self, n):
1025 r"""reserve(base_seqVect self, std::vector< enum PCB_LAYER_ID >::size_type n)"""
1026 return _pcbnew.base_seqVect_reserve(self, n)
1027
1028 def capacity(self):
1029 r"""capacity(base_seqVect self) -> std::vector< enum PCB_LAYER_ID >::size_type"""
1030 return _pcbnew.base_seqVect_capacity(self)
1031 __swig_destroy__ = _pcbnew.delete_base_seqVect
1032
1033# Register base_seqVect in _pcbnew:
1034_pcbnew.base_seqVect_swigregister(base_seqVect)
1035
1036SKETCH = _pcbnew.SKETCH
1037
1038FILLED = _pcbnew.FILLED
1039
1041 r"""Proxy of C++ KIID class."""
1042
1043 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1044 __repr__ = _swig_repr
1045
1046 def __init__(self, *args):
1047 r"""
1048 __init__(KIID self) -> KIID
1049 __init__(KIID self, int null) -> KIID
1050 __init__(KIID self, string aString) -> KIID
1051 __init__(KIID self, char const * aString) -> KIID
1052 __init__(KIID self, wxString aString) -> KIID
1053 __init__(KIID self, timestamp_t aTimestamp) -> KIID
1054 """
1055 _pcbnew.KIID_swiginit(self, _pcbnew.new_KIID(*args))
1056
1057 def Clone(self, aUUID):
1058 r"""Clone(KIID self, KIID aUUID)"""
1059 return _pcbnew.KIID_Clone(self, aUUID)
1060
1061 def Hash(self):
1062 r"""Hash(KIID self) -> size_t"""
1063 return _pcbnew.KIID_Hash(self)
1064
1066 r"""IsLegacyTimestamp(KIID self) -> bool"""
1067 return _pcbnew.KIID_IsLegacyTimestamp(self)
1068
1070 r"""AsLegacyTimestamp(KIID self) -> timestamp_t"""
1071 return _pcbnew.KIID_AsLegacyTimestamp(self)
1072
1073 def AsString(self):
1074 r"""AsString(KIID self) -> wxString"""
1075 return _pcbnew.KIID_AsString(self)
1076
1078 r"""AsLegacyTimestampString(KIID self) -> wxString"""
1079 return _pcbnew.KIID_AsLegacyTimestampString(self)
1080
1081 @staticmethod
1082 def SniffTest(aCandidate):
1083 r"""SniffTest(wxString aCandidate) -> bool"""
1084 return _pcbnew.KIID_SniffTest(aCandidate)
1085
1086 @staticmethod
1087 def CreateNilUuids(aNil=True):
1088 r"""CreateNilUuids(bool aNil=True)"""
1089 return _pcbnew.KIID_CreateNilUuids(aNil)
1090
1091 @staticmethod
1092 def SeedGenerator(aSeed):
1093 r"""SeedGenerator(unsigned int aSeed)"""
1094 return _pcbnew.KIID_SeedGenerator(aSeed)
1095
1097 r"""ConvertTimestampToUuid(KIID self)"""
1098 return _pcbnew.KIID_ConvertTimestampToUuid(self)
1099
1100 def Increment(self):
1101 r"""Increment(KIID self)"""
1102 return _pcbnew.KIID_Increment(self)
1103
1104 def __eq__(self, rhs):
1105 r"""__eq__(KIID self, KIID rhs) -> bool"""
1106 return _pcbnew.KIID___eq__(self, rhs)
1107
1108 def __ne__(self, rhs):
1109 r"""__ne__(KIID self, KIID rhs) -> bool"""
1110 return _pcbnew.KIID___ne__(self, rhs)
1111
1112 def __lt__(self, rhs):
1113 r"""__lt__(KIID self, KIID rhs) -> bool"""
1114 return _pcbnew.KIID___lt__(self, rhs)
1115
1116 def __gt__(self, rhs):
1117 r"""__gt__(KIID self, KIID rhs) -> bool"""
1118 return _pcbnew.KIID___gt__(self, rhs)
1119 __swig_destroy__ = _pcbnew.delete_KIID
1120
1121# Register KIID in _pcbnew:
1122_pcbnew.KIID_swigregister(KIID)
1123
1124def KIID_SniffTest(aCandidate):
1125 r"""KIID_SniffTest(wxString aCandidate) -> bool"""
1126 return _pcbnew.KIID_SniffTest(aCandidate)
1127
1128def KIID_CreateNilUuids(aNil=True):
1129 r"""KIID_CreateNilUuids(bool aNil=True)"""
1130 return _pcbnew.KIID_CreateNilUuids(aNil)
1131
1133 r"""KIID_SeedGenerator(unsigned int aSeed)"""
1134 return _pcbnew.KIID_SeedGenerator(aSeed)
1135
1136
1138 r"""NilUuid() -> KIID"""
1139 return _pcbnew.NilUuid()
1141 r"""Proxy of C++ std::vector< KIID > class."""
1142
1143 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1144 __repr__ = _swig_repr
1145
1146 def iterator(self):
1147 r"""iterator(KIID_VECT_LIST self) -> SwigPyIterator"""
1148 return _pcbnew.KIID_VECT_LIST_iterator(self)
1149 def __iter__(self):
1150 return self.iterator()
1151
1152 def __nonzero__(self):
1153 r"""__nonzero__(KIID_VECT_LIST self) -> bool"""
1154 return _pcbnew.KIID_VECT_LIST___nonzero__(self)
1155
1156 def __bool__(self):
1157 r"""__bool__(KIID_VECT_LIST self) -> bool"""
1158 return _pcbnew.KIID_VECT_LIST___bool__(self)
1159
1160 def __len__(self):
1161 r"""__len__(KIID_VECT_LIST self) -> std::vector< KIID >::size_type"""
1162 return _pcbnew.KIID_VECT_LIST___len__(self)
1163
1164 def __getslice__(self, i, j):
1165 r"""__getslice__(KIID_VECT_LIST self, std::vector< KIID >::difference_type i, std::vector< KIID >::difference_type j) -> KIID_VECT_LIST"""
1166 return _pcbnew.KIID_VECT_LIST___getslice__(self, i, j)
1167
1168 def __setslice__(self, *args):
1169 r"""
1170 __setslice__(KIID_VECT_LIST self, std::vector< KIID >::difference_type i, std::vector< KIID >::difference_type j)
1171 __setslice__(KIID_VECT_LIST self, std::vector< KIID >::difference_type i, std::vector< KIID >::difference_type j, KIID_VECT_LIST v)
1172 """
1173 return _pcbnew.KIID_VECT_LIST___setslice__(self, *args)
1174
1175 def __delslice__(self, i, j):
1176 r"""__delslice__(KIID_VECT_LIST self, std::vector< KIID >::difference_type i, std::vector< KIID >::difference_type j)"""
1177 return _pcbnew.KIID_VECT_LIST___delslice__(self, i, j)
1178
1179 def __delitem__(self, *args):
1180 r"""
1181 __delitem__(KIID_VECT_LIST self, std::vector< KIID >::difference_type i)
1182 __delitem__(KIID_VECT_LIST self, PySliceObject * slice)
1183 """
1184 return _pcbnew.KIID_VECT_LIST___delitem__(self, *args)
1185
1186 def __getitem__(self, *args):
1187 r"""
1188 __getitem__(KIID_VECT_LIST self, PySliceObject * slice) -> KIID_VECT_LIST
1189 __getitem__(KIID_VECT_LIST self, std::vector< KIID >::difference_type i) -> KIID
1190 """
1191 return _pcbnew.KIID_VECT_LIST___getitem__(self, *args)
1192
1193 def __setitem__(self, *args):
1194 r"""
1195 __setitem__(KIID_VECT_LIST self, PySliceObject * slice, KIID_VECT_LIST v)
1196 __setitem__(KIID_VECT_LIST self, PySliceObject * slice)
1197 __setitem__(KIID_VECT_LIST self, std::vector< KIID >::difference_type i, KIID x)
1198 """
1199 return _pcbnew.KIID_VECT_LIST___setitem__(self, *args)
1200
1201 def pop(self):
1202 r"""pop(KIID_VECT_LIST self) -> KIID"""
1203 return _pcbnew.KIID_VECT_LIST_pop(self)
1204
1205 def append(self, x):
1206 r"""append(KIID_VECT_LIST self, KIID x)"""
1207 return _pcbnew.KIID_VECT_LIST_append(self, x)
1208
1209 def empty(self):
1210 r"""empty(KIID_VECT_LIST self) -> bool"""
1211 return _pcbnew.KIID_VECT_LIST_empty(self)
1212
1213 def size(self):
1214 r"""size(KIID_VECT_LIST self) -> std::vector< KIID >::size_type"""
1215 return _pcbnew.KIID_VECT_LIST_size(self)
1216
1217 def swap(self, v):
1218 r"""swap(KIID_VECT_LIST self, KIID_VECT_LIST v)"""
1219 return _pcbnew.KIID_VECT_LIST_swap(self, v)
1220
1221 def begin(self):
1222 r"""begin(KIID_VECT_LIST self) -> std::vector< KIID >::iterator"""
1223 return _pcbnew.KIID_VECT_LIST_begin(self)
1224
1225 def end(self):
1226 r"""end(KIID_VECT_LIST self) -> std::vector< KIID >::iterator"""
1227 return _pcbnew.KIID_VECT_LIST_end(self)
1228
1229 def rbegin(self):
1230 r"""rbegin(KIID_VECT_LIST self) -> std::vector< KIID >::reverse_iterator"""
1231 return _pcbnew.KIID_VECT_LIST_rbegin(self)
1232
1233 def rend(self):
1234 r"""rend(KIID_VECT_LIST self) -> std::vector< KIID >::reverse_iterator"""
1235 return _pcbnew.KIID_VECT_LIST_rend(self)
1236
1237 def clear(self):
1238 r"""clear(KIID_VECT_LIST self)"""
1239 return _pcbnew.KIID_VECT_LIST_clear(self)
1240
1241 def get_allocator(self):
1242 r"""get_allocator(KIID_VECT_LIST self) -> std::vector< KIID >::allocator_type"""
1243 return _pcbnew.KIID_VECT_LIST_get_allocator(self)
1244
1245 def pop_back(self):
1246 r"""pop_back(KIID_VECT_LIST self)"""
1247 return _pcbnew.KIID_VECT_LIST_pop_back(self)
1248
1249 def erase(self, *args):
1250 r"""
1251 erase(KIID_VECT_LIST self, std::vector< KIID >::iterator pos) -> std::vector< KIID >::iterator
1252 erase(KIID_VECT_LIST self, std::vector< KIID >::iterator first, std::vector< KIID >::iterator last) -> std::vector< KIID >::iterator
1253 """
1254 return _pcbnew.KIID_VECT_LIST_erase(self, *args)
1255
1256 def __init__(self, *args):
1257 r"""
1258 __init__(KIID_VECT_LIST self) -> KIID_VECT_LIST
1259 __init__(KIID_VECT_LIST self, KIID_VECT_LIST other) -> KIID_VECT_LIST
1260 __init__(KIID_VECT_LIST self, std::vector< KIID >::size_type size) -> KIID_VECT_LIST
1261 __init__(KIID_VECT_LIST self, std::vector< KIID >::size_type size, KIID value) -> KIID_VECT_LIST
1262 """
1263 _pcbnew.KIID_VECT_LIST_swiginit(self, _pcbnew.new_KIID_VECT_LIST(*args))
1264
1265 def push_back(self, x):
1266 r"""push_back(KIID_VECT_LIST self, KIID x)"""
1267 return _pcbnew.KIID_VECT_LIST_push_back(self, x)
1268
1269 def front(self):
1270 r"""front(KIID_VECT_LIST self) -> KIID"""
1271 return _pcbnew.KIID_VECT_LIST_front(self)
1272
1273 def back(self):
1274 r"""back(KIID_VECT_LIST self) -> KIID"""
1275 return _pcbnew.KIID_VECT_LIST_back(self)
1276
1277 def assign(self, n, x):
1278 r"""assign(KIID_VECT_LIST self, std::vector< KIID >::size_type n, KIID x)"""
1279 return _pcbnew.KIID_VECT_LIST_assign(self, n, x)
1280
1281 def resize(self, *args):
1282 r"""
1283 resize(KIID_VECT_LIST self, std::vector< KIID >::size_type new_size)
1284 resize(KIID_VECT_LIST self, std::vector< KIID >::size_type new_size, KIID x)
1285 """
1286 return _pcbnew.KIID_VECT_LIST_resize(self, *args)
1287
1288 def insert(self, *args):
1289 r"""
1290 insert(KIID_VECT_LIST self, std::vector< KIID >::iterator pos, KIID x) -> std::vector< KIID >::iterator
1291 insert(KIID_VECT_LIST self, std::vector< KIID >::iterator pos, std::vector< KIID >::size_type n, KIID x)
1292 """
1293 return _pcbnew.KIID_VECT_LIST_insert(self, *args)
1294
1295 def reserve(self, n):
1296 r"""reserve(KIID_VECT_LIST self, std::vector< KIID >::size_type n)"""
1297 return _pcbnew.KIID_VECT_LIST_reserve(self, n)
1298
1299 def capacity(self):
1300 r"""capacity(KIID_VECT_LIST self) -> std::vector< KIID >::size_type"""
1301 return _pcbnew.KIID_VECT_LIST_capacity(self)
1302 __swig_destroy__ = _pcbnew.delete_KIID_VECT_LIST
1303
1304# Register KIID_VECT_LIST in _pcbnew:
1305_pcbnew.KIID_VECT_LIST_swigregister(KIID_VECT_LIST)
1306
1308 r"""Proxy of C++ KIID_PATH class."""
1309
1310 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1311 __repr__ = _swig_repr
1312
1313 def __init__(self, *args):
1314 r"""
1315 __init__(KIID_PATH self) -> KIID_PATH
1316 __init__(KIID_PATH self, wxString aString) -> KIID_PATH
1317 """
1318 _pcbnew.KIID_PATH_swiginit(self, _pcbnew.new_KIID_PATH(*args))
1319
1320 def MakeRelativeTo(self, aPath):
1321 r"""MakeRelativeTo(KIID_PATH self, KIID_PATH aPath) -> bool"""
1322 return _pcbnew.KIID_PATH_MakeRelativeTo(self, aPath)
1323
1324 def EndsWith(self, aPath):
1325 r"""EndsWith(KIID_PATH self, KIID_PATH aPath) -> bool"""
1326 return _pcbnew.KIID_PATH_EndsWith(self, aPath)
1327
1328 def AsString(self):
1329 r"""AsString(KIID_PATH self) -> wxString"""
1330 return _pcbnew.KIID_PATH_AsString(self)
1331
1332 def __eq__(self, rhs):
1333 r"""__eq__(KIID_PATH self, KIID_PATH rhs) -> bool"""
1334 return _pcbnew.KIID_PATH___eq__(self, rhs)
1335
1336 def __lt__(self, rhs):
1337 r"""__lt__(KIID_PATH self, KIID_PATH rhs) -> bool"""
1338 return _pcbnew.KIID_PATH___lt__(self, rhs)
1339
1340 def __iadd__(self, aRhs):
1341 r"""__iadd__(KIID_PATH self, KIID_PATH aRhs) -> KIID_PATH"""
1342 return _pcbnew.KIID_PATH___iadd__(self, aRhs)
1343 __swig_destroy__ = _pcbnew.delete_KIID_PATH
1344
1345# Register KIID_PATH in _pcbnew:
1346_pcbnew.KIID_PATH_swigregister(KIID_PATH)
1347
1349 r"""Proxy of C++ KIID_NIL_SET_RESET class."""
1350
1351 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1352 __repr__ = _swig_repr
1353
1354 def __init__(self):
1355 r"""__init__(KIID_NIL_SET_RESET self) -> KIID_NIL_SET_RESET"""
1356 _pcbnew.KIID_NIL_SET_RESET_swiginit(self, _pcbnew.new_KIID_NIL_SET_RESET())
1357 __swig_destroy__ = _pcbnew.delete_KIID_NIL_SET_RESET
1358
1359# Register KIID_NIL_SET_RESET in _pcbnew:
1360_pcbnew.KIID_NIL_SET_RESET_swigregister(KIID_NIL_SET_RESET)
1361
1362NOT_USED = _pcbnew.NOT_USED
1363
1364TYPE_NOT_INIT = _pcbnew.TYPE_NOT_INIT
1365
1366PCB_T = _pcbnew.PCB_T
1367
1368SCREEN_T = _pcbnew.SCREEN_T
1369
1370PCB_FOOTPRINT_T = _pcbnew.PCB_FOOTPRINT_T
1371
1372PCB_PAD_T = _pcbnew.PCB_PAD_T
1373
1374PCB_SHAPE_T = _pcbnew.PCB_SHAPE_T
1375
1376PCB_BITMAP_T = _pcbnew.PCB_BITMAP_T
1377
1378PCB_TEXT_T = _pcbnew.PCB_TEXT_T
1379
1380PCB_TEXTBOX_T = _pcbnew.PCB_TEXTBOX_T
1381
1382PCB_FP_TEXT_T = _pcbnew.PCB_FP_TEXT_T
1383
1384PCB_FP_TEXTBOX_T = _pcbnew.PCB_FP_TEXTBOX_T
1385
1386PCB_FP_SHAPE_T = _pcbnew.PCB_FP_SHAPE_T
1387
1388PCB_FP_DIM_ALIGNED_T = _pcbnew.PCB_FP_DIM_ALIGNED_T
1389
1390PCB_FP_DIM_LEADER_T = _pcbnew.PCB_FP_DIM_LEADER_T
1391
1392PCB_FP_DIM_CENTER_T = _pcbnew.PCB_FP_DIM_CENTER_T
1393
1394PCB_FP_DIM_RADIAL_T = _pcbnew.PCB_FP_DIM_RADIAL_T
1395
1396PCB_FP_DIM_ORTHOGONAL_T = _pcbnew.PCB_FP_DIM_ORTHOGONAL_T
1397
1398PCB_FP_ZONE_T = _pcbnew.PCB_FP_ZONE_T
1399
1400PCB_TRACE_T = _pcbnew.PCB_TRACE_T
1401
1402PCB_VIA_T = _pcbnew.PCB_VIA_T
1403
1404PCB_ARC_T = _pcbnew.PCB_ARC_T
1405
1406PCB_MARKER_T = _pcbnew.PCB_MARKER_T
1407
1408PCB_DIMENSION_T = _pcbnew.PCB_DIMENSION_T
1409
1410PCB_DIM_ALIGNED_T = _pcbnew.PCB_DIM_ALIGNED_T
1411
1412PCB_DIM_LEADER_T = _pcbnew.PCB_DIM_LEADER_T
1413
1414PCB_DIM_CENTER_T = _pcbnew.PCB_DIM_CENTER_T
1415
1416PCB_DIM_RADIAL_T = _pcbnew.PCB_DIM_RADIAL_T
1417
1418PCB_DIM_ORTHOGONAL_T = _pcbnew.PCB_DIM_ORTHOGONAL_T
1419
1420PCB_TARGET_T = _pcbnew.PCB_TARGET_T
1421
1422PCB_ZONE_T = _pcbnew.PCB_ZONE_T
1423
1424PCB_ITEM_LIST_T = _pcbnew.PCB_ITEM_LIST_T
1425
1426PCB_NETINFO_T = _pcbnew.PCB_NETINFO_T
1427
1428PCB_GROUP_T = _pcbnew.PCB_GROUP_T
1429
1430PCB_LOCATE_STDVIA_T = _pcbnew.PCB_LOCATE_STDVIA_T
1431
1432PCB_LOCATE_UVIA_T = _pcbnew.PCB_LOCATE_UVIA_T
1433
1434PCB_LOCATE_BBVIA_T = _pcbnew.PCB_LOCATE_BBVIA_T
1435
1436PCB_LOCATE_TEXT_T = _pcbnew.PCB_LOCATE_TEXT_T
1437
1438PCB_LOCATE_GRAPHIC_T = _pcbnew.PCB_LOCATE_GRAPHIC_T
1439
1440PCB_LOCATE_HOLE_T = _pcbnew.PCB_LOCATE_HOLE_T
1441
1442PCB_LOCATE_PTH_T = _pcbnew.PCB_LOCATE_PTH_T
1443
1444PCB_LOCATE_NPTH_T = _pcbnew.PCB_LOCATE_NPTH_T
1445
1446PCB_LOCATE_BOARD_EDGE_T = _pcbnew.PCB_LOCATE_BOARD_EDGE_T
1447
1448PCB_SHAPE_LOCATE_SEGMENT_T = _pcbnew.PCB_SHAPE_LOCATE_SEGMENT_T
1449
1450PCB_SHAPE_LOCATE_RECT_T = _pcbnew.PCB_SHAPE_LOCATE_RECT_T
1451
1452PCB_SHAPE_LOCATE_CIRCLE_T = _pcbnew.PCB_SHAPE_LOCATE_CIRCLE_T
1453
1454PCB_SHAPE_LOCATE_ARC_T = _pcbnew.PCB_SHAPE_LOCATE_ARC_T
1455
1456PCB_SHAPE_LOCATE_POLY_T = _pcbnew.PCB_SHAPE_LOCATE_POLY_T
1457
1458PCB_SHAPE_LOCATE_BEZIER_T = _pcbnew.PCB_SHAPE_LOCATE_BEZIER_T
1459
1460SCH_MARKER_T = _pcbnew.SCH_MARKER_T
1461
1462SCH_JUNCTION_T = _pcbnew.SCH_JUNCTION_T
1463
1464SCH_NO_CONNECT_T = _pcbnew.SCH_NO_CONNECT_T
1465
1466SCH_BUS_WIRE_ENTRY_T = _pcbnew.SCH_BUS_WIRE_ENTRY_T
1467
1468SCH_BUS_BUS_ENTRY_T = _pcbnew.SCH_BUS_BUS_ENTRY_T
1469
1470SCH_LINE_T = _pcbnew.SCH_LINE_T
1471
1472SCH_SHAPE_T = _pcbnew.SCH_SHAPE_T
1473
1474SCH_BITMAP_T = _pcbnew.SCH_BITMAP_T
1475
1476SCH_TEXTBOX_T = _pcbnew.SCH_TEXTBOX_T
1477
1478SCH_TEXT_T = _pcbnew.SCH_TEXT_T
1479
1480SCH_LABEL_T = _pcbnew.SCH_LABEL_T
1481
1482SCH_GLOBAL_LABEL_T = _pcbnew.SCH_GLOBAL_LABEL_T
1483
1484SCH_HIER_LABEL_T = _pcbnew.SCH_HIER_LABEL_T
1485
1486SCH_DIRECTIVE_LABEL_T = _pcbnew.SCH_DIRECTIVE_LABEL_T
1487
1488SCH_FIELD_T = _pcbnew.SCH_FIELD_T
1489
1490SCH_SYMBOL_T = _pcbnew.SCH_SYMBOL_T
1491
1492SCH_SHEET_PIN_T = _pcbnew.SCH_SHEET_PIN_T
1493
1494SCH_SHEET_T = _pcbnew.SCH_SHEET_T
1495
1496SCH_PIN_T = _pcbnew.SCH_PIN_T
1497
1498SCH_FIELD_LOCATE_REFERENCE_T = _pcbnew.SCH_FIELD_LOCATE_REFERENCE_T
1499
1500SCH_FIELD_LOCATE_VALUE_T = _pcbnew.SCH_FIELD_LOCATE_VALUE_T
1501
1502SCH_FIELD_LOCATE_FOOTPRINT_T = _pcbnew.SCH_FIELD_LOCATE_FOOTPRINT_T
1503
1504SCH_FIELD_LOCATE_DATASHEET_T = _pcbnew.SCH_FIELD_LOCATE_DATASHEET_T
1505
1506SCH_ITEM_LOCATE_WIRE_T = _pcbnew.SCH_ITEM_LOCATE_WIRE_T
1507
1508SCH_ITEM_LOCATE_BUS_T = _pcbnew.SCH_ITEM_LOCATE_BUS_T
1509
1510SCH_ITEM_LOCATE_GRAPHIC_LINE_T = _pcbnew.SCH_ITEM_LOCATE_GRAPHIC_LINE_T
1511
1512SCH_LABEL_LOCATE_ANY_T = _pcbnew.SCH_LABEL_LOCATE_ANY_T
1513
1514SCH_LABEL_LOCATE_WIRE_T = _pcbnew.SCH_LABEL_LOCATE_WIRE_T
1515
1516SCH_LABEL_LOCATE_BUS_T = _pcbnew.SCH_LABEL_LOCATE_BUS_T
1517
1518SCH_SYMBOL_LOCATE_POWER_T = _pcbnew.SCH_SYMBOL_LOCATE_POWER_T
1519
1520SCH_LOCATE_ANY_T = _pcbnew.SCH_LOCATE_ANY_T
1521
1522SCH_SCREEN_T = _pcbnew.SCH_SCREEN_T
1523
1524SCHEMATIC_T = _pcbnew.SCHEMATIC_T
1525
1526LIB_SYMBOL_T = _pcbnew.LIB_SYMBOL_T
1527
1528LIB_SHAPE_T = _pcbnew.LIB_SHAPE_T
1529
1530LIB_TEXT_T = _pcbnew.LIB_TEXT_T
1531
1532LIB_TEXTBOX_T = _pcbnew.LIB_TEXTBOX_T
1533
1534LIB_PIN_T = _pcbnew.LIB_PIN_T
1535
1536LIB_FIELD_T = _pcbnew.LIB_FIELD_T
1537
1538GERBER_LAYOUT_T = _pcbnew.GERBER_LAYOUT_T
1539
1540GERBER_DRAW_ITEM_T = _pcbnew.GERBER_DRAW_ITEM_T
1541
1542GERBER_IMAGE_T = _pcbnew.GERBER_IMAGE_T
1543
1544WSG_LINE_T = _pcbnew.WSG_LINE_T
1545
1546WSG_RECT_T = _pcbnew.WSG_RECT_T
1547
1548WSG_POLY_T = _pcbnew.WSG_POLY_T
1549
1550WSG_TEXT_T = _pcbnew.WSG_TEXT_T
1551
1552WSG_BITMAP_T = _pcbnew.WSG_BITMAP_T
1553
1554WSG_PAGE_T = _pcbnew.WSG_PAGE_T
1555
1556WS_PROXY_UNDO_ITEM_T = _pcbnew.WS_PROXY_UNDO_ITEM_T
1557
1558WS_PROXY_UNDO_ITEM_PLUS_T = _pcbnew.WS_PROXY_UNDO_ITEM_PLUS_T
1559
1560SYMBOL_LIB_TABLE_T = _pcbnew.SYMBOL_LIB_TABLE_T
1561
1562FP_LIB_TABLE_T = _pcbnew.FP_LIB_TABLE_T
1563
1564SYMBOL_LIBS_T = _pcbnew.SYMBOL_LIBS_T
1565
1566SEARCH_STACK_T = _pcbnew.SEARCH_STACK_T
1567
1568S3D_CACHE_T = _pcbnew.S3D_CACHE_T
1569
1570MAX_STRUCT_TYPE_ID = _pcbnew.MAX_STRUCT_TYPE_ID
1571
1572
1573def BaseType(aType):
1574 r"""BaseType(KICAD_T const aType) -> KICAD_T"""
1575 return _pcbnew.BaseType(aType)
1576
1577def IsNullType(aType):
1578 r"""IsNullType(KICAD_T const aType) -> bool"""
1579 return _pcbnew.IsNullType(aType)
1580
1582 r"""IsInstantiableType(KICAD_T const aType) -> bool"""
1583 return _pcbnew.IsInstantiableType(aType)
1584
1586 r"""IsEeschemaType(KICAD_T const aType) -> bool"""
1587 return _pcbnew.IsEeschemaType(aType)
1588
1589def IsPcbnewType(aType):
1590 r"""IsPcbnewType(KICAD_T const aType) -> bool"""
1591 return _pcbnew.IsPcbnewType(aType)
1592
1594 r"""IsGerbviewType(KICAD_T const aType) -> bool"""
1595 return _pcbnew.IsGerbviewType(aType)
1596
1598 r"""IsPageLayoutEditorType(KICAD_T const aType) -> bool"""
1599 return _pcbnew.IsPageLayoutEditorType(aType)
1600
1601def IsMiscType(aType):
1602 r"""IsMiscType(KICAD_T const aType) -> bool"""
1603 return _pcbnew.IsMiscType(aType)
1604
1605def IsTypeCorrect(aType):
1606 r"""IsTypeCorrect(KICAD_T aType) -> bool"""
1607 return _pcbnew.IsTypeCorrect(aType)
1608
1610 r"""IsTypeAvailable(KICAD_T aType) -> bool"""
1611 return _pcbnew.IsTypeAvailable(aType)
1612INSPECT_RESULT_QUIT = _pcbnew.INSPECT_RESULT_QUIT
1613
1614INSPECT_RESULT_CONTINUE = _pcbnew.INSPECT_RESULT_CONTINUE
1615
1617 r"""Proxy of C++ EDA_ITEM class."""
1618
1619 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1620
1621 def __init__(self, *args, **kwargs):
1622 raise AttributeError("No constructor defined - class is abstract")
1623 __repr__ = _swig_repr
1624 __swig_destroy__ = _pcbnew.delete_EDA_ITEM
1625
1626 def Type(self):
1627 r"""Type(EDA_ITEM self) -> KICAD_T"""
1628 return _pcbnew.EDA_ITEM_Type(self)
1629
1630 def GetParent(self):
1631 r"""GetParent(EDA_ITEM self) -> EDA_ITEM"""
1632 return _pcbnew.EDA_ITEM_GetParent(self)
1633
1634 def SetParent(self, aParent):
1635 r"""SetParent(EDA_ITEM self, EDA_ITEM aParent)"""
1636 return _pcbnew.EDA_ITEM_SetParent(self, aParent)
1637
1638 def IsModified(self):
1639 r"""IsModified(EDA_ITEM self) -> bool"""
1640 return _pcbnew.EDA_ITEM_IsModified(self)
1641
1642 def IsNew(self):
1643 r"""IsNew(EDA_ITEM self) -> bool"""
1644 return _pcbnew.EDA_ITEM_IsNew(self)
1645
1646 def IsMoving(self):
1647 r"""IsMoving(EDA_ITEM self) -> bool"""
1648 return _pcbnew.EDA_ITEM_IsMoving(self)
1649
1650 def IsSelected(self):
1651 r"""IsSelected(EDA_ITEM self) -> bool"""
1652 return _pcbnew.EDA_ITEM_IsSelected(self)
1653
1654 def IsEntered(self):
1655 r"""IsEntered(EDA_ITEM self) -> bool"""
1656 return _pcbnew.EDA_ITEM_IsEntered(self)
1657
1658 def IsBrightened(self):
1659 r"""IsBrightened(EDA_ITEM self) -> bool"""
1660 return _pcbnew.EDA_ITEM_IsBrightened(self)
1661
1662 def IsRollover(self):
1663 r"""IsRollover(EDA_ITEM self) -> bool"""
1664 return _pcbnew.EDA_ITEM_IsRollover(self)
1665
1666 def SetSelected(self):
1667 r"""SetSelected(EDA_ITEM self)"""
1668 return _pcbnew.EDA_ITEM_SetSelected(self)
1669
1670 def SetBrightened(self):
1671 r"""SetBrightened(EDA_ITEM self)"""
1672 return _pcbnew.EDA_ITEM_SetBrightened(self)
1673
1674 def ClearSelected(self):
1675 r"""ClearSelected(EDA_ITEM self)"""
1676 return _pcbnew.EDA_ITEM_ClearSelected(self)
1677
1679 r"""ClearBrightened(EDA_ITEM self)"""
1680 return _pcbnew.EDA_ITEM_ClearBrightened(self)
1681
1682 def SetModified(self):
1683 r"""SetModified(EDA_ITEM self)"""
1684 return _pcbnew.EDA_ITEM_SetModified(self)
1685
1686 def GetState(self, type):
1687 r"""GetState(EDA_ITEM self, EDA_ITEM_FLAGS type) -> int"""
1688 return _pcbnew.EDA_ITEM_GetState(self, type)
1689
1690 def SetState(self, type, state):
1691 r"""SetState(EDA_ITEM self, EDA_ITEM_FLAGS type, bool state)"""
1692 return _pcbnew.EDA_ITEM_SetState(self, type, state)
1693
1694 def GetStatus(self):
1695 r"""GetStatus(EDA_ITEM self) -> EDA_ITEM_FLAGS"""
1696 return _pcbnew.EDA_ITEM_GetStatus(self)
1697
1698 def SetStatus(self, aStatus):
1699 r"""SetStatus(EDA_ITEM self, EDA_ITEM_FLAGS aStatus)"""
1700 return _pcbnew.EDA_ITEM_SetStatus(self, aStatus)
1701
1702 def SetFlags(self, aMask):
1703 r"""SetFlags(EDA_ITEM self, EDA_ITEM_FLAGS aMask)"""
1704 return _pcbnew.EDA_ITEM_SetFlags(self, aMask)
1705
1706 def XorFlags(self, aMask):
1707 r"""XorFlags(EDA_ITEM self, EDA_ITEM_FLAGS aMask)"""
1708 return _pcbnew.EDA_ITEM_XorFlags(self, aMask)
1709
1710 def ClearFlags(self, *args):
1711 r"""ClearFlags(EDA_ITEM self, EDA_ITEM_FLAGS aMask=EDA_ITEM_ALL_FLAGS)"""
1712 return _pcbnew.EDA_ITEM_ClearFlags(self, *args)
1713
1714 def GetFlags(self):
1715 r"""GetFlags(EDA_ITEM self) -> EDA_ITEM_FLAGS"""
1716 return _pcbnew.EDA_ITEM_GetFlags(self)
1717
1718 def HasFlag(self, aFlag):
1719 r"""HasFlag(EDA_ITEM self, EDA_ITEM_FLAGS aFlag) -> bool"""
1720 return _pcbnew.EDA_ITEM_HasFlag(self, aFlag)
1721
1722 def GetEditFlags(self):
1723 r"""GetEditFlags(EDA_ITEM self) -> EDA_ITEM_FLAGS"""
1724 return _pcbnew.EDA_ITEM_GetEditFlags(self)
1725
1727 r"""ClearTempFlags(EDA_ITEM self)"""
1728 return _pcbnew.EDA_ITEM_ClearTempFlags(self)
1729
1731 r"""ClearEditFlags(EDA_ITEM self)"""
1732 return _pcbnew.EDA_ITEM_ClearEditFlags(self)
1733
1734 def RenderAsBitmap(self, aWorldScale):
1735 r"""RenderAsBitmap(EDA_ITEM self, double aWorldScale) -> bool"""
1736 return _pcbnew.EDA_ITEM_RenderAsBitmap(self, aWorldScale)
1737
1738 def SetIsShownAsBitmap(self, aBitmap):
1739 r"""SetIsShownAsBitmap(EDA_ITEM self, bool aBitmap)"""
1740 return _pcbnew.EDA_ITEM_SetIsShownAsBitmap(self, aBitmap)
1741
1743 r"""IsShownAsBitmap(EDA_ITEM self) -> bool"""
1744 return _pcbnew.EDA_ITEM_IsShownAsBitmap(self)
1745
1746 def IsType(self, aScanTypes):
1747 r"""IsType(EDA_ITEM self, std::vector< KICAD_T,std::allocator< KICAD_T > > const & aScanTypes) -> bool"""
1748 return _pcbnew.EDA_ITEM_IsType(self, aScanTypes)
1749
1750 def SetForceVisible(self, aEnable):
1751 r"""SetForceVisible(EDA_ITEM self, bool aEnable)"""
1752 return _pcbnew.EDA_ITEM_SetForceVisible(self, aEnable)
1753
1755 r"""IsForceVisible(EDA_ITEM self) -> bool"""
1756 return _pcbnew.EDA_ITEM_IsForceVisible(self)
1757
1758 def GetMsgPanelInfo(self, aFrame, aList):
1759 r"""GetMsgPanelInfo(EDA_ITEM self, EDA_DRAW_FRAME * aFrame, std::vector< MSG_PANEL_ITEM,std::allocator< MSG_PANEL_ITEM > > & aList)"""
1760 return _pcbnew.EDA_ITEM_GetMsgPanelInfo(self, aFrame, aList)
1761
1763 r"""GetFriendlyName(EDA_ITEM self) -> wxString"""
1764 return _pcbnew.EDA_ITEM_GetFriendlyName(self)
1765
1766 def HitTest(self, *args):
1767 r"""
1768 HitTest(EDA_ITEM self, VECTOR2I aPosition, int aAccuracy=0) -> bool
1769 HitTest(EDA_ITEM self, BOX2I aRect, bool aContained, int aAccuracy=0) -> bool
1770 """
1771 return _pcbnew.EDA_ITEM_HitTest(self, *args)
1772
1774 r"""GetBoundingBox(EDA_ITEM self) -> BOX2I"""
1775 return _pcbnew.EDA_ITEM_GetBoundingBox(self)
1776
1777 def GetPosition(self):
1778 r"""GetPosition(EDA_ITEM self) -> VECTOR2I"""
1779 return _pcbnew.EDA_ITEM_GetPosition(self)
1780
1781 def SetPosition(self, aPos):
1782 r"""SetPosition(EDA_ITEM self, VECTOR2I aPos)"""
1783 return _pcbnew.EDA_ITEM_SetPosition(self, aPos)
1784
1786 r"""GetFocusPosition(EDA_ITEM self) -> VECTOR2I"""
1787 return _pcbnew.EDA_ITEM_GetFocusPosition(self)
1788
1790 r"""GetSortPosition(EDA_ITEM self) -> VECTOR2I"""
1791 return _pcbnew.EDA_ITEM_GetSortPosition(self)
1792
1793 def Clone(self):
1794 r"""Clone(EDA_ITEM self) -> EDA_ITEM"""
1795 return _pcbnew.EDA_ITEM_Clone(self)
1796
1797 def Visit(self, inspector, testData, aScanTypes):
1798 r"""Visit(EDA_ITEM self, INSPECTOR inspector, void * testData, std::vector< KICAD_T,std::allocator< KICAD_T > > const & aScanTypes) -> INSPECT_RESULT"""
1799 return _pcbnew.EDA_ITEM_Visit(self, inspector, testData, aScanTypes)
1800
1801 def GetClass(self):
1802 r"""GetClass(EDA_ITEM self) -> wxString"""
1803 return _pcbnew.EDA_ITEM_GetClass(self)
1804
1805 def GetTypeDesc(self):
1806 r"""GetTypeDesc(EDA_ITEM self) -> wxString"""
1807 return _pcbnew.EDA_ITEM_GetTypeDesc(self)
1808
1809 def GetItemDescription(self, aUnitsProvider):
1810 r"""GetItemDescription(EDA_ITEM self, UNITS_PROVIDER aUnitsProvider) -> wxString"""
1811 return _pcbnew.EDA_ITEM_GetItemDescription(self, aUnitsProvider)
1812
1813 def GetMenuImage(self):
1814 r"""GetMenuImage(EDA_ITEM self) -> BITMAPS"""
1815 return _pcbnew.EDA_ITEM_GetMenuImage(self)
1816
1817 def Matches(self, aSearchData, aAuxData):
1818 r"""Matches(EDA_ITEM self, EDA_SEARCH_DATA const & aSearchData, void * aAuxData) -> bool"""
1819 return _pcbnew.EDA_ITEM_Matches(self, aSearchData, aAuxData)
1820
1821 def Replace(self, *args):
1822 r"""
1823 Replace(EDA_ITEM self, EDA_SEARCH_DATA const & aSearchData, wxString aText) -> bool
1824 Replace(EDA_ITEM self, EDA_SEARCH_DATA const & aSearchData, void * aAuxData=None) -> bool
1825 """
1826 return _pcbnew.EDA_ITEM_Replace(self, *args)
1827
1828 def IsReplaceable(self):
1829 r"""IsReplaceable(EDA_ITEM self) -> bool"""
1830 return _pcbnew.EDA_ITEM_IsReplaceable(self)
1831
1832 def __lt__(self, aItem):
1833 r"""__lt__(EDA_ITEM self, EDA_ITEM aItem) -> bool"""
1834 return _pcbnew.EDA_ITEM___lt__(self, aItem)
1835
1836 @staticmethod
1837 def Sort(aLeft, aRight):
1838 r"""Sort(EDA_ITEM aLeft, EDA_ITEM aRight) -> bool"""
1839 return _pcbnew.EDA_ITEM_Sort(aLeft, aRight)
1840
1841 def ViewBBox(self):
1842 r"""ViewBBox(EDA_ITEM self) -> BOX2I"""
1843 return _pcbnew.EDA_ITEM_ViewBBox(self)
1844
1845 def ViewGetLayers(self, aLayers, aCount):
1846 r"""ViewGetLayers(EDA_ITEM self, int [] aLayers, int & aCount)"""
1847 return _pcbnew.EDA_ITEM_ViewGetLayers(self, aLayers, aCount)
1848 m_Uuid = property(_pcbnew.EDA_ITEM_m_Uuid_get, doc=r"""m_Uuid : q(const).KIID""")
1849
1850# Register EDA_ITEM in _pcbnew:
1851_pcbnew.EDA_ITEM_swigregister(EDA_ITEM)
1852
1853def EDA_ITEM_Sort(aLeft, aRight):
1854 r"""EDA_ITEM_Sort(EDA_ITEM aLeft, EDA_ITEM aRight) -> bool"""
1855 return _pcbnew.EDA_ITEM_Sort(aLeft, aRight)
1856
1857
1858def new_clone(aItem):
1859 r"""new_clone(EDA_ITEM aItem) -> EDA_ITEM"""
1860 return _pcbnew.new_clone(aItem)
1862 r"""Proxy of C++ EDA_IU_SCALE class."""
1863
1864 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1865 __repr__ = _swig_repr
1866 IU_PER_MM = property(_pcbnew.EDA_IU_SCALE_IU_PER_MM_get, doc=r"""IU_PER_MM : q(const).double""")
1867 IU_PER_MILS = property(_pcbnew.EDA_IU_SCALE_IU_PER_MILS_get, doc=r"""IU_PER_MILS : q(const).double""")
1868 MM_PER_IU = property(_pcbnew.EDA_IU_SCALE_MM_PER_IU_get, doc=r"""MM_PER_IU : q(const).double""")
1869
1870 def __init__(self, aIUPerMM):
1871 r"""__init__(EDA_IU_SCALE self, double aIUPerMM) -> EDA_IU_SCALE"""
1872 _pcbnew.EDA_IU_SCALE_swiginit(self, _pcbnew.new_EDA_IU_SCALE(aIUPerMM))
1873
1874 def IUTomm(self, iu):
1875 r"""IUTomm(EDA_IU_SCALE self, int iu) -> double"""
1876 return _pcbnew.EDA_IU_SCALE_IUTomm(self, iu)
1877
1878 def mmToIU(self, mm):
1879 r"""mmToIU(EDA_IU_SCALE self, double mm) -> int"""
1880 return _pcbnew.EDA_IU_SCALE_mmToIU(self, mm)
1881
1882 def MilsToIU(self, mils):
1883 r"""MilsToIU(EDA_IU_SCALE self, int mils) -> int"""
1884 return _pcbnew.EDA_IU_SCALE_MilsToIU(self, mils)
1885
1886 def IUToMils(self, iu):
1887 r"""IUToMils(EDA_IU_SCALE self, int iu) -> int"""
1888 return _pcbnew.EDA_IU_SCALE_IUToMils(self, iu)
1889 __swig_destroy__ = _pcbnew.delete_EDA_IU_SCALE
1890
1891# Register EDA_IU_SCALE in _pcbnew:
1892_pcbnew.EDA_IU_SCALE_swigregister(EDA_IU_SCALE)
1893GERB_IU_PER_MM = cvar.GERB_IU_PER_MM
1894PCB_IU_PER_MM = cvar.PCB_IU_PER_MM
1895PL_IU_PER_MM = cvar.PL_IU_PER_MM
1896SCH_IU_PER_MM = cvar.SCH_IU_PER_MM
1897
1898EDA_DATA_TYPE_DISTANCE = _pcbnew.EDA_DATA_TYPE_DISTANCE
1899
1900EDA_DATA_TYPE_AREA = _pcbnew.EDA_DATA_TYPE_AREA
1901
1902EDA_DATA_TYPE_VOLUME = _pcbnew.EDA_DATA_TYPE_VOLUME
1903
1904EDA_UNITS_INCHES = _pcbnew.EDA_UNITS_INCHES
1905
1906EDA_UNITS_MILLIMETRES = _pcbnew.EDA_UNITS_MILLIMETRES
1907
1908EDA_UNITS_UNSCALED = _pcbnew.EDA_UNITS_UNSCALED
1909
1910EDA_UNITS_DEGREES = _pcbnew.EDA_UNITS_DEGREES
1911
1912EDA_UNITS_PERCENT = _pcbnew.EDA_UNITS_PERCENT
1913
1914EDA_UNITS_MILS = _pcbnew.EDA_UNITS_MILS
1915
1916
1918 r"""IsImperialUnit(EDA_UNITS aUnit) -> bool"""
1919 return _pcbnew.IsImperialUnit(aUnit)
1920
1921def IsMetricUnit(aUnit):
1922 r"""IsMetricUnit(EDA_UNITS aUnit) -> bool"""
1923 return _pcbnew.IsMetricUnit(aUnit)
1924
1925def Mm2mils(aVal):
1926 r"""Mm2mils(double aVal) -> int"""
1927 return _pcbnew.Mm2mils(aVal)
1928
1929def Mils2mm(aVal):
1930 r"""Mils2mm(double aVal) -> int"""
1931 return _pcbnew.Mils2mm(aVal)
1932
1933def FetchUnitsFromString(aTextValue, aUnits):
1934 r"""FetchUnitsFromString(wxString aTextValue, EDA_UNITS & aUnits) -> bool"""
1935 return _pcbnew.FetchUnitsFromString(aTextValue, aUnits)
1936
1937def GetText(*args):
1938 r"""GetText(EDA_UNITS aUnits, EDA_DATA_TYPE aType=DISTANCE) -> wxString"""
1939 return _pcbnew.GetText(*args)
1940
1941def GetLabel(*args):
1942 r"""GetLabel(EDA_UNITS aUnits, EDA_DATA_TYPE aType=DISTANCE) -> wxString"""
1943 return _pcbnew.GetLabel(*args)
1944
1945def FormatAngle(aAngle):
1946 r"""FormatAngle(EDA_ANGLE aAngle) -> string"""
1947 return _pcbnew.FormatAngle(aAngle)
1948
1950 r"""
1951 FormatInternalUnits(EDA_IU_SCALE aIuScale, int aValue) -> string
1952 FormatInternalUnits(EDA_IU_SCALE aIuScale, wxPoint aPoint) -> string
1953 FormatInternalUnits(EDA_IU_SCALE aIuScale, wxSize aSize) -> string
1954 FormatInternalUnits(EDA_IU_SCALE aIuScale, VECTOR2I aPoint) -> string
1955 """
1956 return _pcbnew.FormatInternalUnits(*args)
1957
1958def Mils2IU(aIuScale, mils):
1959 r"""Mils2IU(EDA_IU_SCALE aIuScale, int mils) -> int"""
1960 return _pcbnew.Mils2IU(aIuScale, mils)
1961
1962def ToUserUnit(aIuScale, aUnit, aValue):
1963 r"""ToUserUnit(EDA_IU_SCALE aIuScale, EDA_UNITS aUnit, double aValue) -> double"""
1964 return _pcbnew.ToUserUnit(aIuScale, aUnit, aValue)
1965
1967 r"""StringFromValue(EDA_IU_SCALE aIuScale, EDA_UNITS aUnits, double aValue, bool aAddUnitsText=False, EDA_DATA_TYPE aType=DISTANCE) -> wxString"""
1968 return _pcbnew.StringFromValue(*args)
1969
1971 r"""
1972 MessageTextFromValue(EDA_IU_SCALE aIuScale, EDA_UNITS aUnits, double aValue, bool aAddUnitsText=True, EDA_DATA_TYPE aType=DISTANCE) -> wxString
1973 MessageTextFromValue(EDA_IU_SCALE aIuScale, EDA_UNITS aUnits, int aValue, bool aAddUnitLabel=True, EDA_DATA_TYPE aType=DISTANCE) -> wxString
1974 MessageTextFromValue(EDA_IU_SCALE aIuScale, EDA_UNITS aUnits, long long aValue, bool aAddUnitLabel=True, EDA_DATA_TYPE aType=DISTANCE) -> wxString
1975 MessageTextFromValue(EDA_ANGLE aValue, bool aAddUnitLabel=True) -> wxString
1976 """
1977 return _pcbnew.MessageTextFromValue(*args)
1978
1979def FromUserUnit(aIuScale, aUnit, aValue):
1980 r"""FromUserUnit(EDA_IU_SCALE aIuScale, EDA_UNITS aUnit, double aValue) -> double"""
1981 return _pcbnew.FromUserUnit(aIuScale, aUnit, aValue)
1982
1984 r"""
1985 DoubleValueFromString(EDA_IU_SCALE aIuScale, EDA_UNITS aUnits, wxString aTextValue, EDA_DATA_TYPE aType=DISTANCE) -> double
1986 DoubleValueFromString(wxString aTextValue) -> double
1987 """
1988 return _pcbnew.DoubleValueFromString(*args)
1989
1991 r"""
1992 ValueFromString(EDA_IU_SCALE aIuScale, EDA_UNITS aUnits, wxString aTextValue, EDA_DATA_TYPE aType=DISTANCE) -> long long
1993 ValueFromString(wxString aTextValue) -> long long
1994 """
1995 return _pcbnew.ValueFromString(*args)
1996
1998 r"""SearchHelpFileFullPath(wxString aBaseName) -> wxString"""
1999 return _pcbnew.SearchHelpFileFullPath(aBaseName)
2000
2001def EnsureFileDirectoryExists(aTargetFullFileName, aBaseFilename, aReporter=None):
2002 r"""EnsureFileDirectoryExists(wxFileName * aTargetFullFileName, wxString aBaseFilename, REPORTER * aReporter=None) -> bool"""
2003 return _pcbnew.EnsureFileDirectoryExists(aTargetFullFileName, aBaseFilename, aReporter)
2004
2005def ExpandEnvVarSubstitutions(aString, aProject):
2006 r"""ExpandEnvVarSubstitutions(wxString aString, PROJECT const * aProject) -> wxString"""
2007 return _pcbnew.ExpandEnvVarSubstitutions(aString, aProject)
2008
2010 r"""
2011 ExpandTextVars(wxString aSource, std::function< bool (wxString *) > const * aResolver) -> wxString
2012 ExpandTextVars(wxString aSource, PROJECT const * aProject) -> wxString
2013 """
2014 return _pcbnew.ExpandTextVars(*args)
2015
2016def ResolveUriByEnvVars(aUri, aProject):
2017 r"""ResolveUriByEnvVars(wxString aUri, PROJECT * aProject) -> wxString"""
2018 return _pcbnew.ResolveUriByEnvVars(aUri, aProject)
2019
2020def TimestampDir(aDirPath, aFilespec):
2021 r"""TimestampDir(wxString aDirPath, wxString aFilespec) -> long long"""
2022 return _pcbnew.TimestampDir(aDirPath, aFilespec)
2023
2025 r"""WarnUserIfOperatingSystemUnsupported() -> bool"""
2026 return _pcbnew.WarnUserIfOperatingSystemUnsupported()
2027
2028def StrPrintf(*args):
2029 r"""
2030 StrPrintf(string aResult, char const * aFormat) -> int
2031 StrPrintf(char const * format) -> string
2032 """
2033 return _pcbnew.StrPrintf(*args)
2034
2035def SafeReadFile(aFilePath, aReadType):
2036 r"""SafeReadFile(wxString aFilePath, wxString aReadType) -> wxString"""
2037 return _pcbnew.SafeReadFile(aFilePath, aReadType)
2038LINE_READER_LINE_DEFAULT_MAX = _pcbnew.LINE_READER_LINE_DEFAULT_MAX
2039
2040LINE_READER_LINE_INITIAL_SIZE = _pcbnew.LINE_READER_LINE_INITIAL_SIZE
2041
2043 r"""Proxy of C++ LINE_READER class."""
2044
2045 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2046
2047 def __init__(self, *args, **kwargs):
2048 raise AttributeError("No constructor defined - class is abstract")
2049 __repr__ = _swig_repr
2050 __swig_destroy__ = _pcbnew.delete_LINE_READER
2051
2052 def ReadLine(self):
2053 r"""ReadLine(LINE_READER self) -> char *"""
2054 return _pcbnew.LINE_READER_ReadLine(self)
2055
2056 def GetSource(self):
2057 r"""GetSource(LINE_READER self) -> wxString"""
2058 return _pcbnew.LINE_READER_GetSource(self)
2059
2060 def Line(self):
2061 r"""Line(LINE_READER self) -> char *"""
2062 return _pcbnew.LINE_READER_Line(self)
2063
2064 def LineNumber(self):
2065 r"""LineNumber(LINE_READER self) -> unsigned int"""
2066 return _pcbnew.LINE_READER_LineNumber(self)
2067
2068 def Length(self):
2069 r"""Length(LINE_READER self) -> unsigned int"""
2070 return _pcbnew.LINE_READER_Length(self)
2071
2072# Register LINE_READER in _pcbnew:
2073_pcbnew.LINE_READER_swigregister(LINE_READER)
2074gerbIUScale = cvar.gerbIUScale
2075pcbIUScale = cvar.pcbIUScale
2076drawSheetIUScale = cvar.drawSheetIUScale
2077schIUScale = cvar.schIUScale
2078unityScale = cvar.unityScale
2079
2081 r"""Proxy of C++ FILE_LINE_READER class."""
2082
2083 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2084 __repr__ = _swig_repr
2085
2086 def __init__(self, *args):
2087 r"""
2088 __init__(FILE_LINE_READER self, wxString aFileName, unsigned int aStartingLineNumber=0, unsigned int aMaxLineLength=1000000) -> FILE_LINE_READER
2089 __init__(FILE_LINE_READER self, FILE * aFile, wxString aFileName, bool doOwn=True, unsigned int aStartingLineNumber=0, unsigned int aMaxLineLength=1000000) -> FILE_LINE_READER
2090 """
2091 _pcbnew.FILE_LINE_READER_swiginit(self, _pcbnew.new_FILE_LINE_READER(*args))
2092 __swig_destroy__ = _pcbnew.delete_FILE_LINE_READER
2093
2094 def Rewind(self):
2095 r"""Rewind(FILE_LINE_READER self)"""
2096 return _pcbnew.FILE_LINE_READER_Rewind(self)
2097
2098 def FileLength(self):
2099 r"""FileLength(FILE_LINE_READER self) -> long"""
2100 return _pcbnew.FILE_LINE_READER_FileLength(self)
2101
2102 def CurPos(self):
2103 r"""CurPos(FILE_LINE_READER self) -> long"""
2104 return _pcbnew.FILE_LINE_READER_CurPos(self)
2105
2106# Register FILE_LINE_READER in _pcbnew:
2107_pcbnew.FILE_LINE_READER_swigregister(FILE_LINE_READER)
2108
2110 r"""Proxy of C++ STRING_LINE_READER class."""
2111
2112 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2113 __repr__ = _swig_repr
2114
2115 def __init__(self, *args):
2116 r"""
2117 __init__(STRING_LINE_READER self, string aString, wxString aSource) -> STRING_LINE_READER
2118 __init__(STRING_LINE_READER self, STRING_LINE_READER aStartingPoint) -> STRING_LINE_READER
2119 """
2120 _pcbnew.STRING_LINE_READER_swiginit(self, _pcbnew.new_STRING_LINE_READER(*args))
2121 __swig_destroy__ = _pcbnew.delete_STRING_LINE_READER
2122
2123# Register STRING_LINE_READER in _pcbnew:
2124_pcbnew.STRING_LINE_READER_swigregister(STRING_LINE_READER)
2125
2127 r"""Proxy of C++ INPUTSTREAM_LINE_READER class."""
2128
2129 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2130 __repr__ = _swig_repr
2131
2132 def __init__(self, aStream, aSource):
2133 r"""__init__(INPUTSTREAM_LINE_READER self, wxInputStream * aStream, wxString aSource) -> INPUTSTREAM_LINE_READER"""
2134 _pcbnew.INPUTSTREAM_LINE_READER_swiginit(self, _pcbnew.new_INPUTSTREAM_LINE_READER(aStream, aSource))
2135 __swig_destroy__ = _pcbnew.delete_INPUTSTREAM_LINE_READER
2136
2137# Register INPUTSTREAM_LINE_READER in _pcbnew:
2138_pcbnew.INPUTSTREAM_LINE_READER_swigregister(INPUTSTREAM_LINE_READER)
2139
2140OUTPUTFMTBUFZ = _pcbnew.OUTPUTFMTBUFZ
2141
2143 r"""Proxy of C++ OUTPUTFORMATTER class."""
2144
2145 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2146
2147 def __init__(self, *args, **kwargs):
2148 raise AttributeError("No constructor defined - class is abstract")
2149 __repr__ = _swig_repr
2150
2151 def Print(self, nestLevel, fmt):
2152 r"""Print(OUTPUTFORMATTER self, int nestLevel, char const * fmt) -> int"""
2153 return _pcbnew.OUTPUTFORMATTER_Print(self, nestLevel, fmt)
2154
2155 def GetQuoteChar(self, wrapee):
2156 r"""GetQuoteChar(OUTPUTFORMATTER self, char const * wrapee) -> char const *"""
2157 return _pcbnew.OUTPUTFORMATTER_GetQuoteChar(self, wrapee)
2158
2159 def Quotes(self, aWrapee):
2160 r"""Quotes(OUTPUTFORMATTER self, string aWrapee) -> string"""
2161 return _pcbnew.OUTPUTFORMATTER_Quotes(self, aWrapee)
2162
2163 def Quotew(self, aWrapee):
2164 r"""Quotew(OUTPUTFORMATTER self, wxString aWrapee) -> string"""
2165 return _pcbnew.OUTPUTFORMATTER_Quotew(self, aWrapee)
2166
2167# Register OUTPUTFORMATTER in _pcbnew:
2168_pcbnew.OUTPUTFORMATTER_swigregister(OUTPUTFORMATTER)
2169
2171 r"""Proxy of C++ STRING_FORMATTER class."""
2172
2173 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2174 __repr__ = _swig_repr
2175
2176 def __init__(self, *args):
2177 r"""__init__(STRING_FORMATTER self, int aReserve=500, char aQuoteChar='\"') -> STRING_FORMATTER"""
2178 _pcbnew.STRING_FORMATTER_swiginit(self, _pcbnew.new_STRING_FORMATTER(*args))
2179
2180 def Clear(self):
2181 r"""Clear(STRING_FORMATTER self)"""
2182 return _pcbnew.STRING_FORMATTER_Clear(self)
2183
2184 def StripUseless(self):
2185 r"""StripUseless(STRING_FORMATTER self)"""
2186 return _pcbnew.STRING_FORMATTER_StripUseless(self)
2187
2188 def GetString(self):
2189 r"""GetString(STRING_FORMATTER self) -> string"""
2190 return _pcbnew.STRING_FORMATTER_GetString(self)
2191 __swig_destroy__ = _pcbnew.delete_STRING_FORMATTER
2192
2193# Register STRING_FORMATTER in _pcbnew:
2194_pcbnew.STRING_FORMATTER_swigregister(STRING_FORMATTER)
2195
2197 r"""Proxy of C++ FILE_OUTPUTFORMATTER class."""
2198
2199 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2200 __repr__ = _swig_repr
2201
2202 def __init__(self, *args):
2203 r"""__init__(FILE_OUTPUTFORMATTER self, wxString aFileName, wxChar const * aMode=wxT( "wt" ), char aQuoteChar='\"') -> FILE_OUTPUTFORMATTER"""
2204 _pcbnew.FILE_OUTPUTFORMATTER_swiginit(self, _pcbnew.new_FILE_OUTPUTFORMATTER(*args))
2205 __swig_destroy__ = _pcbnew.delete_FILE_OUTPUTFORMATTER
2206
2207# Register FILE_OUTPUTFORMATTER in _pcbnew:
2208_pcbnew.FILE_OUTPUTFORMATTER_swigregister(FILE_OUTPUTFORMATTER)
2209
2211 r"""Proxy of C++ STREAM_OUTPUTFORMATTER class."""
2212
2213 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2214 __repr__ = _swig_repr
2215
2216 def __init__(self, *args):
2217 r"""__init__(STREAM_OUTPUTFORMATTER self, wxOutputStream & aStream, char aQuoteChar='\"') -> STREAM_OUTPUTFORMATTER"""
2218 _pcbnew.STREAM_OUTPUTFORMATTER_swiginit(self, _pcbnew.new_STREAM_OUTPUTFORMATTER(*args))
2219 __swig_destroy__ = _pcbnew.delete_STREAM_OUTPUTFORMATTER
2220
2221# Register STREAM_OUTPUTFORMATTER in _pcbnew:
2222_pcbnew.STREAM_OUTPUTFORMATTER_swigregister(STREAM_OUTPUTFORMATTER)
2223
2225 r"""Proxy of C++ TITLE_BLOCK class."""
2226
2227 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2228 __repr__ = _swig_repr
2229
2230 def __init__(self):
2231 r"""__init__(TITLE_BLOCK self) -> TITLE_BLOCK"""
2232 _pcbnew.TITLE_BLOCK_swiginit(self, _pcbnew.new_TITLE_BLOCK())
2233 __swig_destroy__ = _pcbnew.delete_TITLE_BLOCK
2234
2235 def SetTitle(self, aTitle):
2236 r"""SetTitle(TITLE_BLOCK self, wxString aTitle)"""
2237 return _pcbnew.TITLE_BLOCK_SetTitle(self, aTitle)
2238
2239 def GetTitle(self):
2240 r"""GetTitle(TITLE_BLOCK self) -> wxString"""
2241 return _pcbnew.TITLE_BLOCK_GetTitle(self)
2242
2243 def SetDate(self, aDate):
2244 r"""SetDate(TITLE_BLOCK self, wxString aDate)"""
2245 return _pcbnew.TITLE_BLOCK_SetDate(self, aDate)
2246
2247 def GetDate(self):
2248 r"""GetDate(TITLE_BLOCK self) -> wxString"""
2249 return _pcbnew.TITLE_BLOCK_GetDate(self)
2250
2251 def SetRevision(self, aRevision):
2252 r"""SetRevision(TITLE_BLOCK self, wxString aRevision)"""
2253 return _pcbnew.TITLE_BLOCK_SetRevision(self, aRevision)
2254
2255 def GetRevision(self):
2256 r"""GetRevision(TITLE_BLOCK self) -> wxString"""
2257 return _pcbnew.TITLE_BLOCK_GetRevision(self)
2258
2259 def SetCompany(self, aCompany):
2260 r"""SetCompany(TITLE_BLOCK self, wxString aCompany)"""
2261 return _pcbnew.TITLE_BLOCK_SetCompany(self, aCompany)
2262
2263 def GetCompany(self):
2264 r"""GetCompany(TITLE_BLOCK self) -> wxString"""
2265 return _pcbnew.TITLE_BLOCK_GetCompany(self)
2266
2267 def SetComment(self, aIdx, aComment):
2268 r"""SetComment(TITLE_BLOCK self, int aIdx, wxString aComment)"""
2269 return _pcbnew.TITLE_BLOCK_SetComment(self, aIdx, aComment)
2270
2271 def GetComment(self, aIdx):
2272 r"""GetComment(TITLE_BLOCK self, int aIdx) -> wxString"""
2273 return _pcbnew.TITLE_BLOCK_GetComment(self, aIdx)
2274
2275 def Clear(self):
2276 r"""Clear(TITLE_BLOCK self)"""
2277 return _pcbnew.TITLE_BLOCK_Clear(self)
2278
2279 @staticmethod
2281 r"""GetContextualTextVars(wxArrayString * aVars)"""
2282 return _pcbnew.TITLE_BLOCK_GetContextualTextVars(aVars)
2283
2284 def TextVarResolver(self, aToken, aProject):
2285 r"""TextVarResolver(TITLE_BLOCK self, wxString aToken, PROJECT const * aProject) -> bool"""
2286 return _pcbnew.TITLE_BLOCK_TextVarResolver(self, aToken, aProject)
2287
2288 def Format(self, aFormatter, aNestLevel, aControlBits):
2289 r"""Format(TITLE_BLOCK self, OUTPUTFORMATTER aFormatter, int aNestLevel, int aControlBits)"""
2290 return _pcbnew.TITLE_BLOCK_Format(self, aFormatter, aNestLevel, aControlBits)
2291
2292# Register TITLE_BLOCK in _pcbnew:
2293_pcbnew.TITLE_BLOCK_swigregister(TITLE_BLOCK)
2294
2296 r"""TITLE_BLOCK_GetContextualTextVars(wxArrayString * aVars)"""
2297 return _pcbnew.TITLE_BLOCK_GetContextualTextVars(aVars)
2298
2299UNSPECIFIED_COLOR = _pcbnew.UNSPECIFIED_COLOR
2300
2301BLACK = _pcbnew.BLACK
2302
2303DARKDARKGRAY = _pcbnew.DARKDARKGRAY
2304
2305DARKGRAY = _pcbnew.DARKGRAY
2306
2307LIGHTGRAY = _pcbnew.LIGHTGRAY
2308
2309WHITE = _pcbnew.WHITE
2310
2311LIGHTYELLOW = _pcbnew.LIGHTYELLOW
2312
2313DARKBLUE = _pcbnew.DARKBLUE
2314
2315DARKGREEN = _pcbnew.DARKGREEN
2316
2317DARKCYAN = _pcbnew.DARKCYAN
2318
2319DARKRED = _pcbnew.DARKRED
2320
2321DARKMAGENTA = _pcbnew.DARKMAGENTA
2322
2323DARKBROWN = _pcbnew.DARKBROWN
2324
2325BLUE = _pcbnew.BLUE
2326
2327GREEN = _pcbnew.GREEN
2328
2329CYAN = _pcbnew.CYAN
2330
2331RED = _pcbnew.RED
2332
2333MAGENTA = _pcbnew.MAGENTA
2334
2335BROWN = _pcbnew.BROWN
2336
2337LIGHTBLUE = _pcbnew.LIGHTBLUE
2338
2339LIGHTGREEN = _pcbnew.LIGHTGREEN
2340
2341LIGHTCYAN = _pcbnew.LIGHTCYAN
2342
2343LIGHTRED = _pcbnew.LIGHTRED
2344
2345LIGHTMAGENTA = _pcbnew.LIGHTMAGENTA
2346
2347YELLOW = _pcbnew.YELLOW
2348
2349PUREBLUE = _pcbnew.PUREBLUE
2350
2351PUREGREEN = _pcbnew.PUREGREEN
2352
2353PURECYAN = _pcbnew.PURECYAN
2354
2355PURERED = _pcbnew.PURERED
2356
2357PUREMAGENTA = _pcbnew.PUREMAGENTA
2358
2359PUREYELLOW = _pcbnew.PUREYELLOW
2360
2361LIGHTERORANGE = _pcbnew.LIGHTERORANGE
2362
2363DARKORANGE = _pcbnew.DARKORANGE
2364
2365ORANGE = _pcbnew.ORANGE
2366
2367LIGHTORANGE = _pcbnew.LIGHTORANGE
2368
2369PUREORANGE = _pcbnew.PUREORANGE
2370
2371NBCOLORS = _pcbnew.NBCOLORS
2372
2373HIGHLIGHT_FLAG = _pcbnew.HIGHLIGHT_FLAG
2374
2375MASKCOLOR = _pcbnew.MASKCOLOR
2376
2378 r"""Proxy of C++ StructColors class."""
2379
2380 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2381 __repr__ = _swig_repr
2382 m_Blue = property(_pcbnew.StructColors_m_Blue_get, _pcbnew.StructColors_m_Blue_set, doc=r"""m_Blue : unsigned char""")
2383 m_Green = property(_pcbnew.StructColors_m_Green_get, _pcbnew.StructColors_m_Green_set, doc=r"""m_Green : unsigned char""")
2384 m_Red = property(_pcbnew.StructColors_m_Red_get, _pcbnew.StructColors_m_Red_set, doc=r"""m_Red : unsigned char""")
2385 m_Numcolor = property(_pcbnew.StructColors_m_Numcolor_get, _pcbnew.StructColors_m_Numcolor_set, doc=r"""m_Numcolor : EDA_COLOR_T""")
2386 m_ColorName = property(_pcbnew.StructColors_m_ColorName_get, _pcbnew.StructColors_m_ColorName_set, doc=r"""m_ColorName : std::string""")
2387 m_LightColor = property(_pcbnew.StructColors_m_LightColor_get, _pcbnew.StructColors_m_LightColor_set, doc=r"""m_LightColor : EDA_COLOR_T""")
2388
2389 def __init__(self):
2390 r"""__init__(StructColors self) -> StructColors"""
2391 _pcbnew.StructColors_swiginit(self, _pcbnew.new_StructColors())
2392 __swig_destroy__ = _pcbnew.delete_StructColors
2393
2394# Register StructColors in _pcbnew:
2395_pcbnew.StructColors_swigregister(StructColors)
2396
2397
2399 r"""colorRefs() -> StructColors"""
2400 return _pcbnew.colorRefs()
2402 r"""Proxy of C++ KIGFX::COLOR4D class."""
2403
2404 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2405 __repr__ = _swig_repr
2406
2407 def FromCSSRGBA(self, aRed, aGreen, aBlue, aAlpha=1.0):
2408 r"""FromCSSRGBA(COLOR4D self, int aRed, int aGreen, int aBlue, double aAlpha=1.0) -> COLOR4D"""
2409 return _pcbnew.COLOR4D_FromCSSRGBA(self, aRed, aGreen, aBlue, aAlpha)
2410
2411 def __init__(self, *args):
2412 r"""
2413 __init__(COLOR4D self) -> COLOR4D
2414 __init__(COLOR4D self, double aRed, double aGreen, double aBlue, double aAlpha) -> COLOR4D
2415 __init__(COLOR4D self, EDA_COLOR_T aColor) -> COLOR4D
2416 __init__(COLOR4D self, wxString aColorStr) -> COLOR4D
2417 __init__(COLOR4D self, wxColour const & aColor) -> COLOR4D
2418 """
2419 _pcbnew.COLOR4D_swiginit(self, _pcbnew.new_COLOR4D(*args))
2420
2421 def SetFromWxString(self, aColorString):
2422 r"""SetFromWxString(COLOR4D self, wxString aColorString) -> bool"""
2423 return _pcbnew.COLOR4D_SetFromWxString(self, aColorString)
2424
2425 def ToCSSString(self):
2426 r"""ToCSSString(COLOR4D self) -> wxString"""
2427 return _pcbnew.COLOR4D_ToCSSString(self)
2428
2429 def SetFromHexString(self, aColorString):
2430 r"""SetFromHexString(COLOR4D self, wxString aColorString) -> bool"""
2431 return _pcbnew.COLOR4D_SetFromHexString(self, aColorString)
2432
2433 def ToHexString(self):
2434 r"""ToHexString(COLOR4D self) -> wxString"""
2435 return _pcbnew.COLOR4D_ToHexString(self)
2436
2437 def ToColour(self):
2438 r"""ToColour(COLOR4D self) -> wxColour"""
2439 return _pcbnew.COLOR4D_ToColour(self)
2440
2441 def LegacyMix(self, aColor):
2442 r"""LegacyMix(COLOR4D self, COLOR4D aColor) -> COLOR4D"""
2443 return _pcbnew.COLOR4D_LegacyMix(self, aColor)
2444
2445 def ToU32(self):
2446 r"""ToU32(COLOR4D self) -> unsigned int"""
2447 return _pcbnew.COLOR4D_ToU32(self)
2448
2449 def FromU32(self, aPackedColor):
2450 r"""FromU32(COLOR4D self, unsigned int aPackedColor)"""
2451 return _pcbnew.COLOR4D_FromU32(self, aPackedColor)
2452
2453 def ToHSL(self, aOutHue, aOutSaturation, aOutValue):
2454 r"""ToHSL(COLOR4D self, double & aOutHue, double & aOutSaturation, double & aOutValue)"""
2455 return _pcbnew.COLOR4D_ToHSL(self, aOutHue, aOutSaturation, aOutValue)
2456
2457 def FromHSL(self, aInHue, aInSaturation, aInLightness):
2458 r"""FromHSL(COLOR4D self, double aInHue, double aInSaturation, double aInLightness)"""
2459 return _pcbnew.COLOR4D_FromHSL(self, aInHue, aInSaturation, aInLightness)
2460
2461 def Brighten(self, aFactor):
2462 r"""Brighten(COLOR4D self, double aFactor) -> COLOR4D"""
2463 return _pcbnew.COLOR4D_Brighten(self, aFactor)
2464
2465 def Darken(self, aFactor):
2466 r"""Darken(COLOR4D self, double aFactor) -> COLOR4D"""
2467 return _pcbnew.COLOR4D_Darken(self, aFactor)
2468
2469 def Invert(self):
2470 r"""Invert(COLOR4D self) -> COLOR4D"""
2471 return _pcbnew.COLOR4D_Invert(self)
2472
2473 def Saturate(self, aFactor):
2474 r"""Saturate(COLOR4D self, double aFactor) -> COLOR4D"""
2475 return _pcbnew.COLOR4D_Saturate(self, aFactor)
2476
2477 def Desaturate(self):
2478 r"""Desaturate(COLOR4D self) -> COLOR4D"""
2479 return _pcbnew.COLOR4D_Desaturate(self)
2480
2481 def Brightened(self, aFactor):
2482 r"""Brightened(COLOR4D self, double aFactor) -> COLOR4D"""
2483 return _pcbnew.COLOR4D_Brightened(self, aFactor)
2484
2485 def Darkened(self, aFactor):
2486 r"""Darkened(COLOR4D self, double aFactor) -> COLOR4D"""
2487 return _pcbnew.COLOR4D_Darkened(self, aFactor)
2488
2489 def Mix(self, aColor, aFactor):
2490 r"""Mix(COLOR4D self, COLOR4D aColor, double aFactor) -> COLOR4D"""
2491 return _pcbnew.COLOR4D_Mix(self, aColor, aFactor)
2492
2493 def WithAlpha(self, aAlpha):
2494 r"""WithAlpha(COLOR4D self, double aAlpha) -> COLOR4D"""
2495 return _pcbnew.COLOR4D_WithAlpha(self, aAlpha)
2496
2497 def Inverted(self):
2498 r"""Inverted(COLOR4D self) -> COLOR4D"""
2499 return _pcbnew.COLOR4D_Inverted(self)
2500
2501 def GetBrightness(self):
2502 r"""GetBrightness(COLOR4D self) -> double"""
2503 return _pcbnew.COLOR4D_GetBrightness(self)
2504
2505 def ToHSV(self, aOutHue, aOutSaturation, aOutValue, aAlwaysDefineHue=False):
2506 r"""ToHSV(COLOR4D self, double & aOutHue, double & aOutSaturation, double & aOutValue, bool aAlwaysDefineHue=False)"""
2507 return _pcbnew.COLOR4D_ToHSV(self, aOutHue, aOutSaturation, aOutValue, aAlwaysDefineHue)
2508
2509 def FromHSV(self, aInH, aInS, aInV):
2510 r"""FromHSV(COLOR4D self, double aInH, double aInS, double aInV)"""
2511 return _pcbnew.COLOR4D_FromHSV(self, aInH, aInS, aInV)
2512
2513 def Distance(self, other):
2514 r"""Distance(COLOR4D self, COLOR4D other) -> double"""
2515 return _pcbnew.COLOR4D_Distance(self, other)
2516
2517 @staticmethod
2518 def FindNearestLegacyColor(aR, aG, aB):
2519 r"""FindNearestLegacyColor(int aR, int aG, int aB) -> EDA_COLOR_T"""
2520 return _pcbnew.COLOR4D_FindNearestLegacyColor(aR, aG, aB)
2521 r = property(_pcbnew.COLOR4D_r_get, _pcbnew.COLOR4D_r_set, doc=r"""r : double""")
2522 g = property(_pcbnew.COLOR4D_g_get, _pcbnew.COLOR4D_g_set, doc=r"""g : double""")
2523 b = property(_pcbnew.COLOR4D_b_get, _pcbnew.COLOR4D_b_set, doc=r"""b : double""")
2524 a = property(_pcbnew.COLOR4D_a_get, _pcbnew.COLOR4D_a_set, doc=r"""a : double""")
2525 __swig_destroy__ = _pcbnew.delete_COLOR4D
2526
2527# Register COLOR4D in _pcbnew:
2528_pcbnew.COLOR4D_swigregister(COLOR4D)
2529
2531 r"""COLOR4D_FindNearestLegacyColor(int aR, int aG, int aB) -> EDA_COLOR_T"""
2532 return _pcbnew.COLOR4D_FindNearestLegacyColor(aR, aG, aB)
2533COLOR4D.UNSPECIFIED = _pcbnew.cvar.COLOR4D_UNSPECIFIED
2534COLOR4D.WHITE = _pcbnew.cvar.COLOR4D_WHITE
2535COLOR4D.BLACK = _pcbnew.cvar.COLOR4D_BLACK
2536COLOR4D.CLEAR = _pcbnew.cvar.COLOR4D_CLEAR
2537
2538
2539def __eq__(lhs, rhs):
2540 r"""__eq__(COLOR4D lhs, COLOR4D rhs) -> bool const"""
2541 return _pcbnew.__eq__(lhs, rhs)
2542
2543def __ne__(lhs, rhs):
2544 r"""__ne__(COLOR4D lhs, COLOR4D rhs) -> bool const"""
2545 return _pcbnew.__ne__(lhs, rhs)
2546
2547def __lt__(lhs, rhs):
2548 r"""__lt__(COLOR4D lhs, COLOR4D rhs) -> bool const"""
2549 return _pcbnew.__lt__(lhs, rhs)
2550
2551def __lshift__(aStream, aColor):
2552 r"""__lshift__(std::ostream & aStream, COLOR4D aColor) -> std::ostream &"""
2553 return _pcbnew.__lshift__(aStream, aColor)
2555 r"""Proxy of C++ MARKER_BASE class."""
2556
2557 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2558
2559 def __init__(self, *args, **kwargs):
2560 raise AttributeError("No constructor defined - class is abstract")
2561 __repr__ = _swig_repr
2562 MARKER_UNSPEC = _pcbnew.MARKER_BASE_MARKER_UNSPEC
2563
2564 MARKER_ERC = _pcbnew.MARKER_BASE_MARKER_ERC
2565
2566 MARKER_DRC = _pcbnew.MARKER_BASE_MARKER_DRC
2567
2568 MARKER_DRAWING_SHEET = _pcbnew.MARKER_BASE_MARKER_DRAWING_SHEET
2569
2570 MARKER_RATSNEST = _pcbnew.MARKER_BASE_MARKER_RATSNEST
2571
2572 MARKER_PARITY = _pcbnew.MARKER_BASE_MARKER_PARITY
2573
2574 MARKER_SIMUL = _pcbnew.MARKER_BASE_MARKER_SIMUL
2575
2576 __swig_destroy__ = _pcbnew.delete_MARKER_BASE
2577
2578 def MarkerScale(self):
2579 r"""MarkerScale(MARKER_BASE self) -> int"""
2580 return _pcbnew.MARKER_BASE_MarkerScale(self)
2581
2582 def SetMarkerScale(self, aScale):
2583 r"""SetMarkerScale(MARKER_BASE self, int aScale)"""
2584 return _pcbnew.MARKER_BASE_SetMarkerScale(self, aScale)
2585
2586 def ShapeToPolygon(self, aPolygon, aScale=-1):
2587 r"""ShapeToPolygon(MARKER_BASE self, SHAPE_LINE_CHAIN aPolygon, int aScale=-1)"""
2588 return _pcbnew.MARKER_BASE_ShapeToPolygon(self, aPolygon, aScale)
2589
2590 def PrintMarker(self, aSettings, aOffset):
2591 r"""PrintMarker(MARKER_BASE self, RENDER_SETTINGS const * aSettings, VECTOR2I aOffset)"""
2592 return _pcbnew.MARKER_BASE_PrintMarker(self, aSettings, aOffset)
2593
2594 def GetPos(self):
2595 r"""GetPos(MARKER_BASE self) -> VECTOR2I"""
2596 return _pcbnew.MARKER_BASE_GetPos(self)
2597
2598 def GetUUID(self):
2599 r"""GetUUID(MARKER_BASE self) -> KIID"""
2600 return _pcbnew.MARKER_BASE_GetUUID(self)
2601
2602 def SetMarkerType(self, aMarkerType):
2603 r"""SetMarkerType(MARKER_BASE self, enum MARKER_BASE::TYPEMARKER aMarkerType)"""
2604 return _pcbnew.MARKER_BASE_SetMarkerType(self, aMarkerType)
2605
2606 def GetMarkerType(self):
2607 r"""GetMarkerType(MARKER_BASE self) -> enum MARKER_BASE::TYPEMARKER"""
2608 return _pcbnew.MARKER_BASE_GetMarkerType(self)
2609
2610 def IsExcluded(self):
2611 r"""IsExcluded(MARKER_BASE self) -> bool"""
2612 return _pcbnew.MARKER_BASE_IsExcluded(self)
2613
2614 def SetExcluded(self, aExcluded):
2615 r"""SetExcluded(MARKER_BASE self, bool aExcluded)"""
2616 return _pcbnew.MARKER_BASE_SetExcluded(self, aExcluded)
2617
2618 def GetSeverity(self):
2619 r"""GetSeverity(MARKER_BASE self) -> SEVERITY"""
2620 return _pcbnew.MARKER_BASE_GetSeverity(self)
2621
2622 def GetRCItem(self):
2623 r"""GetRCItem(MARKER_BASE self) -> std::shared_ptr< RC_ITEM >"""
2624 return _pcbnew.MARKER_BASE_GetRCItem(self)
2625
2626 def HitTestMarker(self, aHitPosition, aAccuracy):
2627 r"""HitTestMarker(MARKER_BASE self, VECTOR2I aHitPosition, int aAccuracy) -> bool"""
2628 return _pcbnew.MARKER_BASE_HitTestMarker(self, aHitPosition, aAccuracy)
2629
2631 r"""GetBoundingBoxMarker(MARKER_BASE self) -> BOX2I"""
2632 return _pcbnew.MARKER_BASE_GetBoundingBoxMarker(self)
2633 m_Pos = property(_pcbnew.MARKER_BASE_m_Pos_get, _pcbnew.MARKER_BASE_m_Pos_set, doc=r"""m_Pos : VECTOR2I""")
2634
2635# Register MARKER_BASE in _pcbnew:
2636_pcbnew.MARKER_BASE_swigregister(MARKER_BASE)
2637
2638CTL_OMIT_HIDE = _pcbnew.CTL_OMIT_HIDE
2639
2640DEFAULT_SIZE_TEXT = _pcbnew.DEFAULT_SIZE_TEXT
2641
2642DIM_ANCRE_TEXTE = _pcbnew.DIM_ANCRE_TEXTE
2643
2645 r"""Proxy of C++ EDA_TEXT class."""
2646
2647 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2648 __repr__ = _swig_repr
2649
2650 def __init__(self, *args):
2651 r"""
2652 __init__(EDA_TEXT self, EDA_IU_SCALE aIuScale, wxString aText=wxEmptyString) -> EDA_TEXT
2653 __init__(EDA_TEXT self, EDA_TEXT aText) -> EDA_TEXT
2654 """
2655 _pcbnew.EDA_TEXT_swiginit(self, _pcbnew.new_EDA_TEXT(*args))
2656 __swig_destroy__ = _pcbnew.delete_EDA_TEXT
2657
2658 def GetText(self):
2659 r"""GetText(EDA_TEXT self) -> wxString"""
2660 return _pcbnew.EDA_TEXT_GetText(self)
2661
2662 def GetShownText(self, aAllowExtraText, aDepth=0):
2663 r"""GetShownText(EDA_TEXT self, bool aAllowExtraText, int aDepth=0) -> wxString"""
2664 return _pcbnew.EDA_TEXT_GetShownText(self, aAllowExtraText, aDepth)
2665
2666 def HasTextVars(self):
2667 r"""HasTextVars(EDA_TEXT self) -> bool"""
2668 return _pcbnew.EDA_TEXT_HasTextVars(self)
2669
2670 def SetText(self, aText):
2671 r"""SetText(EDA_TEXT self, wxString aText)"""
2672 return _pcbnew.EDA_TEXT_SetText(self, aText)
2673
2674 def SetTextThickness(self, aWidth):
2675 r"""SetTextThickness(EDA_TEXT self, int aWidth)"""
2676 return _pcbnew.EDA_TEXT_SetTextThickness(self, aWidth)
2677
2679 r"""GetTextThickness(EDA_TEXT self) -> int"""
2680 return _pcbnew.EDA_TEXT_GetTextThickness(self)
2681
2682 def GetEffectiveTextPenWidth(self, aDefaultPenWidth=0):
2683 r"""GetEffectiveTextPenWidth(EDA_TEXT self, int aDefaultPenWidth=0) -> int"""
2684 return _pcbnew.EDA_TEXT_GetEffectiveTextPenWidth(self, aDefaultPenWidth)
2685
2686 def SetTextAngle(self, aAngle):
2687 r"""SetTextAngle(EDA_TEXT self, EDA_ANGLE aAngle)"""
2688 return _pcbnew.EDA_TEXT_SetTextAngle(self, aAngle)
2689
2690 def GetTextAngle(self):
2691 r"""GetTextAngle(EDA_TEXT self) -> EDA_ANGLE"""
2692 return _pcbnew.EDA_TEXT_GetTextAngle(self)
2693
2694 def SetTextAngleDegrees(self, aOrientation):
2695 r"""SetTextAngleDegrees(EDA_TEXT self, double aOrientation)"""
2696 return _pcbnew.EDA_TEXT_SetTextAngleDegrees(self, aOrientation)
2697
2699 r"""GetTextAngleDegrees(EDA_TEXT self) -> double"""
2700 return _pcbnew.EDA_TEXT_GetTextAngleDegrees(self)
2701
2702 def SetItalic(self, aItalic):
2703 r"""SetItalic(EDA_TEXT self, bool aItalic)"""
2704 return _pcbnew.EDA_TEXT_SetItalic(self, aItalic)
2705
2706 def IsItalic(self):
2707 r"""IsItalic(EDA_TEXT self) -> bool"""
2708 return _pcbnew.EDA_TEXT_IsItalic(self)
2709
2710 def SetBold(self, aBold):
2711 r"""SetBold(EDA_TEXT self, bool aBold)"""
2712 return _pcbnew.EDA_TEXT_SetBold(self, aBold)
2713
2714 def IsBold(self):
2715 r"""IsBold(EDA_TEXT self) -> bool"""
2716 return _pcbnew.EDA_TEXT_IsBold(self)
2717
2718 def SetVisible(self, aVisible):
2719 r"""SetVisible(EDA_TEXT self, bool aVisible)"""
2720 return _pcbnew.EDA_TEXT_SetVisible(self, aVisible)
2721
2722 def IsVisible(self):
2723 r"""IsVisible(EDA_TEXT self) -> bool"""
2724 return _pcbnew.EDA_TEXT_IsVisible(self)
2725
2726 def SetMirrored(self, isMirrored):
2727 r"""SetMirrored(EDA_TEXT self, bool isMirrored)"""
2728 return _pcbnew.EDA_TEXT_SetMirrored(self, isMirrored)
2729
2730 def IsMirrored(self):
2731 r"""IsMirrored(EDA_TEXT self) -> bool"""
2732 return _pcbnew.EDA_TEXT_IsMirrored(self)
2733
2734 def SetMultilineAllowed(self, aAllow):
2735 r"""SetMultilineAllowed(EDA_TEXT self, bool aAllow)"""
2736 return _pcbnew.EDA_TEXT_SetMultilineAllowed(self, aAllow)
2737
2739 r"""IsMultilineAllowed(EDA_TEXT self) -> bool"""
2740 return _pcbnew.EDA_TEXT_IsMultilineAllowed(self)
2741
2742 def SetHorizJustify(self, aType):
2743 r"""SetHorizJustify(EDA_TEXT self, GR_TEXT_H_ALIGN_T aType)"""
2744 return _pcbnew.EDA_TEXT_SetHorizJustify(self, aType)
2745
2747 r"""GetHorizJustify(EDA_TEXT self) -> GR_TEXT_H_ALIGN_T"""
2748 return _pcbnew.EDA_TEXT_GetHorizJustify(self)
2749
2750 def SetVertJustify(self, aType):
2751 r"""SetVertJustify(EDA_TEXT self, GR_TEXT_V_ALIGN_T aType)"""
2752 return _pcbnew.EDA_TEXT_SetVertJustify(self, aType)
2753
2755 r"""GetVertJustify(EDA_TEXT self) -> GR_TEXT_V_ALIGN_T"""
2756 return _pcbnew.EDA_TEXT_GetVertJustify(self)
2757
2758 def SetKeepUpright(self, aKeepUpright):
2759 r"""SetKeepUpright(EDA_TEXT self, bool aKeepUpright)"""
2760 return _pcbnew.EDA_TEXT_SetKeepUpright(self, aKeepUpright)
2761
2762 def IsKeepUpright(self):
2763 r"""IsKeepUpright(EDA_TEXT self) -> bool"""
2764 return _pcbnew.EDA_TEXT_IsKeepUpright(self)
2765
2766 def SwapAttributes(self, aTradingPartner):
2767 r"""SwapAttributes(EDA_TEXT self, EDA_TEXT aTradingPartner)"""
2768 return _pcbnew.EDA_TEXT_SwapAttributes(self, aTradingPartner)
2769
2770 def SwapText(self, aTradingPartner):
2771 r"""SwapText(EDA_TEXT self, EDA_TEXT aTradingPartner)"""
2772 return _pcbnew.EDA_TEXT_SwapText(self, aTradingPartner)
2773
2774 def CopyText(self, aSrc):
2775 r"""CopyText(EDA_TEXT self, EDA_TEXT aSrc)"""
2776 return _pcbnew.EDA_TEXT_CopyText(self, aSrc)
2777
2778 def SetAttributes(self, *args):
2779 r"""
2780 SetAttributes(EDA_TEXT self, EDA_TEXT aSrc)
2781 SetAttributes(EDA_TEXT self, TEXT_ATTRIBUTES aTextAttrs)
2782 """
2783 return _pcbnew.EDA_TEXT_SetAttributes(self, *args)
2784
2785 def GetAttributes(self):
2786 r"""GetAttributes(EDA_TEXT self) -> TEXT_ATTRIBUTES"""
2787 return _pcbnew.EDA_TEXT_GetAttributes(self)
2788
2789 def Replace(self, aSearchData):
2790 r"""Replace(EDA_TEXT self, EDA_SEARCH_DATA const & aSearchData) -> bool"""
2791 return _pcbnew.EDA_TEXT_Replace(self, aSearchData)
2792
2794 r"""IsDefaultFormatting(EDA_TEXT self) -> bool"""
2795 return _pcbnew.EDA_TEXT_IsDefaultFormatting(self)
2796
2797 def SetFont(self, aFont):
2798 r"""SetFont(EDA_TEXT self, KIFONT::FONT * aFont)"""
2799 return _pcbnew.EDA_TEXT_SetFont(self, aFont)
2800
2801 def GetFont(self):
2802 r"""GetFont(EDA_TEXT self) -> KIFONT::FONT *"""
2803 return _pcbnew.EDA_TEXT_GetFont(self)
2804
2805 def GetFontName(self):
2806 r"""GetFontName(EDA_TEXT self) -> wxString"""
2807 return _pcbnew.EDA_TEXT_GetFontName(self)
2808
2809 def SetLineSpacing(self, aLineSpacing):
2810 r"""SetLineSpacing(EDA_TEXT self, double aLineSpacing)"""
2811 return _pcbnew.EDA_TEXT_SetLineSpacing(self, aLineSpacing)
2812
2814 r"""GetLineSpacing(EDA_TEXT self) -> double"""
2815 return _pcbnew.EDA_TEXT_GetLineSpacing(self)
2816
2817 def SetTextSize(self, aNewSize):
2818 r"""SetTextSize(EDA_TEXT self, VECTOR2I aNewSize)"""
2819 return _pcbnew.EDA_TEXT_SetTextSize(self, aNewSize)
2820
2821 def GetTextSize(self):
2822 r"""GetTextSize(EDA_TEXT self) -> VECTOR2I"""
2823 return _pcbnew.EDA_TEXT_GetTextSize(self)
2824
2825 def SetTextWidth(self, aWidth):
2826 r"""SetTextWidth(EDA_TEXT self, int aWidth)"""
2827 return _pcbnew.EDA_TEXT_SetTextWidth(self, aWidth)
2828
2829 def GetTextWidth(self):
2830 r"""GetTextWidth(EDA_TEXT self) -> int"""
2831 return _pcbnew.EDA_TEXT_GetTextWidth(self)
2832
2833 def SetTextHeight(self, aHeight):
2834 r"""SetTextHeight(EDA_TEXT self, int aHeight)"""
2835 return _pcbnew.EDA_TEXT_SetTextHeight(self, aHeight)
2836
2837 def GetTextHeight(self):
2838 r"""GetTextHeight(EDA_TEXT self) -> int"""
2839 return _pcbnew.EDA_TEXT_GetTextHeight(self)
2840
2841 def SetTextColor(self, aColor):
2842 r"""SetTextColor(EDA_TEXT self, COLOR4D aColor)"""
2843 return _pcbnew.EDA_TEXT_SetTextColor(self, aColor)
2844
2845 def GetTextColor(self):
2846 r"""GetTextColor(EDA_TEXT self) -> COLOR4D"""
2847 return _pcbnew.EDA_TEXT_GetTextColor(self)
2848
2849 def SetTextPos(self, aPoint):
2850 r"""SetTextPos(EDA_TEXT self, VECTOR2I aPoint)"""
2851 return _pcbnew.EDA_TEXT_SetTextPos(self, aPoint)
2852
2853 def GetTextPos(self):
2854 r"""GetTextPos(EDA_TEXT self) -> VECTOR2I"""
2855 return _pcbnew.EDA_TEXT_GetTextPos(self)
2856
2857 def SetTextX(self, aX):
2858 r"""SetTextX(EDA_TEXT self, int aX)"""
2859 return _pcbnew.EDA_TEXT_SetTextX(self, aX)
2860
2861 def SetTextY(self, aY):
2862 r"""SetTextY(EDA_TEXT self, int aY)"""
2863 return _pcbnew.EDA_TEXT_SetTextY(self, aY)
2864
2865 def Offset(self, aOffset):
2866 r"""Offset(EDA_TEXT self, VECTOR2I aOffset)"""
2867 return _pcbnew.EDA_TEXT_Offset(self, aOffset)
2868
2869 def Empty(self):
2870 r"""Empty(EDA_TEXT self)"""
2871 return _pcbnew.EDA_TEXT_Empty(self)
2872
2873 @staticmethod
2874 def MapHorizJustify(aHorizJustify):
2875 r"""MapHorizJustify(int aHorizJustify) -> GR_TEXT_H_ALIGN_T"""
2876 return _pcbnew.EDA_TEXT_MapHorizJustify(aHorizJustify)
2877
2878 @staticmethod
2879 def MapVertJustify(aVertJustify):
2880 r"""MapVertJustify(int aVertJustify) -> GR_TEXT_V_ALIGN_T"""
2881 return _pcbnew.EDA_TEXT_MapVertJustify(aVertJustify)
2882
2883 def Print(self, aSettings, aOffset, aColor, aDisplay_mode=FILLED):
2884 r"""Print(EDA_TEXT self, RENDER_SETTINGS const * aSettings, VECTOR2I aOffset, COLOR4D aColor, OUTLINE_MODE aDisplay_mode=FILLED)"""
2885 return _pcbnew.EDA_TEXT_Print(self, aSettings, aOffset, aColor, aDisplay_mode)
2886
2888 r"""GetEffectiveTextShapeNative(EDA_TEXT self, bool aTriangulate=True, BOX2I aBBox=BOX2I(), EDA_ANGLE aAngle=ANGLE_0) -> std::shared_ptr< SHAPE_COMPOUND >"""
2889 return _pcbnew.EDA_TEXT_GetEffectiveTextShapeNative(self, *args)
2890
2891 def TextHitTest(self, *args):
2892 r"""
2893 TextHitTest(EDA_TEXT self, VECTOR2I aPoint, int aAccuracy=0) -> bool
2894 TextHitTest(EDA_TEXT self, BOX2I aRect, bool aContains, int aAccuracy=0) -> bool
2895 """
2896 return _pcbnew.EDA_TEXT_TextHitTest(self, *args)
2897
2898 def GetTextBox(self, aLine=-1, aInvertY=False):
2899 r"""GetTextBox(EDA_TEXT self, int aLine=-1, bool aInvertY=False) -> BOX2I"""
2900 return _pcbnew.EDA_TEXT_GetTextBox(self, aLine, aInvertY)
2901
2902 def GetInterline(self):
2903 r"""GetInterline(EDA_TEXT self) -> int"""
2904 return _pcbnew.EDA_TEXT_GetInterline(self)
2905
2907 r"""GetTextStyleName(EDA_TEXT self) -> wxString"""
2908 return _pcbnew.EDA_TEXT_GetTextStyleName(self)
2909
2910 def GetLinePositions(self, aPositions, aLineCount):
2911 r"""GetLinePositions(EDA_TEXT self, VECTOR_VECTOR2I aPositions, int aLineCount)"""
2912 return _pcbnew.EDA_TEXT_GetLinePositions(self, aPositions, aLineCount)
2913
2914 def Format(self, aFormatter, aNestLevel, aControlBits):
2915 r"""Format(EDA_TEXT self, OUTPUTFORMATTER aFormatter, int aNestLevel, int aControlBits)"""
2916 return _pcbnew.EDA_TEXT_Format(self, aFormatter, aNestLevel, aControlBits)
2917
2919 r"""GetDrawRotation(EDA_TEXT self) -> EDA_ANGLE"""
2920 return _pcbnew.EDA_TEXT_GetDrawRotation(self)
2921
2922 def GetDrawPos(self):
2923 r"""GetDrawPos(EDA_TEXT self) -> VECTOR2I"""
2924 return _pcbnew.EDA_TEXT_GetDrawPos(self)
2925
2927 r"""ClearRenderCache(EDA_TEXT self)"""
2928 return _pcbnew.EDA_TEXT_ClearRenderCache(self)
2929
2931 r"""ClearBoundingBoxCache(EDA_TEXT self)"""
2932 return _pcbnew.EDA_TEXT_ClearBoundingBoxCache(self)
2933
2934 def GetRenderCache(self, *args):
2935 r"""GetRenderCache(EDA_TEXT self, KIFONT::FONT const * aFont, wxString forResolvedText, VECTOR2I aOffset={ 0, 0 }) -> std::vector< std::unique_ptr< KIFONT::GLYPH >,std::allocator< std::unique_ptr< KIFONT::GLYPH > > >"""
2936 return _pcbnew.EDA_TEXT_GetRenderCache(self, *args)
2937
2938 def SetupRenderCache(self, aResolvedText, aAngle):
2939 r"""SetupRenderCache(EDA_TEXT self, wxString aResolvedText, EDA_ANGLE aAngle)"""
2940 return _pcbnew.EDA_TEXT_SetupRenderCache(self, aResolvedText, aAngle)
2941
2942 def AddRenderCacheGlyph(self, aPoly):
2943 r"""AddRenderCacheGlyph(EDA_TEXT self, SHAPE_POLY_SET aPoly)"""
2944 return _pcbnew.EDA_TEXT_AddRenderCacheGlyph(self, aPoly)
2945
2946 def Compare(self, aOther):
2947 r"""Compare(EDA_TEXT self, EDA_TEXT aOther) -> int"""
2948 return _pcbnew.EDA_TEXT_Compare(self, aOther)
2949
2950 def HasHyperlink(self):
2951 r"""HasHyperlink(EDA_TEXT self) -> bool"""
2952 return _pcbnew.EDA_TEXT_HasHyperlink(self)
2953
2954 def GetHyperlink(self):
2955 r"""GetHyperlink(EDA_TEXT self) -> wxString"""
2956 return _pcbnew.EDA_TEXT_GetHyperlink(self)
2957
2958 def SetHyperlink(self, aLink):
2959 r"""SetHyperlink(EDA_TEXT self, wxString aLink)"""
2960 return _pcbnew.EDA_TEXT_SetHyperlink(self, aLink)
2961
2963 r"""RemoveHyperlink(EDA_TEXT self)"""
2964 return _pcbnew.EDA_TEXT_RemoveHyperlink(self)
2965
2966 @staticmethod
2968 r"""ValidateHyperlink(wxString aURL) -> bool"""
2969 return _pcbnew.EDA_TEXT_ValidateHyperlink(aURL)
2970
2971 @staticmethod
2972 def IsGotoPageHref(aHref, aDestination=None):
2973 r"""IsGotoPageHref(wxString aHref, wxString aDestination=None) -> bool"""
2974 return _pcbnew.EDA_TEXT_IsGotoPageHref(aHref, aDestination)
2975
2976 @staticmethod
2977 def GotoPageHref(aDestination):
2978 r"""GotoPageHref(wxString aDestination) -> wxString"""
2979 return _pcbnew.EDA_TEXT_GotoPageHref(aDestination)
2980
2981
2982 # KiCad 7.0 API Compatibility
2983 def GetEffectiveTextShape(self, aTriangulate=True, aUseTextRotation=True):
2984 return self.GetEffectiveTextShapeNative(aTriangulate)
2985
2986
2987
2988 # KiCad 6 API compatibility
2989 def GetShownText(self):
2990 r"""GetShownText(EDA_TEXT self) -> wxString"""
2991 return _pcbnew.EDA_TEXT_GetShownText(self, True, 0)
2992
2993
2994# Register EDA_TEXT in _pcbnew:
2995_pcbnew.EDA_TEXT_swigregister(EDA_TEXT)
2996
2997def EDA_TEXT_MapHorizJustify(aHorizJustify):
2998 r"""EDA_TEXT_MapHorizJustify(int aHorizJustify) -> GR_TEXT_H_ALIGN_T"""
2999 return _pcbnew.EDA_TEXT_MapHorizJustify(aHorizJustify)
3000
3001def EDA_TEXT_MapVertJustify(aVertJustify):
3002 r"""EDA_TEXT_MapVertJustify(int aVertJustify) -> GR_TEXT_V_ALIGN_T"""
3003 return _pcbnew.EDA_TEXT_MapVertJustify(aVertJustify)
3004
3006 r"""EDA_TEXT_ValidateHyperlink(wxString aURL) -> bool"""
3007 return _pcbnew.EDA_TEXT_ValidateHyperlink(aURL)
3008
3009def EDA_TEXT_IsGotoPageHref(aHref, aDestination=None):
3010 r"""EDA_TEXT_IsGotoPageHref(wxString aHref, wxString aDestination=None) -> bool"""
3011 return _pcbnew.EDA_TEXT_IsGotoPageHref(aHref, aDestination)
3012
3013def EDA_TEXT_GotoPageHref(aDestination):
3014 r"""EDA_TEXT_GotoPageHref(wxString aDestination) -> wxString"""
3015 return _pcbnew.EDA_TEXT_GotoPageHref(aDestination)
3016
3017
3019 r"""GetBuildVersion() -> wxString"""
3020 return _pcbnew.GetBuildVersion()
3021
3023 r"""GetPlatformGetBitnessName() -> wxString"""
3024 return _pcbnew.GetPlatformGetBitnessName()
3025
3027 r"""GetSemanticVersion() -> wxString"""
3028 return _pcbnew.GetSemanticVersion()
3029
3031 r"""GetMajorMinorVersion() -> wxString"""
3032 return _pcbnew.GetMajorMinorVersion()
3033
3035 r"""GetMajorMinorPatchVersion() -> wxString"""
3036 return _pcbnew.GetMajorMinorPatchVersion()
3037
3039 r"""GetBuildDate() -> wxString"""
3040 return _pcbnew.GetBuildDate()
3041
3043 r"""GetCommitHash() -> wxString"""
3044 return _pcbnew.GetCommitHash()
3045
3047 r"""GetMajorMinorPatchTuple() -> std::tuple< int,int,int > const &"""
3048 return _pcbnew.GetMajorMinorPatchTuple()
3049
3051 r"""IsNightlyVersion() -> bool"""
3052 return _pcbnew.IsNightlyVersion()
3053
3054def GetVersionInfoData(aTitle, aHtml=False, aBrief=False):
3055 r"""GetVersionInfoData(wxString aTitle, bool aHtml=False, bool aBrief=False) -> wxString"""
3056 return _pcbnew.GetVersionInfoData(aTitle, aHtml, aBrief)
3057UNDEFINED_LAYER = _pcbnew.UNDEFINED_LAYER
3058
3059UNSELECTED_LAYER = _pcbnew.UNSELECTED_LAYER
3060
3061PCBNEW_LAYER_ID_START = _pcbnew.PCBNEW_LAYER_ID_START
3062
3063F_Cu = _pcbnew.F_Cu
3064
3065In1_Cu = _pcbnew.In1_Cu
3066
3067In2_Cu = _pcbnew.In2_Cu
3068
3069In3_Cu = _pcbnew.In3_Cu
3070
3071In4_Cu = _pcbnew.In4_Cu
3072
3073In5_Cu = _pcbnew.In5_Cu
3074
3075In6_Cu = _pcbnew.In6_Cu
3076
3077In7_Cu = _pcbnew.In7_Cu
3078
3079In8_Cu = _pcbnew.In8_Cu
3080
3081In9_Cu = _pcbnew.In9_Cu
3082
3083In10_Cu = _pcbnew.In10_Cu
3084
3085In11_Cu = _pcbnew.In11_Cu
3086
3087In12_Cu = _pcbnew.In12_Cu
3088
3089In13_Cu = _pcbnew.In13_Cu
3090
3091In14_Cu = _pcbnew.In14_Cu
3092
3093In15_Cu = _pcbnew.In15_Cu
3094
3095In16_Cu = _pcbnew.In16_Cu
3096
3097In17_Cu = _pcbnew.In17_Cu
3098
3099In18_Cu = _pcbnew.In18_Cu
3100
3101In19_Cu = _pcbnew.In19_Cu
3102
3103In20_Cu = _pcbnew.In20_Cu
3104
3105In21_Cu = _pcbnew.In21_Cu
3106
3107In22_Cu = _pcbnew.In22_Cu
3108
3109In23_Cu = _pcbnew.In23_Cu
3110
3111In24_Cu = _pcbnew.In24_Cu
3112
3113In25_Cu = _pcbnew.In25_Cu
3114
3115In26_Cu = _pcbnew.In26_Cu
3116
3117In27_Cu = _pcbnew.In27_Cu
3118
3119In28_Cu = _pcbnew.In28_Cu
3120
3121In29_Cu = _pcbnew.In29_Cu
3122
3123In30_Cu = _pcbnew.In30_Cu
3124
3125B_Cu = _pcbnew.B_Cu
3126
3127B_Adhes = _pcbnew.B_Adhes
3128
3129F_Adhes = _pcbnew.F_Adhes
3130
3131B_Paste = _pcbnew.B_Paste
3132
3133F_Paste = _pcbnew.F_Paste
3134
3135B_SilkS = _pcbnew.B_SilkS
3136
3137F_SilkS = _pcbnew.F_SilkS
3138
3139B_Mask = _pcbnew.B_Mask
3140
3141F_Mask = _pcbnew.F_Mask
3142
3143Dwgs_User = _pcbnew.Dwgs_User
3144
3145Cmts_User = _pcbnew.Cmts_User
3146
3147Eco1_User = _pcbnew.Eco1_User
3148
3149Eco2_User = _pcbnew.Eco2_User
3150
3151Edge_Cuts = _pcbnew.Edge_Cuts
3152
3153Margin = _pcbnew.Margin
3154
3155B_CrtYd = _pcbnew.B_CrtYd
3156
3157F_CrtYd = _pcbnew.F_CrtYd
3158
3159B_Fab = _pcbnew.B_Fab
3160
3161F_Fab = _pcbnew.F_Fab
3162
3163User_1 = _pcbnew.User_1
3164
3165User_2 = _pcbnew.User_2
3166
3167User_3 = _pcbnew.User_3
3168
3169User_4 = _pcbnew.User_4
3170
3171User_5 = _pcbnew.User_5
3172
3173User_6 = _pcbnew.User_6
3174
3175User_7 = _pcbnew.User_7
3176
3177User_8 = _pcbnew.User_8
3178
3179User_9 = _pcbnew.User_9
3180
3181Rescue = _pcbnew.Rescue
3182
3183PCB_LAYER_ID_COUNT = _pcbnew.PCB_LAYER_ID_COUNT
3184
3185FLASHING_DEFAULT = _pcbnew.FLASHING_DEFAULT
3186
3187FLASHING_ALWAYS_FLASHED = _pcbnew.FLASHING_ALWAYS_FLASHED
3188
3189FLASHING_NEVER_FLASHED = _pcbnew.FLASHING_NEVER_FLASHED
3190
3191NETNAMES_LAYER_ID_START = _pcbnew.NETNAMES_LAYER_ID_START
3192
3193NETNAMES_LAYER_ID_RESERVED = _pcbnew.NETNAMES_LAYER_ID_RESERVED
3194
3195LAYER_PAD_FR_NETNAMES = _pcbnew.LAYER_PAD_FR_NETNAMES
3196
3197LAYER_PAD_BK_NETNAMES = _pcbnew.LAYER_PAD_BK_NETNAMES
3198
3199LAYER_PAD_NETNAMES = _pcbnew.LAYER_PAD_NETNAMES
3200
3201LAYER_VIA_NETNAMES = _pcbnew.LAYER_VIA_NETNAMES
3202
3203NETNAMES_LAYER_ID_END = _pcbnew.NETNAMES_LAYER_ID_END
3204
3205GAL_LAYER_ID_START = _pcbnew.GAL_LAYER_ID_START
3206
3207LAYER_VIAS = _pcbnew.LAYER_VIAS
3208
3209LAYER_VIA_MICROVIA = _pcbnew.LAYER_VIA_MICROVIA
3210
3211LAYER_VIA_BBLIND = _pcbnew.LAYER_VIA_BBLIND
3212
3213LAYER_VIA_THROUGH = _pcbnew.LAYER_VIA_THROUGH
3214
3215LAYER_NON_PLATEDHOLES = _pcbnew.LAYER_NON_PLATEDHOLES
3216
3217LAYER_MOD_TEXT = _pcbnew.LAYER_MOD_TEXT
3218
3219LAYER_MOD_TEXT_INVISIBLE = _pcbnew.LAYER_MOD_TEXT_INVISIBLE
3220
3221LAYER_ANCHOR = _pcbnew.LAYER_ANCHOR
3222
3223LAYER_PAD_FR = _pcbnew.LAYER_PAD_FR
3224
3225LAYER_PAD_BK = _pcbnew.LAYER_PAD_BK
3226
3227LAYER_RATSNEST = _pcbnew.LAYER_RATSNEST
3228
3229LAYER_GRID = _pcbnew.LAYER_GRID
3230
3231LAYER_GRID_AXES = _pcbnew.LAYER_GRID_AXES
3232
3233LAYER_MOD_FR = _pcbnew.LAYER_MOD_FR
3234
3235LAYER_MOD_BK = _pcbnew.LAYER_MOD_BK
3236
3237LAYER_MOD_VALUES = _pcbnew.LAYER_MOD_VALUES
3238
3239LAYER_MOD_REFERENCES = _pcbnew.LAYER_MOD_REFERENCES
3240
3241LAYER_TRACKS = _pcbnew.LAYER_TRACKS
3242
3243LAYER_PADS_TH = _pcbnew.LAYER_PADS_TH
3244
3245LAYER_PAD_PLATEDHOLES = _pcbnew.LAYER_PAD_PLATEDHOLES
3246
3247LAYER_VIA_HOLES = _pcbnew.LAYER_VIA_HOLES
3248
3249LAYER_DRC_ERROR = _pcbnew.LAYER_DRC_ERROR
3250
3251LAYER_DRAWINGSHEET = _pcbnew.LAYER_DRAWINGSHEET
3252
3253LAYER_GP_OVERLAY = _pcbnew.LAYER_GP_OVERLAY
3254
3255LAYER_SELECT_OVERLAY = _pcbnew.LAYER_SELECT_OVERLAY
3256
3257LAYER_PCB_BACKGROUND = _pcbnew.LAYER_PCB_BACKGROUND
3258
3259LAYER_CURSOR = _pcbnew.LAYER_CURSOR
3260
3261LAYER_AUX_ITEMS = _pcbnew.LAYER_AUX_ITEMS
3262
3263LAYER_DRAW_BITMAPS = _pcbnew.LAYER_DRAW_BITMAPS
3264
3265GAL_LAYER_ID_BITMASK_END = _pcbnew.GAL_LAYER_ID_BITMASK_END
3266
3267LAYER_PADS = _pcbnew.LAYER_PADS
3268
3269LAYER_ZONES = _pcbnew.LAYER_ZONES
3270
3271LAYER_PAD_HOLEWALLS = _pcbnew.LAYER_PAD_HOLEWALLS
3272
3273LAYER_VIA_HOLEWALLS = _pcbnew.LAYER_VIA_HOLEWALLS
3274
3275LAYER_DRC_WARNING = _pcbnew.LAYER_DRC_WARNING
3276
3277LAYER_DRC_EXCLUSION = _pcbnew.LAYER_DRC_EXCLUSION
3278
3279LAYER_MARKER_SHADOWS = _pcbnew.LAYER_MARKER_SHADOWS
3280
3281LAYER_LOCKED_ITEM_SHADOW = _pcbnew.LAYER_LOCKED_ITEM_SHADOW
3282
3283LAYER_CONFLICTS_SHADOW = _pcbnew.LAYER_CONFLICTS_SHADOW
3284
3285LAYER_DRAWINGSHEET_PAGE1 = _pcbnew.LAYER_DRAWINGSHEET_PAGE1
3286
3287LAYER_DRAWINGSHEET_PAGEn = _pcbnew.LAYER_DRAWINGSHEET_PAGEn
3288
3289LAYER_PAGE_LIMITS = _pcbnew.LAYER_PAGE_LIMITS
3290
3291LAYER_ZONE_START = _pcbnew.LAYER_ZONE_START
3292
3293LAYER_ZONE_END = _pcbnew.LAYER_ZONE_END
3294
3295LAYER_BITMAP_START = _pcbnew.LAYER_BITMAP_START
3296
3297LAYER_BITMAP_END = _pcbnew.LAYER_BITMAP_END
3298
3299GAL_LAYER_ID_END = _pcbnew.GAL_LAYER_ID_END
3300
3301
3302def ToGalLayer(aInteger):
3303 r"""ToGalLayer(int aInteger) -> GAL_LAYER_ID"""
3304 return _pcbnew.ToGalLayer(aInteger)
3306 r"""Proxy of C++ GAL_SET class."""
3307
3308 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3309 __repr__ = _swig_repr
3310
3311 def __init__(self, *args):
3312 r"""
3313 __init__(GAL_SET self) -> GAL_SET
3314 __init__(GAL_SET self, GAL_SET aOther) -> GAL_SET
3315 __init__(GAL_SET self, GAL_LAYER_ID const * aArray, unsigned int aCount) -> GAL_SET
3316 """
3317 _pcbnew.GAL_SET_swiginit(self, _pcbnew.new_GAL_SET(*args))
3318
3319 def set(self, *args):
3320 r"""
3321 set(GAL_SET self) -> GAL_SET
3322 set(GAL_SET self, int aPos, bool aVal=True) -> GAL_SET
3323 set(GAL_SET self, GAL_LAYER_ID aPos, bool aVal=True) -> GAL_SET
3324 """
3325 return _pcbnew.GAL_SET_set(self, *args)
3326
3327 def Contains(self, aPos):
3328 r"""Contains(GAL_SET self, GAL_LAYER_ID aPos) -> bool"""
3329 return _pcbnew.GAL_SET_Contains(self, aPos)
3330
3331 def Seq(self):
3332 r"""Seq(GAL_SET self) -> std::vector< GAL_LAYER_ID,std::allocator< GAL_LAYER_ID > >"""
3333 return _pcbnew.GAL_SET_Seq(self)
3334
3335 @staticmethod
3337 r"""DefaultVisible() -> GAL_SET"""
3338 return _pcbnew.GAL_SET_DefaultVisible()
3339 __swig_destroy__ = _pcbnew.delete_GAL_SET
3340
3341# Register GAL_SET in _pcbnew:
3342_pcbnew.GAL_SET_swigregister(GAL_SET)
3343GAL_LAYER_ID_COUNT = cvar.GAL_LAYER_ID_COUNT
3344
3346 r"""GAL_SET_DefaultVisible() -> GAL_SET"""
3347 return _pcbnew.GAL_SET_DefaultVisible()
3348
3349SCH_LAYER_ID_START = _pcbnew.SCH_LAYER_ID_START
3350
3351LAYER_WIRE = _pcbnew.LAYER_WIRE
3352
3353LAYER_BUS = _pcbnew.LAYER_BUS
3354
3355LAYER_JUNCTION = _pcbnew.LAYER_JUNCTION
3356
3357LAYER_LOCLABEL = _pcbnew.LAYER_LOCLABEL
3358
3359LAYER_GLOBLABEL = _pcbnew.LAYER_GLOBLABEL
3360
3361LAYER_HIERLABEL = _pcbnew.LAYER_HIERLABEL
3362
3363LAYER_PINNUM = _pcbnew.LAYER_PINNUM
3364
3365LAYER_PINNAM = _pcbnew.LAYER_PINNAM
3366
3367LAYER_REFERENCEPART = _pcbnew.LAYER_REFERENCEPART
3368
3369LAYER_VALUEPART = _pcbnew.LAYER_VALUEPART
3370
3371LAYER_FIELDS = _pcbnew.LAYER_FIELDS
3372
3373LAYER_INTERSHEET_REFS = _pcbnew.LAYER_INTERSHEET_REFS
3374
3375LAYER_NETCLASS_REFS = _pcbnew.LAYER_NETCLASS_REFS
3376
3377LAYER_DEVICE = _pcbnew.LAYER_DEVICE
3378
3379LAYER_NOTES = _pcbnew.LAYER_NOTES
3380
3381LAYER_PRIVATE_NOTES = _pcbnew.LAYER_PRIVATE_NOTES
3382
3383LAYER_NOTES_BACKGROUND = _pcbnew.LAYER_NOTES_BACKGROUND
3384
3385LAYER_PIN = _pcbnew.LAYER_PIN
3386
3387LAYER_SHEET = _pcbnew.LAYER_SHEET
3388
3389LAYER_SHEETNAME = _pcbnew.LAYER_SHEETNAME
3390
3391LAYER_SHEETFILENAME = _pcbnew.LAYER_SHEETFILENAME
3392
3393LAYER_SHEETFIELDS = _pcbnew.LAYER_SHEETFIELDS
3394
3395LAYER_SHEETLABEL = _pcbnew.LAYER_SHEETLABEL
3396
3397LAYER_NOCONNECT = _pcbnew.LAYER_NOCONNECT
3398
3399LAYER_DANGLING = _pcbnew.LAYER_DANGLING
3400
3401LAYER_ERC_WARN = _pcbnew.LAYER_ERC_WARN
3402
3403LAYER_ERC_ERR = _pcbnew.LAYER_ERC_ERR
3404
3405LAYER_ERC_EXCLUSION = _pcbnew.LAYER_ERC_EXCLUSION
3406
3407LAYER_DEVICE_BACKGROUND = _pcbnew.LAYER_DEVICE_BACKGROUND
3408
3409LAYER_SHEET_BACKGROUND = _pcbnew.LAYER_SHEET_BACKGROUND
3410
3411LAYER_SCHEMATIC_GRID = _pcbnew.LAYER_SCHEMATIC_GRID
3412
3413LAYER_SCHEMATIC_GRID_AXES = _pcbnew.LAYER_SCHEMATIC_GRID_AXES
3414
3415LAYER_SCHEMATIC_BACKGROUND = _pcbnew.LAYER_SCHEMATIC_BACKGROUND
3416
3417LAYER_SCHEMATIC_CURSOR = _pcbnew.LAYER_SCHEMATIC_CURSOR
3418
3419LAYER_HOVERED = _pcbnew.LAYER_HOVERED
3420
3421LAYER_BRIGHTENED = _pcbnew.LAYER_BRIGHTENED
3422
3423LAYER_HIDDEN = _pcbnew.LAYER_HIDDEN
3424
3425LAYER_SELECTION_SHADOWS = _pcbnew.LAYER_SELECTION_SHADOWS
3426
3427LAYER_SCHEMATIC_DRAWINGSHEET = _pcbnew.LAYER_SCHEMATIC_DRAWINGSHEET
3428
3429LAYER_SCHEMATIC_PAGE_LIMITS = _pcbnew.LAYER_SCHEMATIC_PAGE_LIMITS
3430
3431LAYER_BUS_JUNCTION = _pcbnew.LAYER_BUS_JUNCTION
3432
3433LAYER_SCHEMATIC_AUX_ITEMS = _pcbnew.LAYER_SCHEMATIC_AUX_ITEMS
3434
3435LAYER_SCHEMATIC_ANCHOR = _pcbnew.LAYER_SCHEMATIC_ANCHOR
3436
3437SCH_LAYER_ID_END = _pcbnew.SCH_LAYER_ID_END
3438
3439GERBVIEW_LAYER_ID_START = _pcbnew.GERBVIEW_LAYER_ID_START
3440
3441GERBVIEW_LAYER_ID_RESERVED = _pcbnew.GERBVIEW_LAYER_ID_RESERVED
3442
3443LAYER_DCODES = _pcbnew.LAYER_DCODES
3444
3445LAYER_NEGATIVE_OBJECTS = _pcbnew.LAYER_NEGATIVE_OBJECTS
3446
3447LAYER_GERBVIEW_GRID = _pcbnew.LAYER_GERBVIEW_GRID
3448
3449LAYER_GERBVIEW_AXES = _pcbnew.LAYER_GERBVIEW_AXES
3450
3451LAYER_GERBVIEW_BACKGROUND = _pcbnew.LAYER_GERBVIEW_BACKGROUND
3452
3453LAYER_GERBVIEW_DRAWINGSHEET = _pcbnew.LAYER_GERBVIEW_DRAWINGSHEET
3454
3455LAYER_GERBVIEW_PAGE_LIMITS = _pcbnew.LAYER_GERBVIEW_PAGE_LIMITS
3456
3457GERBVIEW_LAYER_ID_END = _pcbnew.GERBVIEW_LAYER_ID_END
3458
3459LAYER_3D_START = _pcbnew.LAYER_3D_START
3460
3461LAYER_3D_BACKGROUND_BOTTOM = _pcbnew.LAYER_3D_BACKGROUND_BOTTOM
3462
3463LAYER_3D_BACKGROUND_TOP = _pcbnew.LAYER_3D_BACKGROUND_TOP
3464
3465LAYER_3D_BOARD = _pcbnew.LAYER_3D_BOARD
3466
3467LAYER_3D_COPPER = _pcbnew.LAYER_3D_COPPER
3468
3469LAYER_3D_SILKSCREEN_BOTTOM = _pcbnew.LAYER_3D_SILKSCREEN_BOTTOM
3470
3471LAYER_3D_SILKSCREEN_TOP = _pcbnew.LAYER_3D_SILKSCREEN_TOP
3472
3473LAYER_3D_SOLDERMASK_BOTTOM = _pcbnew.LAYER_3D_SOLDERMASK_BOTTOM
3474
3475LAYER_3D_SOLDERMASK_TOP = _pcbnew.LAYER_3D_SOLDERMASK_TOP
3476
3477LAYER_3D_SOLDERPASTE = _pcbnew.LAYER_3D_SOLDERPASTE
3478
3479LAYER_3D_END = _pcbnew.LAYER_3D_END
3480
3481
3482def LayerName(aLayer):
3483 r"""LayerName(int aLayer) -> wxString"""
3484 return _pcbnew.LayerName(aLayer)
3486 r"""Proxy of C++ LSEQ class."""
3487
3488 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3489 __repr__ = _swig_repr
3490
3491 def __init__(self):
3492 r"""__init__(LSEQ self) -> LSEQ"""
3493 _pcbnew.LSEQ_swiginit(self, _pcbnew.new_LSEQ())
3494
3495 def Rewind(self):
3496 r"""Rewind(LSEQ self)"""
3497 return _pcbnew.LSEQ_Rewind(self)
3498
3499 def __nonzero__(self):
3500 return _pcbnew.LSEQ___nonzero__(self)
3501 __bool__ = __nonzero__
3502
3503
3504
3505 def __ref__(self):
3506 r"""__ref__(LSEQ self) -> PCB_LAYER_ID"""
3507 return _pcbnew.LSEQ___ref__(self)
3508 __swig_destroy__ = _pcbnew.delete_LSEQ
3509
3510# Register LSEQ in _pcbnew:
3511_pcbnew.LSEQ_swigregister(LSEQ)
3512
3514 r"""Proxy of C++ LSET class."""
3515
3516 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3517 __repr__ = _swig_repr
3518
3519 def __init__(self, *args):
3520 r"""
3521 __init__(LSET self) -> LSET
3522 __init__(LSET self, BASE_SET const & aOther) -> LSET
3523 __init__(LSET self, PCB_LAYER_ID aLayer) -> LSET
3524 __init__(LSET self, PCB_LAYER_ID const * aArray, unsigned int aCount) -> LSET
3525 __init__(LSET self, unsigned int aIdCount, int aFirst) -> LSET
3526 """
3527 _pcbnew.LSET_swiginit(self, _pcbnew.new_LSET(*args))
3528
3529 def Contains(self, aLayer):
3530 r"""Contains(LSET self, PCB_LAYER_ID aLayer) -> bool"""
3531 return _pcbnew.LSET_Contains(self, aLayer)
3532
3533 @staticmethod
3534 def Name(aLayerId):
3535 r"""Name(PCB_LAYER_ID aLayerId) -> wxChar const *"""
3536 return _pcbnew.LSET_Name(aLayerId)
3537
3538 @staticmethod
3540 r"""InternalCuMask() -> LSET"""
3541 return _pcbnew.LSET_InternalCuMask()
3542
3543 @staticmethod
3545 r"""FrontAssembly() -> LSET"""
3546 return _pcbnew.LSET_FrontAssembly()
3547
3548 @staticmethod
3550 r"""BackAssembly() -> LSET"""
3551 return _pcbnew.LSET_BackAssembly()
3552
3553 @staticmethod
3554 def AllCuMask(*args):
3555 r"""AllCuMask(int aCuLayerCount=(B_Cu-F_Cu+1)) -> LSET"""
3556 return _pcbnew.LSET_AllCuMask(*args)
3557
3558 @staticmethod
3560 r"""ExternalCuMask() -> LSET"""
3561 return _pcbnew.LSET_ExternalCuMask()
3562
3563 @staticmethod
3565 r"""AllNonCuMask() -> LSET"""
3566 return _pcbnew.LSET_AllNonCuMask()
3567
3568 @staticmethod
3570 r"""AllLayersMask() -> LSET"""
3571 return _pcbnew.LSET_AllLayersMask()
3572
3573 @staticmethod
3575 r"""FrontTechMask() -> LSET"""
3576 return _pcbnew.LSET_FrontTechMask()
3577
3578 @staticmethod
3580 r"""FrontBoardTechMask() -> LSET"""
3581 return _pcbnew.LSET_FrontBoardTechMask()
3582
3583 @staticmethod
3585 r"""BackTechMask() -> LSET"""
3586 return _pcbnew.LSET_BackTechMask()
3587
3588 @staticmethod
3590 r"""BackBoardTechMask() -> LSET"""
3591 return _pcbnew.LSET_BackBoardTechMask()
3592
3593 @staticmethod
3595 r"""AllTechMask() -> LSET"""
3596 return _pcbnew.LSET_AllTechMask()
3597
3598 @staticmethod
3600 r"""AllBoardTechMask() -> LSET"""
3601 return _pcbnew.LSET_AllBoardTechMask()
3602
3603 @staticmethod
3605 r"""FrontMask() -> LSET"""
3606 return _pcbnew.LSET_FrontMask()
3607
3608 @staticmethod
3610 r"""BackMask() -> LSET"""
3611 return _pcbnew.LSET_BackMask()
3612
3613 @staticmethod
3615 r"""SideSpecificMask() -> LSET"""
3616 return _pcbnew.LSET_SideSpecificMask()
3617
3618 @staticmethod
3620 r"""UserMask() -> LSET"""
3621 return _pcbnew.LSET_UserMask()
3622
3623 @staticmethod
3625 r"""PhysicalLayersMask() -> LSET"""
3626 return _pcbnew.LSET_PhysicalLayersMask()
3627
3628 @staticmethod
3630 r"""UserDefinedLayers() -> LSET"""
3631 return _pcbnew.LSET_UserDefinedLayers()
3632
3633 @staticmethod
3635 r"""ForbiddenFootprintLayers() -> LSET"""
3636 return _pcbnew.LSET_ForbiddenFootprintLayers()
3637
3638 def CuStack(self):
3639 r"""CuStack(LSET self) -> LSEQ"""
3640 return _pcbnew.LSET_CuStack(self)
3641
3642 def Technicals(self, *args):
3643 r"""Technicals(LSET self, LSET aSubToOmit=LSET()) -> LSEQ"""
3644 return _pcbnew.LSET_Technicals(self, *args)
3645
3646 def Users(self):
3647 r"""Users(LSET self) -> LSEQ"""
3648 return _pcbnew.LSET_Users(self)
3649
3651 r"""TechAndUserUIOrder(LSET self) -> LSEQ"""
3652 return _pcbnew.LSET_TechAndUserUIOrder(self)
3653
3654 def UIOrder(self):
3655 r"""UIOrder(LSET self) -> LSEQ"""
3656 return _pcbnew.LSET_UIOrder(self)
3657
3658 def Seq(self, *args):
3659 r"""
3660 Seq(LSET self, PCB_LAYER_ID const * aWishListSequence, unsigned int aCount) -> LSEQ
3661 Seq(LSET self, LSEQ aSequence) -> LSEQ
3662 Seq(LSET self) -> LSEQ
3663 """
3664 return _pcbnew.LSET_Seq(self, *args)
3665
3667 r"""SeqStackupBottom2Top(LSET self) -> LSEQ"""
3668 return _pcbnew.LSET_SeqStackupBottom2Top(self)
3669
3670 def FmtHex(self):
3671 r"""FmtHex(LSET self) -> string"""
3672 return _pcbnew.LSET_FmtHex(self)
3673
3674 def ParseHex(self, aStart, aCount):
3675 r"""ParseHex(LSET self, char const * aStart, int aCount) -> int"""
3676 return _pcbnew.LSET_ParseHex(self, aStart, aCount)
3677
3678 def FmtBin(self):
3679 r"""FmtBin(LSET self) -> string"""
3680 return _pcbnew.LSET_FmtBin(self)
3681
3682 def ExtractLayer(self):
3683 r"""ExtractLayer(LSET self) -> PCB_LAYER_ID"""
3684 return _pcbnew.LSET_ExtractLayer(self)
3685
3686 def addLayer(self, aLayer):
3687 r"""addLayer(LSET self, PCB_LAYER_ID aLayer) -> LSET"""
3688 return _pcbnew.LSET_addLayer(self, aLayer)
3689
3690 def removeLayer(self, aLayer):
3691 r"""removeLayer(LSET self, PCB_LAYER_ID aLayer) -> LSET"""
3692 return _pcbnew.LSET_removeLayer(self, aLayer)
3693
3694 def addLayerSet(self, aLayerSet):
3695 r"""addLayerSet(LSET self, LSET aLayerSet) -> LSET"""
3696 return _pcbnew.LSET_addLayerSet(self, aLayerSet)
3697
3698 def removeLayerSet(self, aLayerSet):
3699 r"""removeLayerSet(LSET self, LSET aLayerSet) -> LSET"""
3700 return _pcbnew.LSET_removeLayerSet(self, aLayerSet)
3701
3702 def AddLayer(self, layer):
3703 return self.addLayer( layer )
3704
3705 def AddLayerSet(self, layers):
3706 return self.addLayerSet( layers )
3707
3708 def RemoveLayer(self, layer):
3709 return self.removeLayer( layer )
3710
3711 def RemoveLayerSet(self, layers):
3712 return self.removeLayerSet( layers )
3713
3714 __swig_destroy__ = _pcbnew.delete_LSET
3715
3716# Register LSET in _pcbnew:
3717_pcbnew.LSET_swigregister(LSET)
3718
3719def LSET_Name(aLayerId):
3720 r"""LSET_Name(PCB_LAYER_ID aLayerId) -> wxChar const *"""
3721 return _pcbnew.LSET_Name(aLayerId)
3722
3724 r"""LSET_InternalCuMask() -> LSET"""
3725 return _pcbnew.LSET_InternalCuMask()
3726
3728 r"""LSET_FrontAssembly() -> LSET"""
3729 return _pcbnew.LSET_FrontAssembly()
3730
3732 r"""LSET_BackAssembly() -> LSET"""
3733 return _pcbnew.LSET_BackAssembly()
3734
3736 r"""LSET_AllCuMask(int aCuLayerCount=(B_Cu-F_Cu+1)) -> LSET"""
3737 return _pcbnew.LSET_AllCuMask(*args)
3738
3740 r"""LSET_ExternalCuMask() -> LSET"""
3741 return _pcbnew.LSET_ExternalCuMask()
3742
3744 r"""LSET_AllNonCuMask() -> LSET"""
3745 return _pcbnew.LSET_AllNonCuMask()
3746
3748 r"""LSET_AllLayersMask() -> LSET"""
3749 return _pcbnew.LSET_AllLayersMask()
3750
3752 r"""LSET_FrontTechMask() -> LSET"""
3753 return _pcbnew.LSET_FrontTechMask()
3754
3756 r"""LSET_FrontBoardTechMask() -> LSET"""
3757 return _pcbnew.LSET_FrontBoardTechMask()
3758
3760 r"""LSET_BackTechMask() -> LSET"""
3761 return _pcbnew.LSET_BackTechMask()
3762
3764 r"""LSET_BackBoardTechMask() -> LSET"""
3765 return _pcbnew.LSET_BackBoardTechMask()
3766
3768 r"""LSET_AllTechMask() -> LSET"""
3769 return _pcbnew.LSET_AllTechMask()
3770
3772 r"""LSET_AllBoardTechMask() -> LSET"""
3773 return _pcbnew.LSET_AllBoardTechMask()
3774
3776 r"""LSET_FrontMask() -> LSET"""
3777 return _pcbnew.LSET_FrontMask()
3778
3780 r"""LSET_BackMask() -> LSET"""
3781 return _pcbnew.LSET_BackMask()
3782
3784 r"""LSET_SideSpecificMask() -> LSET"""
3785 return _pcbnew.LSET_SideSpecificMask()
3786
3788 r"""LSET_UserMask() -> LSET"""
3789 return _pcbnew.LSET_UserMask()
3790
3792 r"""LSET_PhysicalLayersMask() -> LSET"""
3793 return _pcbnew.LSET_PhysicalLayersMask()
3794
3796 r"""LSET_UserDefinedLayers() -> LSET"""
3797 return _pcbnew.LSET_UserDefinedLayers()
3798
3800 r"""LSET_ForbiddenFootprintLayers() -> LSET"""
3801 return _pcbnew.LSET_ForbiddenFootprintLayers()
3802
3803
3804def IsValidLayer(aLayerId):
3805 r"""IsValidLayer(int aLayerId) -> bool"""
3806 return _pcbnew.IsValidLayer(aLayerId)
3807
3808def IsPcbLayer(aLayer):
3809 r"""IsPcbLayer(int aLayer) -> bool"""
3810 return _pcbnew.IsPcbLayer(aLayer)
3811
3812def IsNonCopperLayer(aLayerId):
3813 r"""IsNonCopperLayer(int aLayerId) -> bool"""
3814 return _pcbnew.IsNonCopperLayer(aLayerId)
3815
3816def IsCopperLayer(*args):
3817 r"""
3818 IsCopperLayer(int aLayerId) -> bool
3819 IsCopperLayer(int aLayerId, bool aIncludeSyntheticCopperLayers) -> bool
3820 """
3821 return _pcbnew.IsCopperLayer(*args)
3822
3823def IsViaPadLayer(aLayer):
3824 r"""IsViaPadLayer(int aLayer) -> bool"""
3825 return _pcbnew.IsViaPadLayer(aLayer)
3826
3827def IsHoleLayer(aLayer):
3828 r"""IsHoleLayer(int aLayer) -> bool"""
3829 return _pcbnew.IsHoleLayer(aLayer)
3830
3831def IsUserLayer(aLayerId):
3832 r"""IsUserLayer(PCB_LAYER_ID aLayerId) -> bool"""
3833 return _pcbnew.IsUserLayer(aLayerId)
3834
3835def IsFrontLayer(aLayerId):
3836 r"""IsFrontLayer(PCB_LAYER_ID aLayerId) -> bool"""
3837 return _pcbnew.IsFrontLayer(aLayerId)
3838
3839def IsBackLayer(aLayerId):
3840 r"""IsBackLayer(PCB_LAYER_ID aLayerId) -> bool"""
3841 return _pcbnew.IsBackLayer(aLayerId)
3842
3843def FlipLayer(aLayerId, aCopperLayersCount=0):
3844 r"""FlipLayer(PCB_LAYER_ID aLayerId, int aCopperLayersCount=0) -> PCB_LAYER_ID"""
3845 return _pcbnew.FlipLayer(aLayerId, aCopperLayersCount)
3846
3847def FlipLayerMask(aMask, aCopperLayersCount=0):
3848 r"""FlipLayerMask(LSET aMask, int aCopperLayersCount=0) -> LSET"""
3849 return _pcbnew.FlipLayerMask(aMask, aCopperLayersCount)
3850
3852 r"""GetNetnameLayer(int aLayer) -> int"""
3853 return _pcbnew.GetNetnameLayer(aLayer)
3854
3855def IsNetnameLayer(aLayer):
3856 r"""IsNetnameLayer(int aLayer) -> bool"""
3857 return _pcbnew.IsNetnameLayer(aLayer)
3858
3860 r"""IsZoneFillLayer(int aLayer) -> bool"""
3861 return _pcbnew.IsZoneFillLayer(aLayer)
3862
3863def IsDCodeLayer(aLayer):
3864 r"""IsDCodeLayer(int aLayer) -> bool"""
3865 return _pcbnew.IsDCodeLayer(aLayer)
3866
3868 r"""IsNetCopperLayer(int aLayer) -> bool"""
3869 return _pcbnew.IsNetCopperLayer(aLayer)
3870
3871def ToLAYER_ID(aLayer):
3872 r"""ToLAYER_ID(int aLayer) -> PCB_LAYER_ID"""
3873 return _pcbnew.ToLAYER_ID(aLayer)
3875 r"""Proxy of C++ SETTINGS_MANAGER class."""
3876
3877 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3878 __repr__ = _swig_repr
3879
3880 def __init__(self, aHeadless=False):
3881 r"""__init__(SETTINGS_MANAGER self, bool aHeadless=False) -> SETTINGS_MANAGER"""
3882 _pcbnew.SETTINGS_MANAGER_swiginit(self, _pcbnew.new_SETTINGS_MANAGER(aHeadless))
3883 __swig_destroy__ = _pcbnew.delete_SETTINGS_MANAGER
3884
3885 def IsOK(self):
3886 r"""IsOK(SETTINGS_MANAGER self) -> bool"""
3887 return _pcbnew.SETTINGS_MANAGER_IsOK(self)
3888
3889 def SetKiway(self, aKiway):
3890 r"""SetKiway(SETTINGS_MANAGER self, KIWAY * aKiway)"""
3891 return _pcbnew.SETTINGS_MANAGER_SetKiway(self, aKiway)
3892
3893 def Load(self, *args):
3894 r"""
3895 Load(SETTINGS_MANAGER self)
3896 Load(SETTINGS_MANAGER self, JSON_SETTINGS * aSettings)
3897 """
3898 return _pcbnew.SETTINGS_MANAGER_Load(self, *args)
3899
3900 def Save(self, *args):
3901 r"""
3902 Save(SETTINGS_MANAGER self)
3903 Save(SETTINGS_MANAGER self, JSON_SETTINGS * aSettings)
3904 """
3905 return _pcbnew.SETTINGS_MANAGER_Save(self, *args)
3906
3907 def FlushAndRelease(self, aSettings, aSave=True):
3908 r"""FlushAndRelease(SETTINGS_MANAGER self, JSON_SETTINGS * aSettings, bool aSave=True)"""
3909 return _pcbnew.SETTINGS_MANAGER_FlushAndRelease(self, aSettings, aSave)
3910
3911 def GetColorSettings(self, *args):
3912 r"""GetColorSettings(SETTINGS_MANAGER self, wxString aName="user") -> COLOR_SETTINGS"""
3913 return _pcbnew.SETTINGS_MANAGER_GetColorSettings(self, *args)
3914
3916 r"""GetColorSettingsList(SETTINGS_MANAGER self) -> std::vector< COLOR_SETTINGS *,std::allocator< COLOR_SETTINGS * > >"""
3917 return _pcbnew.SETTINGS_MANAGER_GetColorSettingsList(self)
3918
3919 def SaveColorSettings(self, *args):
3920 r"""SaveColorSettings(SETTINGS_MANAGER self, COLOR_SETTINGS * aSettings, string aNamespace="")"""
3921 return _pcbnew.SETTINGS_MANAGER_SaveColorSettings(self, *args)
3922
3923 def AddNewColorSettings(self, aFilename):
3924 r"""AddNewColorSettings(SETTINGS_MANAGER self, wxString aFilename) -> COLOR_SETTINGS *"""
3925 return _pcbnew.SETTINGS_MANAGER_AddNewColorSettings(self, aFilename)
3926
3928 r"""GetMigratedColorSettings(SETTINGS_MANAGER self) -> COLOR_SETTINGS *"""
3929 return _pcbnew.SETTINGS_MANAGER_GetMigratedColorSettings(self)
3930
3932 r"""GetCommonSettings(SETTINGS_MANAGER self) -> COMMON_SETTINGS *"""
3933 return _pcbnew.SETTINGS_MANAGER_GetCommonSettings(self)
3934
3935 def GetPathForSettingsFile(self, aSettings):
3936 r"""GetPathForSettingsFile(SETTINGS_MANAGER self, JSON_SETTINGS * aSettings) -> wxString"""
3937 return _pcbnew.SETTINGS_MANAGER_GetPathForSettingsFile(self, aSettings)
3938
3940 r"""MigrateIfNeeded(SETTINGS_MANAGER self) -> bool"""
3941 return _pcbnew.SETTINGS_MANAGER_MigrateIfNeeded(self)
3942
3943 def SetMigrationSource(self, aSource):
3944 r"""SetMigrationSource(SETTINGS_MANAGER self, wxString aSource)"""
3945 return _pcbnew.SETTINGS_MANAGER_SetMigrationSource(self, aSource)
3946
3947 def SetMigrateLibraryTables(self, aMigrate=True):
3948 r"""SetMigrateLibraryTables(SETTINGS_MANAGER self, bool aMigrate=True)"""
3949 return _pcbnew.SETTINGS_MANAGER_SetMigrateLibraryTables(self, aMigrate)
3950
3951 def GetPreviousVersionPaths(self, aName=None):
3952 r"""GetPreviousVersionPaths(SETTINGS_MANAGER self, std::vector< wxString,std::allocator< wxString > > * aName=None) -> bool"""
3953 return _pcbnew.SETTINGS_MANAGER_GetPreviousVersionPaths(self, aName)
3954
3956 r"""ReloadColorSettings(SETTINGS_MANAGER self)"""
3957 return _pcbnew.SETTINGS_MANAGER_ReloadColorSettings(self)
3958
3959 def LoadProject(self, aFullPath, aSetActive=True):
3960 r"""LoadProject(SETTINGS_MANAGER self, wxString aFullPath, bool aSetActive=True) -> bool"""
3961 return _pcbnew.SETTINGS_MANAGER_LoadProject(self, aFullPath, aSetActive)
3962
3963 def UnloadProject(self, aProject, aSave=True):
3964 r"""UnloadProject(SETTINGS_MANAGER self, PROJECT * aProject, bool aSave=True) -> bool"""
3965 return _pcbnew.SETTINGS_MANAGER_UnloadProject(self, aProject, aSave)
3966
3967 def IsProjectOpen(self):
3968 r"""IsProjectOpen(SETTINGS_MANAGER self) -> bool"""
3969 return _pcbnew.SETTINGS_MANAGER_IsProjectOpen(self)
3970
3971 def Prj(self):
3972 r"""Prj(SETTINGS_MANAGER self) -> PROJECT &"""
3973 return _pcbnew.SETTINGS_MANAGER_Prj(self)
3974
3975 def GetProject(self, aFullPath):
3976 r"""GetProject(SETTINGS_MANAGER self, wxString aFullPath) -> PROJECT *"""
3977 return _pcbnew.SETTINGS_MANAGER_GetProject(self, aFullPath)
3978
3980 r"""GetOpenProjects(SETTINGS_MANAGER self) -> std::vector< wxString,std::allocator< wxString > >"""
3981 return _pcbnew.SETTINGS_MANAGER_GetOpenProjects(self)
3982
3983 def SaveProject(self, *args):
3984 r"""SaveProject(SETTINGS_MANAGER self, wxString aFullPath=wxEmptyString, PROJECT * aProject=None) -> bool"""
3985 return _pcbnew.SETTINGS_MANAGER_SaveProject(self, *args)
3986
3987 def SaveProjectAs(self, aFullPath, aProject=None):
3988 r"""SaveProjectAs(SETTINGS_MANAGER self, wxString aFullPath, PROJECT * aProject=None)"""
3989 return _pcbnew.SETTINGS_MANAGER_SaveProjectAs(self, aFullPath, aProject)
3990
3991 def SaveProjectCopy(self, aFullPath, aProject=None):
3992 r"""SaveProjectCopy(SETTINGS_MANAGER self, wxString aFullPath, PROJECT * aProject=None)"""
3993 return _pcbnew.SETTINGS_MANAGER_SaveProjectCopy(self, aFullPath, aProject)
3994
3996 r"""GetProjectBackupsPath(SETTINGS_MANAGER self) -> wxString"""
3997 return _pcbnew.SETTINGS_MANAGER_GetProjectBackupsPath(self)
3998
3999 def BackupProject(self, aReporter):
4000 r"""BackupProject(SETTINGS_MANAGER self, REPORTER & aReporter) -> bool"""
4001 return _pcbnew.SETTINGS_MANAGER_BackupProject(self, aReporter)
4002
4003 def TriggerBackupIfNeeded(self, aReporter):
4004 r"""TriggerBackupIfNeeded(SETTINGS_MANAGER self, REPORTER & aReporter) -> bool"""
4005 return _pcbnew.SETTINGS_MANAGER_TriggerBackupIfNeeded(self, aReporter)
4006
4007 @staticmethod
4009 r"""IsSettingsPathValid(wxString aPath) -> bool"""
4010 return _pcbnew.SETTINGS_MANAGER_IsSettingsPathValid(aPath)
4011
4012 @staticmethod
4014 r"""GetColorSettingsPath() -> wxString"""
4015 return _pcbnew.SETTINGS_MANAGER_GetColorSettingsPath()
4016
4017 @staticmethod
4019 r"""GetUserSettingsPath() -> wxString"""
4020 return _pcbnew.SETTINGS_MANAGER_GetUserSettingsPath()
4021
4022 @staticmethod
4024 r"""GetSettingsVersion() -> string"""
4025 return _pcbnew.SETTINGS_MANAGER_GetSettingsVersion()
4026
4027# Register SETTINGS_MANAGER in _pcbnew:
4028_pcbnew.SETTINGS_MANAGER_swigregister(SETTINGS_MANAGER)
4029
4031 r"""SETTINGS_MANAGER_IsSettingsPathValid(wxString aPath) -> bool"""
4032 return _pcbnew.SETTINGS_MANAGER_IsSettingsPathValid(aPath)
4033
4035 r"""SETTINGS_MANAGER_GetColorSettingsPath() -> wxString"""
4036 return _pcbnew.SETTINGS_MANAGER_GetColorSettingsPath()
4037
4039 r"""SETTINGS_MANAGER_GetUserSettingsPath() -> wxString"""
4040 return _pcbnew.SETTINGS_MANAGER_GetUserSettingsPath()
4041
4043 r"""SETTINGS_MANAGER_GetSettingsVersion() -> string"""
4044 return _pcbnew.SETTINGS_MANAGER_GetSettingsVersion()
4045
4047 r"""Proxy of C++ std::vector< int > class."""
4048
4049 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4050 __repr__ = _swig_repr
4051
4052 def iterator(self):
4053 r"""iterator(intVector self) -> SwigPyIterator"""
4054 return _pcbnew.intVector_iterator(self)
4055 def __iter__(self):
4056 return self.iterator()
4057
4058 def __nonzero__(self):
4059 r"""__nonzero__(intVector self) -> bool"""
4060 return _pcbnew.intVector___nonzero__(self)
4061
4062 def __bool__(self):
4063 r"""__bool__(intVector self) -> bool"""
4064 return _pcbnew.intVector___bool__(self)
4065
4066 def __len__(self):
4067 r"""__len__(intVector self) -> std::vector< int >::size_type"""
4068 return _pcbnew.intVector___len__(self)
4069
4070 def __getslice__(self, i, j):
4071 r"""__getslice__(intVector self, std::vector< int >::difference_type i, std::vector< int >::difference_type j) -> intVector"""
4072 return _pcbnew.intVector___getslice__(self, i, j)
4073
4074 def __setslice__(self, *args):
4075 r"""
4076 __setslice__(intVector self, std::vector< int >::difference_type i, std::vector< int >::difference_type j)
4077 __setslice__(intVector self, std::vector< int >::difference_type i, std::vector< int >::difference_type j, intVector v)
4078 """
4079 return _pcbnew.intVector___setslice__(self, *args)
4080
4081 def __delslice__(self, i, j):
4082 r"""__delslice__(intVector self, std::vector< int >::difference_type i, std::vector< int >::difference_type j)"""
4083 return _pcbnew.intVector___delslice__(self, i, j)
4084
4085 def __delitem__(self, *args):
4086 r"""
4087 __delitem__(intVector self, std::vector< int >::difference_type i)
4088 __delitem__(intVector self, PySliceObject * slice)
4089 """
4090 return _pcbnew.intVector___delitem__(self, *args)
4091
4092 def __getitem__(self, *args):
4093 r"""
4094 __getitem__(intVector self, PySliceObject * slice) -> intVector
4095 __getitem__(intVector self, std::vector< int >::difference_type i) -> std::vector< int >::value_type const &
4096 """
4097 return _pcbnew.intVector___getitem__(self, *args)
4098
4099 def __setitem__(self, *args):
4100 r"""
4101 __setitem__(intVector self, PySliceObject * slice, intVector v)
4102 __setitem__(intVector self, PySliceObject * slice)
4103 __setitem__(intVector self, std::vector< int >::difference_type i, std::vector< int >::value_type const & x)
4104 """
4105 return _pcbnew.intVector___setitem__(self, *args)
4106
4107 def pop(self):
4108 r"""pop(intVector self) -> std::vector< int >::value_type"""
4109 return _pcbnew.intVector_pop(self)
4110
4111 def append(self, x):
4112 r"""append(intVector self, std::vector< int >::value_type const & x)"""
4113 return _pcbnew.intVector_append(self, x)
4114
4115 def empty(self):
4116 r"""empty(intVector self) -> bool"""
4117 return _pcbnew.intVector_empty(self)
4118
4119 def size(self):
4120 r"""size(intVector self) -> std::vector< int >::size_type"""
4121 return _pcbnew.intVector_size(self)
4122
4123 def swap(self, v):
4124 r"""swap(intVector self, intVector v)"""
4125 return _pcbnew.intVector_swap(self, v)
4126
4127 def begin(self):
4128 r"""begin(intVector self) -> std::vector< int >::iterator"""
4129 return _pcbnew.intVector_begin(self)
4130
4131 def end(self):
4132 r"""end(intVector self) -> std::vector< int >::iterator"""
4133 return _pcbnew.intVector_end(self)
4134
4135 def rbegin(self):
4136 r"""rbegin(intVector self) -> std::vector< int >::reverse_iterator"""
4137 return _pcbnew.intVector_rbegin(self)
4138
4139 def rend(self):
4140 r"""rend(intVector self) -> std::vector< int >::reverse_iterator"""
4141 return _pcbnew.intVector_rend(self)
4142
4143 def clear(self):
4144 r"""clear(intVector self)"""
4145 return _pcbnew.intVector_clear(self)
4146
4147 def get_allocator(self):
4148 r"""get_allocator(intVector self) -> std::vector< int >::allocator_type"""
4149 return _pcbnew.intVector_get_allocator(self)
4150
4151 def pop_back(self):
4152 r"""pop_back(intVector self)"""
4153 return _pcbnew.intVector_pop_back(self)
4154
4155 def erase(self, *args):
4156 r"""
4157 erase(intVector self, std::vector< int >::iterator pos) -> std::vector< int >::iterator
4158 erase(intVector self, std::vector< int >::iterator first, std::vector< int >::iterator last) -> std::vector< int >::iterator
4159 """
4160 return _pcbnew.intVector_erase(self, *args)
4161
4162 def __init__(self, *args):
4163 r"""
4164 __init__(intVector self) -> intVector
4165 __init__(intVector self, intVector other) -> intVector
4166 __init__(intVector self, std::vector< int >::size_type size) -> intVector
4167 __init__(intVector self, std::vector< int >::size_type size, std::vector< int >::value_type const & value) -> intVector
4168 """
4169 _pcbnew.intVector_swiginit(self, _pcbnew.new_intVector(*args))
4170
4171 def push_back(self, x):
4172 r"""push_back(intVector self, std::vector< int >::value_type const & x)"""
4173 return _pcbnew.intVector_push_back(self, x)
4174
4175 def front(self):
4176 r"""front(intVector self) -> std::vector< int >::value_type const &"""
4177 return _pcbnew.intVector_front(self)
4178
4179 def back(self):
4180 r"""back(intVector self) -> std::vector< int >::value_type const &"""
4181 return _pcbnew.intVector_back(self)
4182
4183 def assign(self, n, x):
4184 r"""assign(intVector self, std::vector< int >::size_type n, std::vector< int >::value_type const & x)"""
4185 return _pcbnew.intVector_assign(self, n, x)
4186
4187 def resize(self, *args):
4188 r"""
4189 resize(intVector self, std::vector< int >::size_type new_size)
4190 resize(intVector self, std::vector< int >::size_type new_size, std::vector< int >::value_type const & x)
4191 """
4192 return _pcbnew.intVector_resize(self, *args)
4193
4194 def insert(self, *args):
4195 r"""
4196 insert(intVector self, std::vector< int >::iterator pos, std::vector< int >::value_type const & x) -> std::vector< int >::iterator
4197 insert(intVector self, std::vector< int >::iterator pos, std::vector< int >::size_type n, std::vector< int >::value_type const & x)
4198 """
4199 return _pcbnew.intVector_insert(self, *args)
4200
4201 def reserve(self, n):
4202 r"""reserve(intVector self, std::vector< int >::size_type n)"""
4203 return _pcbnew.intVector_reserve(self, n)
4204
4205 def capacity(self):
4206 r"""capacity(intVector self) -> std::vector< int >::size_type"""
4207 return _pcbnew.intVector_capacity(self)
4208 __swig_destroy__ = _pcbnew.delete_intVector
4209
4210# Register intVector in _pcbnew:
4211_pcbnew.intVector_swigregister(intVector)
4212
4214 r"""Proxy of C++ std::map< std::string,UTF8 > class."""
4215
4216 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4217 __repr__ = _swig_repr
4218
4219 def iterator(self):
4220 r"""iterator(str_utf8_Map self) -> SwigPyIterator"""
4221 return _pcbnew.str_utf8_Map_iterator(self)
4222 def __iter__(self):
4223 return self.iterator()
4224
4225 def __nonzero__(self):
4226 r"""__nonzero__(str_utf8_Map self) -> bool"""
4227 return _pcbnew.str_utf8_Map___nonzero__(self)
4228
4229 def __bool__(self):
4230 r"""__bool__(str_utf8_Map self) -> bool"""
4231 return _pcbnew.str_utf8_Map___bool__(self)
4232
4233 def __len__(self):
4234 r"""__len__(str_utf8_Map self) -> std::map< std::basic_string< char,std::char_traits< char >,std::allocator< char > >,UTF8 >::size_type"""
4235 return _pcbnew.str_utf8_Map___len__(self)
4236 def __iter__(self):
4237 return self.key_iterator()
4238 def iterkeys(self):
4239 return self.key_iterator()
4240 def itervalues(self):
4241 return self.value_iterator()
4242 def iteritems(self):
4243 return self.iterator()
4244
4245 def __getitem__(self, key):
4246 r"""__getitem__(str_utf8_Map self, string key) -> UTF8"""
4247 return _pcbnew.str_utf8_Map___getitem__(self, key)
4248
4249 def __delitem__(self, key):
4250 r"""__delitem__(str_utf8_Map self, string key)"""
4251 return _pcbnew.str_utf8_Map___delitem__(self, key)
4252
4253 def has_key(self, key):
4254 r"""has_key(str_utf8_Map self, string key) -> bool"""
4255 return _pcbnew.str_utf8_Map_has_key(self, key)
4256
4257 def keys(self):
4258 r"""keys(str_utf8_Map self) -> PyObject *"""
4259 return _pcbnew.str_utf8_Map_keys(self)
4260
4261 def values(self):
4262 r"""values(str_utf8_Map self) -> PyObject *"""
4263 return _pcbnew.str_utf8_Map_values(self)
4264
4265 def items(self):
4266 r"""items(str_utf8_Map self) -> PyObject *"""
4267 return _pcbnew.str_utf8_Map_items(self)
4268
4269 def __contains__(self, key):
4270 r"""__contains__(str_utf8_Map self, string key) -> bool"""
4271 return _pcbnew.str_utf8_Map___contains__(self, key)
4272
4273 def key_iterator(self):
4274 r"""key_iterator(str_utf8_Map self) -> SwigPyIterator"""
4275 return _pcbnew.str_utf8_Map_key_iterator(self)
4276
4278 r"""value_iterator(str_utf8_Map self) -> SwigPyIterator"""
4279 return _pcbnew.str_utf8_Map_value_iterator(self)
4280
4281 def __setitem__(self, *args):
4282 r"""
4283 __setitem__(str_utf8_Map self, string key)
4284 __setitem__(str_utf8_Map self, string key, UTF8 x)
4285 """
4286 return _pcbnew.str_utf8_Map___setitem__(self, *args)
4287
4288 def asdict(self):
4289 r"""asdict(str_utf8_Map self) -> PyObject *"""
4290 return _pcbnew.str_utf8_Map_asdict(self)
4291
4292 def __init__(self, *args):
4293 r"""
4294 __init__(str_utf8_Map self, std::less< std::basic_string< char,std::char_traits< char >,std::allocator< char > > > const & other) -> str_utf8_Map
4295 __init__(str_utf8_Map self) -> str_utf8_Map
4296 __init__(str_utf8_Map self, str_utf8_Map other) -> str_utf8_Map
4297 """
4298 _pcbnew.str_utf8_Map_swiginit(self, _pcbnew.new_str_utf8_Map(*args))
4299
4300 def empty(self):
4301 r"""empty(str_utf8_Map self) -> bool"""
4302 return _pcbnew.str_utf8_Map_empty(self)
4303
4304 def size(self):
4305 r"""size(str_utf8_Map self) -> std::map< std::basic_string< char,std::char_traits< char >,std::allocator< char > >,UTF8 >::size_type"""
4306 return _pcbnew.str_utf8_Map_size(self)
4307
4308 def swap(self, v):
4309 r"""swap(str_utf8_Map self, str_utf8_Map v)"""
4310 return _pcbnew.str_utf8_Map_swap(self, v)
4311
4312 def begin(self):
4313 r"""begin(str_utf8_Map self) -> std::map< std::basic_string< char,std::char_traits< char >,std::allocator< char > >,UTF8 >::iterator"""
4314 return _pcbnew.str_utf8_Map_begin(self)
4315
4316 def end(self):
4317 r"""end(str_utf8_Map self) -> std::map< std::basic_string< char,std::char_traits< char >,std::allocator< char > >,UTF8 >::iterator"""
4318 return _pcbnew.str_utf8_Map_end(self)
4319
4320 def rbegin(self):
4321 r"""rbegin(str_utf8_Map self) -> std::map< std::basic_string< char,std::char_traits< char >,std::allocator< char > >,UTF8 >::reverse_iterator"""
4322 return _pcbnew.str_utf8_Map_rbegin(self)
4323
4324 def rend(self):
4325 r"""rend(str_utf8_Map self) -> std::map< std::basic_string< char,std::char_traits< char >,std::allocator< char > >,UTF8 >::reverse_iterator"""
4326 return _pcbnew.str_utf8_Map_rend(self)
4327
4328 def clear(self):
4329 r"""clear(str_utf8_Map self)"""
4330 return _pcbnew.str_utf8_Map_clear(self)
4331
4332 def get_allocator(self):
4333 r"""get_allocator(str_utf8_Map self) -> std::map< std::basic_string< char,std::char_traits< char >,std::allocator< char > >,UTF8 >::allocator_type"""
4334 return _pcbnew.str_utf8_Map_get_allocator(self)
4335
4336 def count(self, x):
4337 r"""count(str_utf8_Map self, string x) -> std::map< std::basic_string< char,std::char_traits< char >,std::allocator< char > >,UTF8 >::size_type"""
4338 return _pcbnew.str_utf8_Map_count(self, x)
4339
4340 def erase(self, *args):
4341 r"""
4342 erase(str_utf8_Map self, string x) -> std::map< std::basic_string< char,std::char_traits< char >,std::allocator< char > >,UTF8 >::size_type
4343 erase(str_utf8_Map self, std::map< std::basic_string< char,std::char_traits< char >,std::allocator< char > >,UTF8 >::iterator position)
4344 erase(str_utf8_Map self, std::map< std::basic_string< char,std::char_traits< char >,std::allocator< char > >,UTF8 >::iterator first, std::map< std::basic_string< char,std::char_traits< char >,std::allocator< char > >,UTF8 >::iterator last)
4345 """
4346 return _pcbnew.str_utf8_Map_erase(self, *args)
4347
4348 def find(self, x):
4349 r"""find(str_utf8_Map self, string x) -> std::map< std::basic_string< char,std::char_traits< char >,std::allocator< char > >,UTF8 >::iterator"""
4350 return _pcbnew.str_utf8_Map_find(self, x)
4351
4352 def lower_bound(self, x):
4353 r"""lower_bound(str_utf8_Map self, string x) -> std::map< std::basic_string< char,std::char_traits< char >,std::allocator< char > >,UTF8 >::iterator"""
4354 return _pcbnew.str_utf8_Map_lower_bound(self, x)
4355
4356 def upper_bound(self, x):
4357 r"""upper_bound(str_utf8_Map self, string x) -> std::map< std::basic_string< char,std::char_traits< char >,std::allocator< char > >,UTF8 >::iterator"""
4358 return _pcbnew.str_utf8_Map_upper_bound(self, x)
4359 __swig_destroy__ = _pcbnew.delete_str_utf8_Map
4360
4361# Register str_utf8_Map in _pcbnew:
4362_pcbnew.str_utf8_Map_swigregister(str_utf8_Map)
4363
4364
4365
4366KICAD_PLUGINS={} # the list of loaded footprint wizards
4367
4368""" the list of not loaded python scripts
4369 (usually because there is a syntax error in python script)
4370 this is the python script full filenames list.
4371 filenames are separated by '\n'
4372"""
4373NOT_LOADED_WIZARDS=""
4374
4375""" the list of paths used to search python scripts.
4376 Stored here to be displayed on request in Pcbnew
4377 paths are separated by '\n'
4378"""
4379PLUGIN_DIRECTORIES_SEARCH=""
4380
4381"""
4382 the trace of errors during execution of footprint wizards scripts
4383 Warning: strings (internally unicode) are returned as UTF-8 compatible C strings
4384"""
4385
4386FULL_BACK_TRACE=""
4387
4388def GetUnLoadableWizards():
4389 global NOT_LOADED_WIZARDS
4390 import sys
4391
4392 if sys.version_info[0] < 3:
4393 utf8_str = NOT_LOADED_WIZARDS.encode( 'UTF-8' )
4394 else:
4395 utf8_str = NOT_LOADED_WIZARDS
4396
4397 return utf8_str
4398
4400 global PLUGIN_DIRECTORIES_SEARCH
4401 import sys
4402
4403 if sys.version_info[0] < 3:
4404 utf8_str = PLUGIN_DIRECTORIES_SEARCH.encode( 'UTF-8' )
4405 else:
4406 utf8_str = PLUGIN_DIRECTORIES_SEARCH
4407
4408 return utf8_str
4409
4411 global FULL_BACK_TRACE # Already correct format
4412 return FULL_BACK_TRACE
4413
4414
4415def LoadPluginModule(Dirname, ModuleName, FileName):
4416 """
4417 Load the plugin module named ModuleName located in the folder Dirname.
4418 The module can be either inside a file called FileName or a subdirectory
4419 called FileName that contains a __init__.py file.
4420 If this module cannot be loaded, its name is stored in failed_wizards_list
4421 and the error trace is stored in FULL_BACK_TRACE
4422 """
4423 import os
4424 import sys
4425 import traceback
4426
4427 global NOT_LOADED_WIZARDS
4428 global FULL_BACK_TRACE
4429 global KICAD_PLUGINS
4430
4431 try: # If there is an error loading the script, skip it
4432
4433 module_filename = os.path.join( Dirname, FileName )
4434 mtime = os.path.getmtime( module_filename )
4435 mods_before = set( sys.modules )
4436
4437 if ModuleName in KICAD_PLUGINS:
4438 plugin = KICAD_PLUGINS[ModuleName]
4439
4440 for dependency in plugin["dependencies"]:
4441 if dependency in sys.modules:
4442 del sys.modules[dependency]
4443
4444 mods_before = set( sys.modules )
4445
4446 if sys.version_info >= (3,0,0):
4447 import importlib
4448 mod = importlib.import_module( ModuleName )
4449 else:
4450 mod = __import__( ModuleName, locals(), globals() )
4451
4452 mods_after = set( sys.modules ).difference( mods_before )
4453 dependencies = [m for m in mods_after if m.startswith(ModuleName)]
4454
4455 KICAD_PLUGINS[ModuleName]={ "filename":module_filename,
4456 "modification_time":mtime,
4457 "ModuleName":mod,
4458 "dependencies": dependencies }
4459
4460 except:
4461 if ModuleName in KICAD_PLUGINS:
4462 del KICAD_PLUGINS[ModuleName]
4463
4464 if NOT_LOADED_WIZARDS != "" :
4465 NOT_LOADED_WIZARDS += "\n"
4466 NOT_LOADED_WIZARDS += module_filename
4467 FULL_BACK_TRACE += traceback.format_exc()
4468
4469
4470def LoadPlugins(bundlepath=None, userpath=None, thirdpartypath=None):
4471 """
4472 Initialise Scripting/Plugin python environment and load plugins.
4473
4474 Arguments:
4475 Note: bundlepath and userpath are given utf8 encoded, to be compatible with asimple C string
4476 bundlepath -- The path to the bundled scripts.
4477 The bundled Plugins are relative to this path, in the
4478 "plugins" subdirectory.
4479 WARNING: bundlepath must use '/' as path separator, and not '\'
4480 because it creates issues:
4481 \n and \r are seen as a escaped seq when passing this string to this method
4482 I am thinking this is due to the fact LoadPlugins is called from C++ code by
4483 PyRun_SimpleString()
4484
4485 NOTE: These are all of the possible "default" search paths for kicad
4486 python scripts. These paths will ONLY be added to the python
4487 search path ONLY IF they already exist.
4488
4489 The Scripts bundled with the KiCad installation:
4490 <bundlepath>/
4491 <bundlepath>/plugins/
4492
4493 The Scripts relative to the KiCad Users configuration:
4494 <userpath>/
4495 <userpath>/plugins/
4496
4497 The plugins from 3rd party packages:
4498 $KICAD_3RD_PARTY/plugins/
4499 """
4500 import os
4501 import sys
4502 import traceback
4503 import pcbnew
4504
4505 if sys.version_info >= (3,3,0):
4506 import importlib
4507 importlib.invalidate_caches()
4508
4509 """
4510 bundlepath and userpath are strings utf-8 encoded (compatible "C" strings).
4511 So convert these utf8 encoding to unicode strings to avoid any encoding issue.
4512 """
4513 try:
4514 bundlepath = bundlepath.decode( 'UTF-8' )
4515 userpath = userpath.decode( 'UTF-8' )
4516 thirdpartypath = thirdpartypath.decode( 'UTF-8' )
4517 except AttributeError:
4518 pass
4519
4521 plugin_directories=[]
4522
4523 """
4524 To be consistent with others paths, on windows, convert the unix '/' separator
4525 to the windows separator, although using '/' works
4526 """
4527 if sys.platform.startswith('win32'):
4528 if bundlepath:
4529 bundlepath = bundlepath.replace("/","\\")
4530 if thirdpartypath:
4531 thirdpartypath = thirdpartypath.replace("/","\\")
4532
4533 if bundlepath:
4534 plugin_directories.append(bundlepath)
4535 plugin_directories.append(os.path.join(bundlepath, 'plugins'))
4536
4537 if config_path:
4538 plugin_directories.append(os.path.join(config_path, 'scripting'))
4539 plugin_directories.append(os.path.join(config_path, 'scripting', 'plugins'))
4540
4541 if userpath:
4542 plugin_directories.append(userpath)
4543 plugin_directories.append(os.path.join(userpath, 'plugins'))
4544
4545 if thirdpartypath:
4546 plugin_directories.append(thirdpartypath)
4547
4548 global PLUGIN_DIRECTORIES_SEARCH
4549 PLUGIN_DIRECTORIES_SEARCH=""
4550 for plugins_dir in plugin_directories: # save search path list for later use
4551 if PLUGIN_DIRECTORIES_SEARCH != "" :
4552 PLUGIN_DIRECTORIES_SEARCH += "\n"
4553 PLUGIN_DIRECTORIES_SEARCH += plugins_dir
4554
4555 global FULL_BACK_TRACE
4556 FULL_BACK_TRACE="" # clear any existing trace
4557
4558 global NOT_LOADED_WIZARDS
4559 NOT_LOADED_WIZARDS = "" # save not loaded wizards names list for later use
4560
4561 global KICAD_PLUGINS
4562
4563 for plugins_dir in plugin_directories:
4564 if not os.path.isdir( plugins_dir ):
4565 continue
4566
4567 if plugins_dir not in sys.path:
4568 sys.path.append( plugins_dir )
4569
4570 for module in os.listdir(plugins_dir):
4571 fullPath = os.path.join( plugins_dir, module )
4572
4573 if os.path.isdir( fullPath ):
4574 if os.path.exists( os.path.join( fullPath, '__init__.py' ) ):
4575 LoadPluginModule( plugins_dir, module, module )
4576 else:
4577 if NOT_LOADED_WIZARDS != "" :
4578 NOT_LOADED_WIZARDS += "\n"
4579 NOT_LOADED_WIZARDS += 'Skip subdir ' + fullPath
4580 continue
4581
4582 if module == '__init__.py' or module[-3:] != '.py':
4583 continue
4584
4585 LoadPluginModule( plugins_dir, module[:-3], module )
4586
4587
4589 def __init__(self):
4590 pass
4591
4592 def register(self):
4593 import inspect
4594 import os
4595
4596 if isinstance(self,FilePlugin):
4597 pass # register to file plugins in C++
4598
4599 if isinstance(self,FootprintWizardPlugin):
4600 PYTHON_FOOTPRINT_WIZARD_LIST.register_wizard(self)
4601 return
4602
4603 if isinstance(self,ActionPlugin):
4604 """
4605 Get path to .py or .pyc that has definition of plugin class.
4606 If path is binary but source also exists, assume definition is in source.
4607 """
4608 self.__plugin_path = inspect.getfile(self.__class__)
4609 if self.__plugin_path.endswith('.pyc') and os.path.isfile(self.__plugin_path[:-1]):
4610 self.__plugin_path = self.__plugin_path[:-1]
4611 self.__plugin_path = self.__plugin_path + '/' + self.__class__.__name__
4612 PYTHON_ACTION_PLUGINS.register_action(self)
4613 return
4614
4615 return
4616
4617 def deregister(self):
4618 if isinstance(self,FilePlugin):
4619 pass # deregister to file plugins in C++
4620
4621 if isinstance(self,FootprintWizardPlugin):
4622 PYTHON_FOOTPRINT_WIZARD_LIST.deregister_wizard(self)
4623 return
4624
4625 if isinstance(self,ActionPlugin):
4626 PYTHON_ACTION_PLUGINS.deregister_action(self)
4627 return
4628
4629 return
4630
4631 def GetPluginPath( self ):
4632 return self.__plugin_path
4633
4634
4636 def __init__(self):
4637 KiCadPlugin.__init__(self)
4638
4639
4640from math import ceil, floor, sqrt
4641
4642uMM = "mm" # Millimetres
4643uMils = "mils" # Mils
4644uFloat = "float" # Natural number units (dimensionless)
4645uInteger = "integer" # Integer (no decimals, numeric, dimensionless)
4646uBool = "bool" # Boolean value
4647uRadians = "radians" # Angular units (radians)
4648uDegrees = "degrees" # Angular units (degrees)
4649uPercent = "%" # Percent (0% -> 100%)
4650uString = "string" # Raw string
4651
4652uNumeric = [uMM, uMils, uFloat, uInteger, uDegrees, uRadians, uPercent] # List of numeric types
4653uUnits = [uMM, uMils, uFloat, uInteger, uBool, uDegrees, uRadians, uPercent, uString] # List of allowable types
4654
4656 _true = ['true','t','y','yes','on','1',1,]
4657 _false = ['false','f','n','no','off','0',0,'',None]
4658
4659 _bools = _true + _false
4660
4661 def __init__(self, page, name, units, default, **kwarg):
4662 self.page = page
4663 self.name = name
4664 self.hint = kwarg.get('hint','') # Parameter hint (shown as mouse-over text)
4665 self.designator = kwarg.get('designator',' ') # Parameter designator such as "e, D, p" (etc)
4666
4667 if units.lower() in uUnits:
4668 self.units = units.lower()
4669 elif units.lower() == 'percent':
4670 self.units = uPercent
4671 elif type(units) in [list, tuple]: # Convert a list of options into a single string
4672 self.units = ",".join([str(el).strip() for el in units])
4673 else:
4674 self.units = units
4675
4676 self.multiple = int(kwarg.get('multiple',1)) # Check integer values are multiples of this number
4677 self.min_value = kwarg.get('min_value',None) # Check numeric values are above or equal to this number
4678 self.max_value = kwarg.get('max_value',None) # Check numeric values are below or equal to this number
4679
4680 self.SetValue(default)
4681 self.default = self.raw_value # Save value as default
4682
4683 def ClearErrors(self):
4684 self.error_list = []
4685
4686 def AddError(self, err, info=None):
4687
4688 if err in self.error_list: # prevent duplicate error messages
4689 return
4690 if info is not None:
4691 err = err + " (" + str(info) + ")"
4692
4693 self.error_list.append(err)
4694
4695 def Check(self, min_value=None, max_value=None, multiple=None, info=None):
4696
4697 if min_value is None:
4698 min_value = self.min_value
4699 if max_value is None:
4700 max_value = self.max_value
4701 if multiple is None:
4702 multiple = self.multiple
4703
4704 if self.units not in uUnits and ',' not in self.units: # Allow either valid units or a list of strings
4705 self.AddError("type '{t}' unknown".format(t=self.units),info)
4706 self.AddError("Allowable types: " + str(self.units),info)
4707
4708 if self.units in uNumeric:
4709 try:
4710 to_num = float(self.raw_value)
4711
4712 if min_value is not None: # Check minimum value if it is present
4713 if to_num < min_value:
4714 self.AddError("value '{v}' is below minimum ({m})".format(v=self.raw_value,m=min_value),info)
4715
4716 if max_value is not None: # Check maximum value if it is present
4717 if to_num > max_value:
4718 self.AddError("value '{v}' is above maximum ({m})".format(v=self.raw_value,m=max_value),info)
4719
4720 except:
4721 self.AddError("value '{v}' is not of type '{t}'".format(v = self.raw_value, t=self.units),info)
4722
4723 if self.units == uInteger: # Perform integer specific checks
4724 try:
4725 to_int = int(self.raw_value)
4726
4727 if multiple is not None and multiple > 1:
4728 if (to_int % multiple) > 0:
4729 self.AddError("value '{v}' is not a multiple of {m}".format(v=self.raw_value,m=multiple),info)
4730 except:
4731 self.AddError("value '{v}' is not an integer".format(v=self.raw_value),info)
4732
4733 if self.units == uBool: # Check that the value is of a correct boolean format
4734 if self.raw_value in [True,False] or str(self.raw_value).lower() in self._bools:
4735 pass
4736 else:
4737 self.AddError("value '{v}' is not a boolean value".format(v = self.raw_value),info)
4738
4739 @property
4740 def value(self): # Return the current value, converted to appropriate units (from string representation) if required
4741 v = str(self.raw_value) # Enforce string type for known starting point
4742
4743 if self.units == uInteger: # Integer values
4744 return int(v)
4745 elif self.units in uNumeric: # Any values that use floating points
4746 v = v.replace(",",".") # Replace "," separators with "."
4747 v = float(v)
4748
4749 if self.units == uMM: # Convert from millimetres to nanometres
4750 return FromMM(v)
4751
4752 elif self.units == uMils: # Convert from mils to nanometres
4753 return FromMils(v)
4754
4755 else: # Any other floating-point values
4756 return v
4757
4758 elif self.units == uBool:
4759 if v.lower() in self._true:
4760 return True
4761 else:
4762 return False
4763 else:
4764 return v
4765
4766 def DefaultValue(self): # Reset the value of the parameter to its default
4767 self.raw_value = str(self.default)
4768
4769 def SetValue(self, new_value): # Update the value
4770 new_value = str(new_value)
4771
4772 if len(new_value.strip()) == 0:
4773 if not self.units in [uString, uBool]:
4774 return # Ignore empty values unless for strings or bools
4775
4776 if self.units == uBool: # Enforce the same boolean representation as is used in KiCad
4777 new_value = "1" if new_value.lower() in self._true else "0"
4778 elif self.units in uNumeric:
4779 new_value = new_value.replace(",", ".") # Enforce decimal point separators
4780 elif ',' in self.units: # Select from a list of values
4781 if new_value not in self.units.split(','):
4782 new_value = self.units.split(',')[0]
4783
4784 self.raw_value = new_value
4785
4786 def __str__(self): # pretty-print the parameter
4787
4788 s = self.name + ": " + str(self.raw_value)
4789
4790 if self.units in [uMM, uMils, uPercent, uRadians, uDegrees]:
4791 s += self.units
4792 elif self.units == uBool: # Special case for Boolean values
4793 s = self.name + ": {b}".format(b = "True" if self.value else "False")
4794 elif self.units == uString:
4795 s = self.name + ": '" + self.raw_value + "'"
4796
4797 return s
4798
4799
4801 def __init__(self):
4802 KiCadPlugin.__init__(self)
4803 self.defaults()
4804
4805 def defaults(self):
4806 self.module = None
4807 self.params = [] # List of added parameters that observes addition order
4808
4809 self.name = "KiCad FP Wizard"
4810 self.description = "Undefined Footprint Wizard plugin"
4811 self.image = ""
4813
4814 def AddParam(self, page, name, unit, default, **kwarg):
4815
4816 if self.GetParam(page,name) is not None: # Param already exists!
4817 return
4818
4819 param = FootprintWizardParameter(page, name, unit, default, **kwarg) # Create a new parameter
4820 self.params.append(param)
4821
4822 @property
4823 def parameters(self): # This is a helper function that returns a nested (unordered) dict of the VALUES of parameters
4824 pages = {} # Page dict
4825 for p in self.params:
4826 if p.page not in pages:
4827 pages[p.page] = {}
4828
4829 pages[p.page][p.name] = p.value # Return the 'converted' value (convert from string to actual useful units)
4830
4831 return pages
4832
4833 @property
4834 def values(self): # Same as above
4835 return self.parameters
4836
4837 def ResetWizard(self): # Reset all parameters to default values
4838 for p in self.params:
4839 p.DefaultValue()
4840
4841 def GetName(self): # Return the name of this wizard
4842 return self.name
4843
4844 def GetImage(self): # Return the filename of the preview image associated with this wizard
4845 return self.image
4846
4847 def GetDescription(self): # Return the description text
4848 return self.description
4849
4850 def GetValue(self):
4851 raise NotImplementedError
4852
4854 return "REF" # Default reference prefix for any footprint
4855
4856 def GetParam(self, page, name): # Grab a parameter
4857 for p in self.params:
4858 if p.page == page and p.name == name:
4859 return p
4860
4861 return None
4862
4863 def CheckParam(self, page, name, **kwarg):
4864 self.GetParam(page,name).Check(**kwarg)
4865
4866 def AnyErrors(self):
4867 return any([len(p.error_list) > 0 for p in self.params])
4868
4869 @property
4870 def pages(self): # Return an (ordered) list of the available page names
4871 page_list = []
4872 for p in self.params:
4873 if p.page not in page_list:
4874 page_list.append(p.page)
4875
4876 return page_list
4877
4878 def GetNumParameterPages(self): # Return the number of parameter pages
4879 return len(self.pages)
4880
4881 def GetParameterPageName(self,page_n): # Return the name of a page at a given index
4882 return self.pages[page_n]
4883
4884 def GetParametersByPageName(self, page_name): # Return a list of parameters on a given page
4885 params = []
4886
4887 for p in self.params:
4888 if p.page == page_name:
4889 params.append(p)
4890
4891 return params
4892
4893 def GetParametersByPageIndex(self, page_index): # Return an ordered list of parameters on a given page
4894 return self.GetParametersByPageName(self.GetParameterPageName(page_index))
4895
4896 def GetParameterDesignators(self, page_index): # Return a list of designators associated with a given page
4897 params = self.GetParametersByPageIndex(page_index)
4898 return [p.designator for p in params]
4899
4900 def GetParameterNames(self,page_index): # Return the list of names associated with a given page
4901 params = self.GetParametersByPageIndex(page_index)
4902 return [p.name for p in params]
4903
4904 def GetParameterValues(self,page_index): # Return the list of values associated with a given page
4905 params = self.GetParametersByPageIndex(page_index)
4906 return [str(p.raw_value) for p in params]
4907
4908 def GetParameterErrors(self,page_index): # Return list of errors associated with a given page
4909 params = self.GetParametersByPageIndex(page_index)
4910 return [str("\n".join(p.error_list)) for p in params]
4911
4912 def GetParameterTypes(self, page_index): # Return list of units associated with a given page
4913 params = self.GetParametersByPageIndex(page_index)
4914 return [str(p.units) for p in params]
4915
4916 def GetParameterHints(self, page_index): # Return a list of units associated with a given page
4917 params = self.GetParametersByPageIndex(page_index)
4918 return [str(p.hint) for p in params]
4919
4920 def GetParameterDesignators(self, page_index): # Return a list of designators associated with a given page
4921 params = self.GetParametersByPageIndex(page_index)
4922 return [str(p.designator) for p in params]
4923
4924 def SetParameterValues(self, page_index, list_of_values): # Update values on a given page
4925
4926 params = self.GetParametersByPageIndex(page_index)
4927
4928 for i, param in enumerate(params):
4929 if i >= len(list_of_values):
4930 break
4931 param.SetValue(list_of_values[i])
4932
4933 def GetFootprint( self ):
4934 self.BuildFootprint()
4935 return self.module
4936
4938 return
4939
4940 def GetBuildMessages( self ):
4941 return self.buildmessages
4942
4943 def Show(self):
4944 text = "Footprint Wizard Name: {name}\n".format(name=self.GetName())
4945 text += "Footprint Wizard Description: {desc}\n".format(desc=self.GetDescription())
4946
4947 n_pages = self.GetNumParameterPages()
4948
4949 text += "Pages: {n}\n".format(n=n_pages)
4950
4951 for i in range(n_pages):
4952 name = self.GetParameterPageName(i)
4953
4954 params = self.GetParametersByPageName(name)
4955
4956 text += "{name}\n".format(name=name)
4957
4958 for j in range(len(params)):
4959 text += ("\t{param}{err}\n".format(
4960 param = str(params[j]),
4961 err = ' *' if len(params[j].error_list) > 0 else ''
4962 ))
4963
4964 if self.AnyErrors():
4965 text += " * Errors exist for these parameters"
4966
4967 return text
4968
4970 def __init__( self ):
4971 KiCadPlugin.__init__( self )
4975 self.defaults()
4976
4977 def defaults( self ):
4978 self.name = "Undefined Action plugin"
4979 self.category = "Undefined"
4980 self.description = ""
4981
4982 def GetName( self ):
4983 return self.name
4984
4985 def GetCategoryName( self ):
4986 return self.category
4987
4988 def GetDescription( self ):
4989 return self.description
4990
4992 return self.show_toolbar_button
4993
4994 def GetIconFileName( self, dark ):
4995 if dark and self.dark_icon_file_name:
4996 return self.dark_icon_file_name
4997 else:
4998 return self.icon_file_name
4999
5000 def Run(self):
5001 return
5002
5003
5004class VECTOR2I(object):
5005 r"""Proxy of C++ VECTOR2< int > class."""
5006
5007 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5008 __repr__ = _swig_repr
5009 x = property(_pcbnew.VECTOR2I_x_get, _pcbnew.VECTOR2I_x_set, doc=r"""x : int""")
5010 y = property(_pcbnew.VECTOR2I_y_get, _pcbnew.VECTOR2I_y_set, doc=r"""y : int""")
5011
5012 def __init__(self, *args):
5013 r"""
5014 __init__(VECTOR2I self) -> VECTOR2I
5015 __init__(VECTOR2I self, wxPoint aPoint) -> VECTOR2I
5016 __init__(VECTOR2I self, wxSize aSize) -> VECTOR2I
5017 __init__(VECTOR2I self, int x, int y) -> VECTOR2I
5018 __init__(VECTOR2I self, VECTOR2I aVec) -> VECTOR2I
5019 """
5020 _pcbnew.VECTOR2I_swiginit(self, _pcbnew.new_VECTOR2I(*args))
5021
5022 def getWxPoint(self):
5023 r"""getWxPoint(VECTOR2I self) -> wxPoint"""
5024 return _pcbnew.VECTOR2I_getWxPoint(self)
5025
5026 def getWxSize(self):
5027 r"""getWxSize(VECTOR2I self) -> wxSize"""
5028 return _pcbnew.VECTOR2I_getWxSize(self)
5029
5030 def EuclideanNorm(self):
5031 r"""EuclideanNorm(VECTOR2I self) -> int"""
5032 return _pcbnew.VECTOR2I_EuclideanNorm(self)
5033
5035 r"""SquaredEuclideanNorm(VECTOR2I self) -> VECTOR2< int >::extended_type"""
5036 return _pcbnew.VECTOR2I_SquaredEuclideanNorm(self)
5037
5038 def Perpendicular(self):
5039 r"""Perpendicular(VECTOR2I self) -> VECTOR2I"""
5040 return _pcbnew.VECTOR2I_Perpendicular(self)
5041
5042 def Resize(self, aNewLength):
5043 r"""Resize(VECTOR2I self, int aNewLength) -> VECTOR2I"""
5044 return _pcbnew.VECTOR2I_Resize(self, aNewLength)
5045
5046 def Format(self):
5047 r"""Format(VECTOR2I self) -> string"""
5048 return _pcbnew.VECTOR2I_Format(self)
5049
5050 def Cross(self, aVector):
5051 r"""Cross(VECTOR2I self, VECTOR2I aVector) -> VECTOR2< int >::extended_type"""
5052 return _pcbnew.VECTOR2I_Cross(self, aVector)
5053
5054 def Dot(self, aVector):
5055 r"""Dot(VECTOR2I self, VECTOR2I aVector) -> VECTOR2< int >::extended_type"""
5056 return _pcbnew.VECTOR2I_Dot(self, aVector)
5057
5058 def __add__(self, *args):
5059 r"""
5060 __add__(VECTOR2I self, VECTOR2I aVector) -> VECTOR2I
5061 __add__(VECTOR2I self, int const & aScalar) -> VECTOR2I
5062 """
5063 return _pcbnew.VECTOR2I___add__(self, *args)
5064
5065 def __imul__(self, *args):
5066 r"""
5067 __imul__(VECTOR2I self, VECTOR2I aVector) -> VECTOR2I
5068 __imul__(VECTOR2I self, int const & aScalar) -> VECTOR2I
5069 """
5070 return _pcbnew.VECTOR2I___imul__(self, *args)
5071
5072 def __iadd__(self, *args):
5073 r"""
5074 __iadd__(VECTOR2I self, VECTOR2I aVector) -> VECTOR2I
5075 __iadd__(VECTOR2I self, int const & aScalar) -> VECTOR2I
5076 """
5077 return _pcbnew.VECTOR2I___iadd__(self, *args)
5078
5079 def __sub__(self, *args):
5080 r"""
5081 __sub__(VECTOR2I self, VECTOR2I aVector) -> VECTOR2I
5082 __sub__(VECTOR2I self, int const & aScalar) -> VECTOR2I
5083 """
5084 return _pcbnew.VECTOR2I___sub__(self, *args)
5085
5086 def __isub__(self, *args):
5087 r"""
5088 __isub__(VECTOR2I self, VECTOR2I aVector) -> VECTOR2I
5089 __isub__(VECTOR2I self, int const & aScalar) -> VECTOR2I
5090 """
5091 return _pcbnew.VECTOR2I___isub__(self, *args)
5092
5093 def __neg__(self):
5094 r"""__neg__(VECTOR2I self) -> VECTOR2I"""
5095 return _pcbnew.VECTOR2I___neg__(self)
5096
5097 def __mul__(self, *args):
5098 r"""
5099 __mul__(VECTOR2I self, VECTOR2I aVector) -> VECTOR2< int >::extended_type
5100 __mul__(VECTOR2I self, int const & aFactor) -> VECTOR2I
5101 """
5102 return _pcbnew.VECTOR2I___mul__(self, *args)
5103
5104 def __truediv__(self, *args):
5105 return _pcbnew.VECTOR2I___truediv__(self, *args)
5106 __div__ = __truediv__
5107
5108
5109
5110 def __eq__(self, aVector):
5111 r"""__eq__(VECTOR2I self, VECTOR2I aVector) -> bool"""
5112 return _pcbnew.VECTOR2I___eq__(self, aVector)
5113
5114 def __ne__(self, aVector):
5115 r"""__ne__(VECTOR2I self, VECTOR2I aVector) -> bool"""
5116 return _pcbnew.VECTOR2I___ne__(self, aVector)
5117
5118 def __lt__(self, aVector):
5119 r"""__lt__(VECTOR2I self, VECTOR2I aVector) -> bool"""
5120 return _pcbnew.VECTOR2I___lt__(self, aVector)
5121
5122 def __le__(self, aVector):
5123 r"""__le__(VECTOR2I self, VECTOR2I aVector) -> bool"""
5124 return _pcbnew.VECTOR2I___le__(self, aVector)
5125
5126 def __gt__(self, aVector):
5127 r"""__gt__(VECTOR2I self, VECTOR2I aVector) -> bool"""
5128 return _pcbnew.VECTOR2I___gt__(self, aVector)
5129
5130 def __ge__(self, aVector):
5131 r"""__ge__(VECTOR2I self, VECTOR2I aVector) -> bool"""
5132 return _pcbnew.VECTOR2I___ge__(self, aVector)
5133
5134 def Set(self, x, y):
5135 r"""Set(VECTOR2I self, long x, long y)"""
5136 return _pcbnew.VECTOR2I_Set(self, x, y)
5137
5138 def Get(self):
5139 r"""Get(VECTOR2I self) -> PyObject *"""
5140 return _pcbnew.VECTOR2I_Get(self)
5141
5142 def __eq__(self,other): return (self.x==other.x and self.y==other.y)
5143 def __ne__(self,other): return not (self==other)
5144 def __str__(self): return str(self.Get())
5145 def __repr__(self): return 'VECTOR2I'+str(self.Get())
5146 def __len__(self): return len(self.Get())
5147 def __getitem__(self, index): return self.Get()[index]
5148 def __setitem__(self, index, val):
5149 if index == 0:
5150 self.x = val
5151 elif index == 1:
5152 self.y = val
5153 else:
5154 raise IndexError
5155 def __nonzero__(self): return self.Get() != (0,0)
5156
5157
5158 __swig_destroy__ = _pcbnew.delete_VECTOR2I
5159
5160# Register VECTOR2I in _pcbnew:
5161_pcbnew.VECTOR2I_swigregister(VECTOR2I)
5162
5164 r"""Proxy of C++ VECTOR2_TRAITS< int > class."""
5165
5166 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5167 __repr__ = _swig_repr
5168
5169 def __init__(self):
5170 r"""__init__(VECTOR2I_EXTENDED_TYPE self) -> VECTOR2I_EXTENDED_TYPE"""
5171 _pcbnew.VECTOR2I_EXTENDED_TYPE_swiginit(self, _pcbnew.new_VECTOR2I_EXTENDED_TYPE())
5172 __swig_destroy__ = _pcbnew.delete_VECTOR2I_EXTENDED_TYPE
5173
5174# Register VECTOR2I_EXTENDED_TYPE in _pcbnew:
5175_pcbnew.VECTOR2I_EXTENDED_TYPE_swigregister(VECTOR2I_EXTENDED_TYPE)
5176
5178 r"""Proxy of C++ VECTOR3< double > class."""
5179
5180 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5181 __repr__ = _swig_repr
5182 ECOORD_MAX = _pcbnew.VECTOR3D_ECOORD_MAX
5183
5184 ECOORD_MIN = _pcbnew.VECTOR3D_ECOORD_MIN
5185
5186 x = property(_pcbnew.VECTOR3D_x_get, _pcbnew.VECTOR3D_x_set, doc=r"""x : double""")
5187 y = property(_pcbnew.VECTOR3D_y_get, _pcbnew.VECTOR3D_y_set, doc=r"""y : double""")
5188 z = property(_pcbnew.VECTOR3D_z_get, _pcbnew.VECTOR3D_z_set, doc=r"""z : double""")
5189
5190 def __init__(self, *args):
5191 r"""
5192 __init__(VECTOR3D self) -> VECTOR3D
5193 __init__(VECTOR3D self, double x, double y, double z) -> VECTOR3D
5194 """
5195 _pcbnew.VECTOR3D_swiginit(self, _pcbnew.new_VECTOR3D(*args))
5196
5197 def Cross(self, aVector):
5198 r"""Cross(VECTOR3D self, VECTOR3D aVector) -> VECTOR3D"""
5199 return _pcbnew.VECTOR3D_Cross(self, aVector)
5200
5201 def Dot(self, aVector):
5202 r"""Dot(VECTOR3D self, VECTOR3D aVector) -> VECTOR3< double >::extended_type"""
5203 return _pcbnew.VECTOR3D_Dot(self, aVector)
5204
5205 def EuclideanNorm(self):
5206 r"""EuclideanNorm(VECTOR3D self) -> double"""
5207 return _pcbnew.VECTOR3D_EuclideanNorm(self)
5208
5209 def Normalize(self):
5210 r"""Normalize(VECTOR3D self) -> VECTOR3D"""
5211 return _pcbnew.VECTOR3D_Normalize(self)
5212
5213 def __eq__(self, aVector):
5214 r"""__eq__(VECTOR3D self, VECTOR3D aVector) -> bool"""
5215 return _pcbnew.VECTOR3D___eq__(self, aVector)
5216
5217 def __ne__(self, aVector):
5218 r"""__ne__(VECTOR3D self, VECTOR3D aVector) -> bool"""
5219 return _pcbnew.VECTOR3D___ne__(self, aVector)
5220
5221 def __imul__(self, val):