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 %typecheck(SWIG_TYPECHECK_POINTER) std::shared_ptr<ModelAPI_Feature>, const std::shared_ptr<ModelAPI_Feature> & {
99 std::shared_ptr<ModelAPI_Feature> * temp_feature;
100 std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
102 if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_feature, $descriptor(std::shared_ptr<ModelAPI_Feature> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
109 if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
110 if (temp_interface) {
119 %typemap(in) const std::shared_ptr<ModelAPI_Feature> & (std::shared_ptr<ModelAPI_Feature> temp) {
120 std::shared_ptr<ModelAPI_Feature> * temp_feature;
121 std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
123 if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_feature, $descriptor(std::shared_ptr<ModelAPI_Feature> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
125 PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_Interface.");
128 temp = (*temp_feature);
129 if (newmem & SWIG_CAST_NEW_MEMORY) {
134 if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
135 if (!temp_interface) {
136 PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_Interface.");
139 temp = (*temp_interface)->feature();
140 if (newmem & SWIG_CAST_NEW_MEMORY) {
141 delete temp_interface;
145 if ((SWIG_ConvertPtr($input, (void **)&$1, $1_descriptor, SWIG_POINTER_EXCEPTION)) == 0) {
147 PyErr_SetString(PyExc_ValueError, "argument must be ModelHighAPI_Interface.");
152 %typemap(in) const std::list<std::shared_ptr<ModelAPI_Object> > & (std::list<std::shared_ptr<ModelAPI_Object> > temp) {
153 std::shared_ptr<ModelAPI_Object> * temp_object;
154 std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
155 ModelHighAPI_Selection* temp_selection;
157 if (PySequence_Check($input)) {
158 for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
159 PyObject * item = PySequence_GetItem($input, i);
160 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_selection, $descriptor(ModelHighAPI_Selection*), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
161 if (!temp_selection) {
162 PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_Interface, ModelHighAPI_Selection or ModelAPI_Object.");
165 temp.push_back(temp_selection->resultSubShapePair().first);
166 if (newmem & SWIG_CAST_NEW_MEMORY) {
167 delete temp_selection;
170 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_object, $descriptor(std::shared_ptr<ModelAPI_Object> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
172 PyErr_SetString(PyExc_TypeError, "argument must be list of ModelHighAPI_Interface, ModelHighAPI_Selection or ModelAPI_Object.");
175 temp.push_back(*temp_object);
176 if (newmem & SWIG_CAST_NEW_MEMORY) {
180 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
181 if (!temp_interface) {
182 PyErr_SetString(PyExc_TypeError, "argument must be list of ModelHighAPI_Interface, ModelHighAPI_Selection or ModelAPI_Object.");
185 temp.push_back((*temp_interface)->defaultResult());
186 if (newmem & SWIG_CAST_NEW_MEMORY) {
187 delete temp_interface;
194 PyErr_SetString(PyExc_ValueError, "argument must be list of ModelHighAPI_Interface or ModelAPI_Object.");
199 %typecheck(SWIG_TYPECHECK_POINTER) std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>, const std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> & {
200 std::shared_ptr<ModelAPI_Attribute> * temp_attribute;
201 std::shared_ptr<ModelAPI_Object> * temp_object;
202 std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
203 ModelHighAPI_Selection* temp_selection;
204 std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>* temp_pair;
205 std::shared_ptr<GeomAPI_Pnt2d> * temp_point;
206 ModelHighAPI_RefAttr temp_refattr;
208 std::list<PyObject*> temp_inputlist;
209 if (PySequence_Check($input)) {
210 for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
211 PyObject * temp = PySequence_GetItem($input, i);
212 temp_inputlist.push_back(temp);
215 temp_inputlist.push_back($input);
219 for (std::list<PyObject*>::iterator it = temp_inputlist.begin(); it != temp_inputlist.end() && $1; ++it) {
220 PyObject* item = *it;
222 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_selection, $descriptor(ModelHighAPI_Selection*), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
223 if (temp_selection) {
229 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_attribute, $descriptor(std::shared_ptr<ModelAPI_Attribute> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
230 if (temp_attribute) {
236 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_object, $descriptor(std::shared_ptr<ModelAPI_Object> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
243 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
244 if (temp_interface) {
250 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_pair, $descriptor(std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
257 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_point, $descriptor(std::shared_ptr<GeomAPI_Pnt2d> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
269 %typemap(in) const std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> & (std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> temp) {
270 std::shared_ptr<ModelAPI_Attribute> * temp_attribute;
271 std::shared_ptr<ModelAPI_Object> * temp_object;
272 std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
273 ModelHighAPI_Selection* temp_selection;
274 std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>* temp_pair;
275 std::shared_ptr<GeomAPI_Pnt2d> * temp_point = 0;
276 ModelHighAPI_RefAttr temp_refattr;
278 std::list<PyObject*> temp_inputlist;
279 if (PySequence_Check($input)) {
280 for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
281 PyObject * temp = PySequence_GetItem($input, i);
282 temp_inputlist.push_back(temp);
285 temp_inputlist.push_back($input);
288 for (std::list<PyObject*>::iterator it = temp_inputlist.begin(); it != temp_inputlist.end(); ++it) {
289 PyObject* item = *it;
291 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_selection, $descriptor(ModelHighAPI_Selection*), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
292 if (temp_selection) {
293 temp_refattr = ModelHighAPI_RefAttr(std::shared_ptr<ModelAPI_Object>(temp_selection->resultSubShapePair().first));
294 if (newmem & SWIG_CAST_NEW_MEMORY) {
295 delete temp_selection;
299 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_attribute, $descriptor(std::shared_ptr<ModelAPI_Attribute> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
300 if (temp_attribute) {
301 temp_refattr = ModelHighAPI_RefAttr(*temp_attribute);
302 if (newmem & SWIG_CAST_NEW_MEMORY) {
303 delete temp_attribute;
307 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_object, $descriptor(std::shared_ptr<ModelAPI_Object> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
309 temp_refattr = ModelHighAPI_RefAttr(*temp_object);
310 if (newmem & SWIG_CAST_NEW_MEMORY) {
315 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
316 if (temp_interface) {
317 temp_refattr = ModelHighAPI_RefAttr(*temp_interface);
318 if (newmem & SWIG_CAST_NEW_MEMORY) {
319 delete temp_interface;
323 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_pair, $descriptor(std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
325 temp_point = &temp_pair->first;
326 temp_refattr = temp_pair->second;
327 if (newmem & SWIG_CAST_NEW_MEMORY) {
332 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_point, $descriptor(std::shared_ptr<GeomAPI_Pnt2d> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
337 if (temp_point || !temp_refattr.isEmpty()) {
339 temp = std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>(*temp_point, temp_refattr);
341 temp = std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>(std::shared_ptr<GeomAPI_Pnt2d>(), temp_refattr);
343 if (temp_point && (newmem & SWIG_CAST_NEW_MEMORY)) {
348 PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_RefAttr, ModelHighAPI_Selection, ModelHighAPI_Interface, ModelAPI_Attribute or ModelAPI_Object.");
353 // fix compilarion error: 'res*' was not declared in this scope
354 %typemap(freearg) const std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> & {}
357 %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) {
358 if (PySequence_Check($input)) {
359 for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
360 PyObject * item = PySequence_GetItem($input, i);
362 std::list<PyObject*> temp_inputlist;
363 if (PySequence_Check(item)) {
364 for (Py_ssize_t i = 0; i < PySequence_Size(item); ++i) {
365 PyObject * tmpItem = PySequence_GetItem(item, i);
366 temp_inputlist.push_back(tmpItem);
369 temp_inputlist.push_back(item);
372 std::shared_ptr<ModelAPI_Attribute> * temp_attribute = 0;
373 std::shared_ptr<ModelAPI_Object> * temp_object = 0;
374 std::shared_ptr<ModelHighAPI_Interface> * temp_interface = 0;
375 ModelHighAPI_Selection* temp_selection = 0;
376 std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>* temp_pair = 0;
377 std::shared_ptr<GeomAPI_Pnt2d> * temp_point = 0;
378 ModelHighAPI_RefAttr temp_refattr;
382 for (std::list<PyObject*>::iterator it = temp_inputlist.begin(); it != temp_inputlist.end(); ++it) {
383 PyObject* item = *it;
385 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_selection, $descriptor(ModelHighAPI_Selection*), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
386 if (temp_selection) {
387 temp_refattr = ModelHighAPI_RefAttr(std::shared_ptr<ModelAPI_Object>(temp_selection->resultSubShapePair().first));
388 if (newmem & SWIG_CAST_NEW_MEMORY) {
389 delete temp_selection;
393 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_attribute, $descriptor(std::shared_ptr<ModelAPI_Attribute> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
394 if (temp_attribute) {
395 temp_refattr = ModelHighAPI_RefAttr(*temp_attribute);
396 if (newmem & SWIG_CAST_NEW_MEMORY) {
397 delete temp_attribute;
401 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_object, $descriptor(std::shared_ptr<ModelAPI_Object> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
403 temp_refattr = ModelHighAPI_RefAttr(*temp_object);
404 if (newmem & SWIG_CAST_NEW_MEMORY) {
409 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
410 if (temp_interface) {
411 temp_refattr = ModelHighAPI_RefAttr(*temp_interface);
412 if (newmem & SWIG_CAST_NEW_MEMORY) {
413 delete temp_interface;
417 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_pair, $descriptor(std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
419 temp_point = &temp_pair->first;
420 temp_refattr = temp_pair->second;
421 if (newmem & SWIG_CAST_NEW_MEMORY) {
426 if (PyTuple_Check(item)) {
427 if (PyTuple_Size(item) == 2) {
428 double x = (double)PyFloat_AsDouble(PySequence_GetItem(item, 0));
429 double y = (double)PyFloat_AsDouble(PySequence_GetItem(item, 1));
430 temp_point = new std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(x, y));
433 PyErr_SetString(PyExc_TypeError, "argument must a list of 2D points.");
437 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_point, $descriptor(std::shared_ptr<GeomAPI_Pnt2d> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
440 if (PyNumber_Check(item)) {
441 PyObject* item1 = *(++it);
442 if (PyNumber_Check(item1)) {
443 double x = (double)PyFloat_AsDouble(item);
444 double y = (double)PyFloat_AsDouble(item1);
445 temp_point = new std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(x, y));
448 PyErr_SetString(PyExc_TypeError, "argument must a list of 2D points.");
454 if (temp_point || !temp_refattr.isEmpty()) {
456 temp.push_back(std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>(*temp_point, temp_refattr));
458 temp.push_back(std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>(std::shared_ptr<GeomAPI_Pnt2d>(), temp_refattr));
460 if (temp_point && ((newmem & SWIG_CAST_NEW_MEMORY) || clearmem)) {
464 PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_RefAttr, ModelHighAPI_Selection, ModelHighAPI_Interface, ModelAPI_Attribute or ModelAPI_Object.");
471 PyErr_SetString(PyExc_ValueError, "argument must be a tuple of lists.");
476 %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> >& {
478 if (PySequence_Check($input)) {
479 for (Py_ssize_t i = 0; i < PySequence_Size($input) && $1; ++i) {
480 PyObject * item = PySequence_GetItem($input, i);
482 std::list<PyObject*> temp_inputlist;
483 if (PySequence_Check(item)) {
484 for (Py_ssize_t i = 0; i < PySequence_Size(item); ++i) {
485 PyObject * tmpItem = PySequence_GetItem(item, i);
486 temp_inputlist.push_back(tmpItem);
489 temp_inputlist.push_back(item);
492 std::shared_ptr<ModelAPI_Attribute> * temp_attribute = 0;
493 std::shared_ptr<ModelAPI_Object> * temp_object = 0;
494 std::shared_ptr<ModelHighAPI_Interface> * temp_interface = 0;
495 ModelHighAPI_Selection* temp_selection = 0;
496 std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>* temp_pair = 0;
497 std::shared_ptr<GeomAPI_Pnt2d> * temp_point = 0;
498 ModelHighAPI_RefAttr temp_refattr;
501 for (std::list<PyObject*>::iterator it = temp_inputlist.begin(); it != temp_inputlist.end() && $1; ++it) {
502 PyObject* item = *it;
504 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_selection, $descriptor(ModelHighAPI_Selection*), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
505 if (temp_selection) {
511 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_attribute, $descriptor(std::shared_ptr<ModelAPI_Attribute> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
512 if (temp_attribute) {
518 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_object, $descriptor(std::shared_ptr<ModelAPI_Object> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
525 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
526 if (temp_interface) {
532 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_pair, $descriptor(std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
539 if (PyTuple_Check(item)) {
540 if (PyTuple_Size(item) == 2) {
541 if (PyNumber_Check(PySequence_GetItem(item, 0)) && PyNumber_Check(PySequence_GetItem(item, 1))) {
550 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_point, $descriptor(std::shared_ptr<GeomAPI_Pnt2d> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
557 if (PyNumber_Check(item)) {
570 // fix compilarion error: 'res*' was not declared in this scope
571 %typemap(freearg) const std::list<std::shared_ptr<GeomAPI_Pnt2d> > & {}
574 // all supported interfaces (the order is very important according dependencies: base class first)
575 %include "SketchAPI_SketchEntity.h"
576 %include "SketchAPI_Point.h"
577 %include "SketchAPI_MacroMiddlePoint.h"
578 %include "SketchAPI_IntersectionPoint.h"
579 %include "SketchAPI_Line.h"
580 %include "SketchAPI_Circle.h"
581 %include "SketchAPI_MacroCircle.h"
582 %include "SketchAPI_Arc.h"
583 %include "SketchAPI_MacroArc.h"
584 %include "SketchAPI_Ellipse.h"
585 %include "SketchAPI_MacroEllipse.h"
586 %include "SketchAPI_EllipticArc.h"
587 %include "SketchAPI_MacroEllipticArc.h"
588 %include "SketchAPI_BSpline.h"
589 %include "SketchAPI_Projection.h"
590 %include "SketchAPI_Mirror.h"
591 %include "SketchAPI_Offset.h"
592 %include "SketchAPI_Translation.h"
593 %include "SketchAPI_Rectangle.h"
594 %include "SketchAPI_Rotation.h"
595 %include "SketchAPI_Sketch.h"
596 %include "SketchAPI_Constraint.h"
597 %include "SketchAPI_ConstraintAngle.h"