6 #include "SketchAPI_swig.h"
11 // import other modules
12 %import "ModelHighAPI.i"
14 // to avoid error on this
15 #define SKETCHAPI_EXPORT
17 // standard definitions
20 %include "std_shared_ptr.i"
23 %shared_ptr(SketchAPI_Arc)
24 %shared_ptr(SketchAPI_Circle)
25 %shared_ptr(SketchAPI_Constraint)
26 %shared_ptr(SketchAPI_IntersectionPoint)
27 %shared_ptr(SketchAPI_Line)
28 %shared_ptr(SketchAPI_Mirror)
29 %shared_ptr(SketchAPI_Sketch)
30 %shared_ptr(SketchAPI_SketchEntity)
31 %shared_ptr(SketchAPI_Point)
32 %shared_ptr(SketchAPI_Projection)
33 %shared_ptr(SketchAPI_Rectangle)
34 %shared_ptr(SketchAPI_Rotation)
35 %shared_ptr(SketchAPI_Translation)
37 %typemap(in) const ModelHighAPI_RefAttr & (ModelHighAPI_RefAttr temp) {
38 std::shared_ptr<ModelAPI_Attribute> * temp_attribute;
39 std::shared_ptr<ModelAPI_Object> * temp_object;
40 std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
41 ModelHighAPI_Selection* temp_selection;
43 if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_selection, $descriptor(ModelHighAPI_Selection*), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
44 if (!temp_selection) {
45 PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_RefAttr, ModelHighAPI_Selection, ModelHighAPI_Interface, ModelAPI_Attribute or ModelAPI_Object.");
48 temp = ModelHighAPI_RefAttr(temp_selection->resultSubShapePair().first);
49 if (newmem & SWIG_CAST_NEW_MEMORY) {
50 delete temp_selection;
54 if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_attribute, $descriptor(std::shared_ptr<ModelAPI_Attribute> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
55 if (!temp_attribute) {
56 PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_RefAttr, ModelHighAPI_Selection, ModelHighAPI_Interface, ModelAPI_Attribute or ModelAPI_Object.");
59 temp = ModelHighAPI_RefAttr(*temp_attribute);
60 if (newmem & SWIG_CAST_NEW_MEMORY) {
61 delete temp_attribute;
65 if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_object, $descriptor(std::shared_ptr<ModelAPI_Object> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
67 PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_RefAttr, ModelHighAPI_Selection, ModelHighAPI_Interface, ModelAPI_Attribute or ModelAPI_Object.");
70 temp = ModelHighAPI_RefAttr(*temp_object);
71 if (newmem & SWIG_CAST_NEW_MEMORY) {
76 if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
77 if (!temp_interface) {
78 PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_RefAttr, ModelHighAPI_Selection, ModelHighAPI_Interface, ModelAPI_Attribute or ModelAPI_Object.");
81 temp = ModelHighAPI_RefAttr(*temp_interface);
82 if (newmem & SWIG_CAST_NEW_MEMORY) {
83 delete temp_interface;
87 if ((SWIG_ConvertPtr($input, (void **)&$1, $1_descriptor, SWIG_POINTER_EXCEPTION)) == 0) {
89 PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_RefAttr, ModelHighAPI_Selection, ModelHighAPI_Interface, ModelAPI_Attribute or ModelAPI_Object.");
94 // all supported interfaces (the order is very important according dependencies: base class first)
95 %include "SketchAPI_SketchEntity.h"
96 %include "SketchAPI_Point.h"
97 %include "SketchAPI_IntersectionPoint.h"
98 %include "SketchAPI_Line.h"
99 %include "SketchAPI_Circle.h"
100 %include "SketchAPI_Arc.h"
101 %include "SketchAPI_Projection.h"
102 %include "SketchAPI_Mirror.h"
103 %include "SketchAPI_Translation.h"
104 %include "SketchAPI_Rectangle.h"
105 %include "SketchAPI_Rotation.h"
106 %include "SketchAPI_Sketch.h"
107 %include "SketchAPI_Constraint.h"