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