1 // Copyright (C) 2014-2024 CEA, EDF
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
25 #include "SketchAPI_swig.h"
26 #include "ModelHighAPI_swig.h"
28 // fix for SWIG v4.1.1
29 #if PY_VERSION_HEX >= 0x03020000
30 # define SWIGPY_SLICEOBJECT PyObject
32 # define SWIGPY_SLICEOBJECT PySliceObject
35 // fix for SWIG v2.0.4
36 #define SWIGPY_SLICE_ARG(obj) ((SWIGPY_SLICEOBJECT*)(obj))
37 #define SWIGPY_UNICODE_ARG(obj) ((PyObject*) (obj))
42 // import other modules
45 %import "ModelHighAPI.i"
47 // to avoid error on this
48 #define SKETCHAPI_EXPORT
50 // standard definitions
53 // function with named parameters
54 %feature("kwargs") SketchAPI_BSpline::controlPoles;
55 %feature("kwargs") SketchAPI_BSpline::controlPolygon;
56 %feature("kwargs") SketchAPI_Ellipse::construction;
57 %feature("kwargs") SketchAPI_EllipticArc::construction;
58 %feature("kwargs") SketchAPI_Sketch::addApproximation;
59 %feature("kwargs") SketchAPI_Sketch::addInterpolation;
60 %feature("kwargs") SketchAPI_Sketch::addProjection;
61 %feature("kwargs") SketchAPI_Sketch::addSpline;
62 %feature("kwargs") SketchAPI_Sketch::setAngle;
65 %shared_ptr(SketchAPI_Arc)
66 %shared_ptr(SketchAPI_MacroArc)
67 %shared_ptr(SketchAPI_Circle)
68 %shared_ptr(SketchAPI_MacroCircle)
69 %shared_ptr(SketchAPI_Ellipse)
70 %shared_ptr(SketchAPI_MacroEllipse)
71 %shared_ptr(SketchAPI_EllipticArc)
72 %shared_ptr(SketchAPI_MacroEllipticArc)
73 %shared_ptr(SketchAPI_BSpline)
74 %shared_ptr(SketchAPI_BSplinePeriodic)
75 %shared_ptr(SketchAPI_Constraint)
76 %shared_ptr(SketchAPI_ConstraintAngle)
77 %shared_ptr(SketchAPI_IntersectionPoint)
78 %shared_ptr(SketchAPI_Line)
79 %shared_ptr(SketchAPI_Mirror)
80 %shared_ptr(SketchAPI_Offset)
81 %shared_ptr(SketchAPI_Sketch)
82 %shared_ptr(SketchAPI_SketchEntity)
83 %shared_ptr(SketchAPI_Point)
84 %shared_ptr(SketchAPI_MacroMiddlePoint)
85 %shared_ptr(SketchAPI_Projection)
86 %shared_ptr(SketchAPI_Rectangle)
87 %shared_ptr(SketchAPI_Rotation)
88 %shared_ptr(SketchAPI_Translation)
91 %template(InterfaceList) std::list<std::shared_ptr<ModelHighAPI_Interface> >;
92 %template(EntityList) std::list<std::shared_ptr<SketchAPI_SketchEntity> >;
93 %template(SketchPointList) std::list<std::shared_ptr<SketchAPI_Point> >;
94 %template(GeomPnt2dList) std::list<std::shared_ptr<GeomAPI_Pnt2d> >;
96 %template(PointRefAttrPair) std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>;
98 %template(RectangleAndPoint) std::pair<std::shared_ptr<SketchAPI_Rectangle>, std::shared_ptr<SketchAPI_Point>>;
101 %typecheck(SWIG_TYPECHECK_POINTER) std::shared_ptr<ModelAPI_Feature>, const std::shared_ptr<ModelAPI_Feature> & {
102 std::shared_ptr<ModelAPI_Feature> * temp_feature;
103 std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
105 if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_feature, $descriptor(std::shared_ptr<ModelAPI_Feature> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
112 if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
113 if (temp_interface) {
122 %typemap(in) const std::shared_ptr<ModelAPI_Feature> & (std::shared_ptr<ModelAPI_Feature> temp) {
123 std::shared_ptr<ModelAPI_Feature> * temp_feature;
124 std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
126 if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_feature, $descriptor(std::shared_ptr<ModelAPI_Feature> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
128 PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_Interface.");
131 temp = (*temp_feature);
132 if (newmem & SWIG_CAST_NEW_MEMORY) {
137 if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
138 if (!temp_interface) {
139 PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_Interface.");
142 temp = (*temp_interface)->feature();
143 if (newmem & SWIG_CAST_NEW_MEMORY) {
144 delete temp_interface;
148 if ((SWIG_ConvertPtr($input, (void **)&$1, $1_descriptor, SWIG_POINTER_EXCEPTION)) == 0) {
150 PyErr_SetString(PyExc_ValueError, "argument must be ModelHighAPI_Interface.");
155 %typemap(in) const std::list<std::shared_ptr<ModelAPI_Object> > & (std::list<std::shared_ptr<ModelAPI_Object> > temp) {
156 std::shared_ptr<ModelAPI_Object> * temp_object;
157 std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
158 ModelHighAPI_Selection* temp_selection;
160 if (PySequence_Check($input)) {
161 for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
162 PyObject * item = PySequence_GetItem($input, i);
163 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_selection, $descriptor(ModelHighAPI_Selection*), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
164 if (!temp_selection) {
165 PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_Interface, ModelHighAPI_Selection or ModelAPI_Object.");
168 temp.push_back(temp_selection->resultSubShapePair().first);
169 if (newmem & SWIG_CAST_NEW_MEMORY) {
170 delete temp_selection;
173 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_object, $descriptor(std::shared_ptr<ModelAPI_Object> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
175 PyErr_SetString(PyExc_TypeError, "argument must be list of ModelHighAPI_Interface, ModelHighAPI_Selection or ModelAPI_Object.");
178 temp.push_back(*temp_object);
179 if (newmem & SWIG_CAST_NEW_MEMORY) {
183 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
184 if (!temp_interface) {
185 PyErr_SetString(PyExc_TypeError, "argument must be list of ModelHighAPI_Interface, ModelHighAPI_Selection or ModelAPI_Object.");
188 temp.push_back((*temp_interface)->defaultResult());
189 if (newmem & SWIG_CAST_NEW_MEMORY) {
190 delete temp_interface;
197 PyErr_SetString(PyExc_ValueError, "argument must be list of ModelHighAPI_Interface or ModelAPI_Object.");
202 %typecheck(SWIG_TYPECHECK_POINTER) std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>, const std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> & {
203 std::shared_ptr<ModelAPI_Attribute> * temp_attribute;
204 std::shared_ptr<ModelAPI_Object> * temp_object;
205 std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
206 ModelHighAPI_Selection* temp_selection;
207 std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>* temp_pair;
208 std::shared_ptr<GeomAPI_Pnt2d> * temp_point;
209 ModelHighAPI_RefAttr temp_refattr;
211 std::list<PyObject*> temp_inputlist;
212 if (PySequence_Check($input)) {
213 for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
214 PyObject * temp = PySequence_GetItem($input, i);
215 temp_inputlist.push_back(temp);
218 temp_inputlist.push_back($input);
222 for (std::list<PyObject*>::iterator it = temp_inputlist.begin(); it != temp_inputlist.end() && $1; ++it) {
223 PyObject* item = *it;
225 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_selection, $descriptor(ModelHighAPI_Selection*), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
226 if (temp_selection) {
232 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_attribute, $descriptor(std::shared_ptr<ModelAPI_Attribute> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
233 if (temp_attribute) {
239 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_object, $descriptor(std::shared_ptr<ModelAPI_Object> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
246 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
247 if (temp_interface) {
253 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_pair, $descriptor(std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
260 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_point, $descriptor(std::shared_ptr<GeomAPI_Pnt2d> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
272 %typemap(in) const std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> & (std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> temp) {
273 std::shared_ptr<ModelAPI_Attribute> * temp_attribute;
274 std::shared_ptr<ModelAPI_Object> * temp_object;
275 std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
276 ModelHighAPI_Selection* temp_selection;
277 std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>* temp_pair;
278 std::shared_ptr<GeomAPI_Pnt2d> * temp_point = 0;
279 ModelHighAPI_RefAttr temp_refattr;
281 std::list<PyObject*> temp_inputlist;
282 if (PySequence_Check($input)) {
283 for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
284 PyObject * temp = PySequence_GetItem($input, i);
285 temp_inputlist.push_back(temp);
288 temp_inputlist.push_back($input);
291 for (std::list<PyObject*>::iterator it = temp_inputlist.begin(); it != temp_inputlist.end(); ++it) {
292 PyObject* item = *it;
294 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_selection, $descriptor(ModelHighAPI_Selection*), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
295 if (temp_selection) {
296 temp_refattr = ModelHighAPI_RefAttr(std::shared_ptr<ModelAPI_Object>(temp_selection->resultSubShapePair().first));
297 if (newmem & SWIG_CAST_NEW_MEMORY) {
298 delete temp_selection;
302 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_attribute, $descriptor(std::shared_ptr<ModelAPI_Attribute> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
303 if (temp_attribute) {
304 temp_refattr = ModelHighAPI_RefAttr(*temp_attribute);
305 if (newmem & SWIG_CAST_NEW_MEMORY) {
306 delete temp_attribute;
310 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_object, $descriptor(std::shared_ptr<ModelAPI_Object> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
312 temp_refattr = ModelHighAPI_RefAttr(*temp_object);
313 if (newmem & SWIG_CAST_NEW_MEMORY) {
318 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
319 if (temp_interface) {
320 temp_refattr = ModelHighAPI_RefAttr(*temp_interface);
321 if (newmem & SWIG_CAST_NEW_MEMORY) {
322 delete temp_interface;
326 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_pair, $descriptor(std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
328 temp_point = &temp_pair->first;
329 temp_refattr = temp_pair->second;
330 if (newmem & SWIG_CAST_NEW_MEMORY) {
335 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_point, $descriptor(std::shared_ptr<GeomAPI_Pnt2d> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
340 if (temp_point || !temp_refattr.isEmpty()) {
342 temp = std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>(*temp_point, temp_refattr);
344 temp = std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>(std::shared_ptr<GeomAPI_Pnt2d>(), temp_refattr);
346 if (temp_point && (newmem & SWIG_CAST_NEW_MEMORY)) {
351 PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_RefAttr, ModelHighAPI_Selection, ModelHighAPI_Interface, ModelAPI_Attribute or ModelAPI_Object.");
356 // fix compilarion error: 'res*' was not declared in this scope
357 %typemap(freearg) const std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> & {}
360 %typemap(in) const std::list<std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> > & (std::list<std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> > temp) {
361 if (PySequence_Check($input)) {
362 for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
363 PyObject * item = PySequence_GetItem($input, i);
365 std::list<PyObject*> temp_inputlist;
366 if (PySequence_Check(item)) {
367 for (Py_ssize_t i = 0; i < PySequence_Size(item); ++i) {
368 PyObject * tmpItem = PySequence_GetItem(item, i);
369 temp_inputlist.push_back(tmpItem);
372 temp_inputlist.push_back(item);
375 std::shared_ptr<ModelAPI_Attribute> * temp_attribute = 0;
376 std::shared_ptr<ModelAPI_Object> * temp_object = 0;
377 std::shared_ptr<ModelHighAPI_Interface> * temp_interface = 0;
378 ModelHighAPI_Selection* temp_selection = 0;
379 std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>* temp_pair = 0;
380 std::shared_ptr<GeomAPI_Pnt2d> * temp_point = 0;
381 ModelHighAPI_RefAttr temp_refattr;
385 for (std::list<PyObject*>::iterator it = temp_inputlist.begin(); it != temp_inputlist.end(); ++it) {
386 PyObject* item = *it;
388 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_selection, $descriptor(ModelHighAPI_Selection*), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
389 if (temp_selection) {
390 temp_refattr = ModelHighAPI_RefAttr(std::shared_ptr<ModelAPI_Object>(temp_selection->resultSubShapePair().first));
391 if (newmem & SWIG_CAST_NEW_MEMORY) {
392 delete temp_selection;
396 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_attribute, $descriptor(std::shared_ptr<ModelAPI_Attribute> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
397 if (temp_attribute) {
398 temp_refattr = ModelHighAPI_RefAttr(*temp_attribute);
399 if (newmem & SWIG_CAST_NEW_MEMORY) {
400 delete temp_attribute;
404 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_object, $descriptor(std::shared_ptr<ModelAPI_Object> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
406 temp_refattr = ModelHighAPI_RefAttr(*temp_object);
407 if (newmem & SWIG_CAST_NEW_MEMORY) {
412 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
413 if (temp_interface) {
414 temp_refattr = ModelHighAPI_RefAttr(*temp_interface);
415 if (newmem & SWIG_CAST_NEW_MEMORY) {
416 delete temp_interface;
420 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_pair, $descriptor(std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
422 temp_point = &temp_pair->first;
423 temp_refattr = temp_pair->second;
424 if (newmem & SWIG_CAST_NEW_MEMORY) {
429 if (PyTuple_Check(item)) {
430 if (PyTuple_Size(item) == 2) {
431 double x = (double)PyFloat_AsDouble(PySequence_GetItem(item, 0));
432 double y = (double)PyFloat_AsDouble(PySequence_GetItem(item, 1));
433 temp_point = new std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(x, y));
436 PyErr_SetString(PyExc_TypeError, "argument must a list of 2D points.");
440 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_point, $descriptor(std::shared_ptr<GeomAPI_Pnt2d> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
443 if (PyNumber_Check(item)) {
444 PyObject* item1 = *(++it);
445 if (PyNumber_Check(item1)) {
446 double x = (double)PyFloat_AsDouble(item);
447 double y = (double)PyFloat_AsDouble(item1);
448 temp_point = new std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(x, y));
451 PyErr_SetString(PyExc_TypeError, "argument must a list of 2D points.");
457 if (temp_point || !temp_refattr.isEmpty()) {
459 temp.push_back(std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>(*temp_point, temp_refattr));
461 temp.push_back(std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>(std::shared_ptr<GeomAPI_Pnt2d>(), temp_refattr));
463 if (temp_point && ((newmem & SWIG_CAST_NEW_MEMORY) || clearmem)) {
467 PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_RefAttr, ModelHighAPI_Selection, ModelHighAPI_Interface, ModelAPI_Attribute or ModelAPI_Object.");
474 PyErr_SetString(PyExc_ValueError, "argument must be a tuple of lists.");
479 %typecheck(SWIG_TYPECHECK_POINTER) std::list<std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> >, const std::list<std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> >& {
481 if (PySequence_Check($input)) {
482 for (Py_ssize_t i = 0; i < PySequence_Size($input) && $1; ++i) {
483 PyObject * item = PySequence_GetItem($input, i);
485 std::list<PyObject*> temp_inputlist;
486 if (PySequence_Check(item)) {
487 for (Py_ssize_t i = 0; i < PySequence_Size(item); ++i) {
488 PyObject * tmpItem = PySequence_GetItem(item, i);
489 temp_inputlist.push_back(tmpItem);
492 temp_inputlist.push_back(item);
495 std::shared_ptr<ModelAPI_Attribute> * temp_attribute = 0;
496 std::shared_ptr<ModelAPI_Object> * temp_object = 0;
497 std::shared_ptr<ModelHighAPI_Interface> * temp_interface = 0;
498 ModelHighAPI_Selection* temp_selection = 0;
499 std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>* temp_pair = 0;
500 std::shared_ptr<GeomAPI_Pnt2d> * temp_point = 0;
501 ModelHighAPI_RefAttr temp_refattr;
504 for (std::list<PyObject*>::iterator it = temp_inputlist.begin(); it != temp_inputlist.end() && $1; ++it) {
505 PyObject* item = *it;
507 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_selection, $descriptor(ModelHighAPI_Selection*), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
508 if (temp_selection) {
514 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_attribute, $descriptor(std::shared_ptr<ModelAPI_Attribute> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
515 if (temp_attribute) {
521 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_object, $descriptor(std::shared_ptr<ModelAPI_Object> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
528 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
529 if (temp_interface) {
535 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_pair, $descriptor(std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
542 if (PyTuple_Check(item)) {
543 if (PyTuple_Size(item) == 2) {
544 if (PyNumber_Check(PySequence_GetItem(item, 0)) && PyNumber_Check(PySequence_GetItem(item, 1))) {
553 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_point, $descriptor(std::shared_ptr<GeomAPI_Pnt2d> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
560 if (PyNumber_Check(item)) {
573 // fix compilarion error: 'res*' was not declared in this scope
574 %typemap(freearg) const std::list<std::shared_ptr<GeomAPI_Pnt2d> > & {}
577 // all supported interfaces (the order is very important according dependencies: base class first)
578 %include "SketchAPI_SketchEntity.h"
579 %include "SketchAPI_Point.h"
580 %include "SketchAPI_MacroMiddlePoint.h"
581 %include "SketchAPI_IntersectionPoint.h"
582 %include "SketchAPI_Line.h"
583 %include "SketchAPI_Circle.h"
584 %include "SketchAPI_MacroCircle.h"
585 %include "SketchAPI_Arc.h"
586 %include "SketchAPI_MacroArc.h"
587 %include "SketchAPI_Ellipse.h"
588 %include "SketchAPI_MacroEllipse.h"
589 %include "SketchAPI_EllipticArc.h"
590 %include "SketchAPI_MacroEllipticArc.h"
591 %include "SketchAPI_BSpline.h"
592 %include "SketchAPI_Projection.h"
593 %include "SketchAPI_Mirror.h"
594 %include "SketchAPI_Offset.h"
595 %include "SketchAPI_Translation.h"
596 %include "SketchAPI_Rectangle.h"
597 %include "SketchAPI_Rotation.h"
598 %include "SketchAPI_Sketch.h"
599 %include "SketchAPI_Constraint.h"
600 %include "SketchAPI_ConstraintAngle.h"