1 // Copyright (C) 2014-2023 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_Projection)
85 %shared_ptr(SketchAPI_Rectangle)
86 %shared_ptr(SketchAPI_Rotation)
87 %shared_ptr(SketchAPI_Translation)
90 %template(InterfaceList) std::list<std::shared_ptr<ModelHighAPI_Interface> >;
91 %template(EntityList) std::list<std::shared_ptr<SketchAPI_SketchEntity> >;
92 %template(SketchPointList) std::list<std::shared_ptr<SketchAPI_Point> >;
93 %template(GeomPnt2dList) std::list<std::shared_ptr<GeomAPI_Pnt2d> >;
95 %template(PointRefAttrPair) std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>;
97 %typecheck(SWIG_TYPECHECK_POINTER) std::shared_ptr<ModelAPI_Feature>, const std::shared_ptr<ModelAPI_Feature> & {
98 std::shared_ptr<ModelAPI_Feature> * temp_feature;
99 std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
101 if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_feature, $descriptor(std::shared_ptr<ModelAPI_Feature> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
108 if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
109 if (temp_interface) {
118 %typemap(in) const std::shared_ptr<ModelAPI_Feature> & (std::shared_ptr<ModelAPI_Feature> temp) {
119 std::shared_ptr<ModelAPI_Feature> * temp_feature;
120 std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
122 if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_feature, $descriptor(std::shared_ptr<ModelAPI_Feature> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
124 PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_Interface.");
127 temp = (*temp_feature);
128 if (newmem & SWIG_CAST_NEW_MEMORY) {
133 if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
134 if (!temp_interface) {
135 PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_Interface.");
138 temp = (*temp_interface)->feature();
139 if (newmem & SWIG_CAST_NEW_MEMORY) {
140 delete temp_interface;
144 if ((SWIG_ConvertPtr($input, (void **)&$1, $1_descriptor, SWIG_POINTER_EXCEPTION)) == 0) {
146 PyErr_SetString(PyExc_ValueError, "argument must be ModelHighAPI_Interface.");
151 %typemap(in) const std::list<std::shared_ptr<ModelAPI_Object> > & (std::list<std::shared_ptr<ModelAPI_Object> > temp) {
152 std::shared_ptr<ModelAPI_Object> * temp_object;
153 std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
154 ModelHighAPI_Selection* temp_selection;
156 if (PySequence_Check($input)) {
157 for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
158 PyObject * item = PySequence_GetItem($input, i);
159 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_selection, $descriptor(ModelHighAPI_Selection*), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
160 if (!temp_selection) {
161 PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_Interface, ModelHighAPI_Selection or ModelAPI_Object.");
164 temp.push_back(temp_selection->resultSubShapePair().first);
165 if (newmem & SWIG_CAST_NEW_MEMORY) {
166 delete temp_selection;
169 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_object, $descriptor(std::shared_ptr<ModelAPI_Object> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
171 PyErr_SetString(PyExc_TypeError, "argument must be list of ModelHighAPI_Interface, ModelHighAPI_Selection or ModelAPI_Object.");
174 temp.push_back(*temp_object);
175 if (newmem & SWIG_CAST_NEW_MEMORY) {
179 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
180 if (!temp_interface) {
181 PyErr_SetString(PyExc_TypeError, "argument must be list of ModelHighAPI_Interface, ModelHighAPI_Selection or ModelAPI_Object.");
184 temp.push_back((*temp_interface)->defaultResult());
185 if (newmem & SWIG_CAST_NEW_MEMORY) {
186 delete temp_interface;
193 PyErr_SetString(PyExc_ValueError, "argument must be list of ModelHighAPI_Interface or ModelAPI_Object.");
198 %typecheck(SWIG_TYPECHECK_POINTER) std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>, const std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> & {
199 std::shared_ptr<ModelAPI_Attribute> * temp_attribute;
200 std::shared_ptr<ModelAPI_Object> * temp_object;
201 std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
202 ModelHighAPI_Selection* temp_selection;
203 std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>* temp_pair;
204 std::shared_ptr<GeomAPI_Pnt2d> * temp_point;
205 ModelHighAPI_RefAttr temp_refattr;
207 std::list<PyObject*> temp_inputlist;
208 if (PySequence_Check($input)) {
209 for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
210 PyObject * temp = PySequence_GetItem($input, i);
211 temp_inputlist.push_back(temp);
214 temp_inputlist.push_back($input);
218 for (std::list<PyObject*>::iterator it = temp_inputlist.begin(); it != temp_inputlist.end() && $1; ++it) {
219 PyObject* item = *it;
221 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_selection, $descriptor(ModelHighAPI_Selection*), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
222 if (temp_selection) {
228 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_attribute, $descriptor(std::shared_ptr<ModelAPI_Attribute> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
229 if (temp_attribute) {
235 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_object, $descriptor(std::shared_ptr<ModelAPI_Object> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
242 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
243 if (temp_interface) {
249 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_pair, $descriptor(std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
256 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_point, $descriptor(std::shared_ptr<GeomAPI_Pnt2d> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
268 %typemap(in) const std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> & (std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> temp) {
269 std::shared_ptr<ModelAPI_Attribute> * temp_attribute;
270 std::shared_ptr<ModelAPI_Object> * temp_object;
271 std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
272 ModelHighAPI_Selection* temp_selection;
273 std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>* temp_pair;
274 std::shared_ptr<GeomAPI_Pnt2d> * temp_point = 0;
275 ModelHighAPI_RefAttr temp_refattr;
277 std::list<PyObject*> temp_inputlist;
278 if (PySequence_Check($input)) {
279 for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
280 PyObject * temp = PySequence_GetItem($input, i);
281 temp_inputlist.push_back(temp);
284 temp_inputlist.push_back($input);
287 for (std::list<PyObject*>::iterator it = temp_inputlist.begin(); it != temp_inputlist.end(); ++it) {
288 PyObject* item = *it;
290 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_selection, $descriptor(ModelHighAPI_Selection*), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
291 if (temp_selection) {
292 temp_refattr = ModelHighAPI_RefAttr(std::shared_ptr<ModelAPI_Object>(temp_selection->resultSubShapePair().first));
293 if (newmem & SWIG_CAST_NEW_MEMORY) {
294 delete temp_selection;
298 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_attribute, $descriptor(std::shared_ptr<ModelAPI_Attribute> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
299 if (temp_attribute) {
300 temp_refattr = ModelHighAPI_RefAttr(*temp_attribute);
301 if (newmem & SWIG_CAST_NEW_MEMORY) {
302 delete temp_attribute;
306 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_object, $descriptor(std::shared_ptr<ModelAPI_Object> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
308 temp_refattr = ModelHighAPI_RefAttr(*temp_object);
309 if (newmem & SWIG_CAST_NEW_MEMORY) {
314 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
315 if (temp_interface) {
316 temp_refattr = ModelHighAPI_RefAttr(*temp_interface);
317 if (newmem & SWIG_CAST_NEW_MEMORY) {
318 delete temp_interface;
322 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_pair, $descriptor(std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
324 temp_point = &temp_pair->first;
325 temp_refattr = temp_pair->second;
326 if (newmem & SWIG_CAST_NEW_MEMORY) {
331 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_point, $descriptor(std::shared_ptr<GeomAPI_Pnt2d> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
336 if (temp_point || !temp_refattr.isEmpty()) {
338 temp = std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>(*temp_point, temp_refattr);
340 temp = std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>(std::shared_ptr<GeomAPI_Pnt2d>(), temp_refattr);
342 if (temp_point && (newmem & SWIG_CAST_NEW_MEMORY)) {
347 PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_RefAttr, ModelHighAPI_Selection, ModelHighAPI_Interface, ModelAPI_Attribute or ModelAPI_Object.");
352 // fix compilarion error: 'res*' was not declared in this scope
353 %typemap(freearg) const std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> & {}
356 %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) {
357 if (PySequence_Check($input)) {
358 for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
359 PyObject * item = PySequence_GetItem($input, i);
361 std::list<PyObject*> temp_inputlist;
362 if (PySequence_Check(item)) {
363 for (Py_ssize_t i = 0; i < PySequence_Size(item); ++i) {
364 PyObject * tmpItem = PySequence_GetItem(item, i);
365 temp_inputlist.push_back(tmpItem);
368 temp_inputlist.push_back(item);
371 std::shared_ptr<ModelAPI_Attribute> * temp_attribute = 0;
372 std::shared_ptr<ModelAPI_Object> * temp_object = 0;
373 std::shared_ptr<ModelHighAPI_Interface> * temp_interface = 0;
374 ModelHighAPI_Selection* temp_selection = 0;
375 std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>* temp_pair = 0;
376 std::shared_ptr<GeomAPI_Pnt2d> * temp_point = 0;
377 ModelHighAPI_RefAttr temp_refattr;
381 for (std::list<PyObject*>::iterator it = temp_inputlist.begin(); it != temp_inputlist.end(); ++it) {
382 PyObject* item = *it;
384 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_selection, $descriptor(ModelHighAPI_Selection*), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
385 if (temp_selection) {
386 temp_refattr = ModelHighAPI_RefAttr(std::shared_ptr<ModelAPI_Object>(temp_selection->resultSubShapePair().first));
387 if (newmem & SWIG_CAST_NEW_MEMORY) {
388 delete temp_selection;
392 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_attribute, $descriptor(std::shared_ptr<ModelAPI_Attribute> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
393 if (temp_attribute) {
394 temp_refattr = ModelHighAPI_RefAttr(*temp_attribute);
395 if (newmem & SWIG_CAST_NEW_MEMORY) {
396 delete temp_attribute;
400 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_object, $descriptor(std::shared_ptr<ModelAPI_Object> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
402 temp_refattr = ModelHighAPI_RefAttr(*temp_object);
403 if (newmem & SWIG_CAST_NEW_MEMORY) {
408 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
409 if (temp_interface) {
410 temp_refattr = ModelHighAPI_RefAttr(*temp_interface);
411 if (newmem & SWIG_CAST_NEW_MEMORY) {
412 delete temp_interface;
416 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_pair, $descriptor(std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
418 temp_point = &temp_pair->first;
419 temp_refattr = temp_pair->second;
420 if (newmem & SWIG_CAST_NEW_MEMORY) {
425 if (PyTuple_Check(item)) {
426 if (PyTuple_Size(item) == 2) {
427 double x = (double)PyFloat_AsDouble(PySequence_GetItem(item, 0));
428 double y = (double)PyFloat_AsDouble(PySequence_GetItem(item, 1));
429 temp_point = new std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(x, y));
432 PyErr_SetString(PyExc_TypeError, "argument must a list of 2D points.");
436 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_point, $descriptor(std::shared_ptr<GeomAPI_Pnt2d> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
439 if (PyNumber_Check(item)) {
440 PyObject* item1 = *(++it);
441 if (PyNumber_Check(item1)) {
442 double x = (double)PyFloat_AsDouble(item);
443 double y = (double)PyFloat_AsDouble(item1);
444 temp_point = new std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(x, y));
447 PyErr_SetString(PyExc_TypeError, "argument must a list of 2D points.");
453 if (temp_point || !temp_refattr.isEmpty()) {
455 temp.push_back(std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>(*temp_point, temp_refattr));
457 temp.push_back(std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>(std::shared_ptr<GeomAPI_Pnt2d>(), temp_refattr));
459 if (temp_point && ((newmem & SWIG_CAST_NEW_MEMORY) || clearmem)) {
463 PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_RefAttr, ModelHighAPI_Selection, ModelHighAPI_Interface, ModelAPI_Attribute or ModelAPI_Object.");
470 PyErr_SetString(PyExc_ValueError, "argument must be a tuple of lists.");
475 %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> >& {
477 if (PySequence_Check($input)) {
478 for (Py_ssize_t i = 0; i < PySequence_Size($input) && $1; ++i) {
479 PyObject * item = PySequence_GetItem($input, i);
481 std::list<PyObject*> temp_inputlist;
482 if (PySequence_Check(item)) {
483 for (Py_ssize_t i = 0; i < PySequence_Size(item); ++i) {
484 PyObject * tmpItem = PySequence_GetItem(item, i);
485 temp_inputlist.push_back(tmpItem);
488 temp_inputlist.push_back(item);
491 std::shared_ptr<ModelAPI_Attribute> * temp_attribute = 0;
492 std::shared_ptr<ModelAPI_Object> * temp_object = 0;
493 std::shared_ptr<ModelHighAPI_Interface> * temp_interface = 0;
494 ModelHighAPI_Selection* temp_selection = 0;
495 std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>* temp_pair = 0;
496 std::shared_ptr<GeomAPI_Pnt2d> * temp_point = 0;
497 ModelHighAPI_RefAttr temp_refattr;
500 for (std::list<PyObject*>::iterator it = temp_inputlist.begin(); it != temp_inputlist.end() && $1; ++it) {
501 PyObject* item = *it;
503 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_selection, $descriptor(ModelHighAPI_Selection*), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
504 if (temp_selection) {
510 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_attribute, $descriptor(std::shared_ptr<ModelAPI_Attribute> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
511 if (temp_attribute) {
517 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_object, $descriptor(std::shared_ptr<ModelAPI_Object> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
524 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
525 if (temp_interface) {
531 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_pair, $descriptor(std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
538 if (PyTuple_Check(item)) {
539 if (PyTuple_Size(item) == 2) {
540 if (PyNumber_Check(PySequence_GetItem(item, 0)) && PyNumber_Check(PySequence_GetItem(item, 1))) {
549 if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_point, $descriptor(std::shared_ptr<GeomAPI_Pnt2d> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
556 if (PyNumber_Check(item)) {
569 // fix compilarion error: 'res*' was not declared in this scope
570 %typemap(freearg) const std::list<std::shared_ptr<GeomAPI_Pnt2d> > & {}
573 // all supported interfaces (the order is very important according dependencies: base class first)
574 %include "SketchAPI_SketchEntity.h"
575 %include "SketchAPI_Point.h"
576 %include "SketchAPI_IntersectionPoint.h"
577 %include "SketchAPI_Line.h"
578 %include "SketchAPI_Circle.h"
579 %include "SketchAPI_MacroCircle.h"
580 %include "SketchAPI_Arc.h"
581 %include "SketchAPI_MacroArc.h"
582 %include "SketchAPI_Ellipse.h"
583 %include "SketchAPI_MacroEllipse.h"
584 %include "SketchAPI_EllipticArc.h"
585 %include "SketchAPI_MacroEllipticArc.h"
586 %include "SketchAPI_BSpline.h"
587 %include "SketchAPI_Projection.h"
588 %include "SketchAPI_Mirror.h"
589 %include "SketchAPI_Offset.h"
590 %include "SketchAPI_Translation.h"
591 %include "SketchAPI_Rectangle.h"
592 %include "SketchAPI_Rotation.h"
593 %include "SketchAPI_Sketch.h"
594 %include "SketchAPI_Constraint.h"
595 %include "SketchAPI_ConstraintAngle.h"