Salome HOME
[bos #35151][EDF](2023-T1) Centered rectangle.
[modules/shaper.git] / src / SketchAPI / SketchAPI.i
index 91f9b55e2b679ade4f60775b50139a51e15ab657..e756dd63840974c33182065f69721d2990b6c224 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2024  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
   #include "SketchAPI_swig.h"
   #include "ModelHighAPI_swig.h"
 
-  // fix for SWIG v2.0.4
-  #define SWIGPY_SLICE_ARG(obj) ((PyObject*)(obj))
+  // fix for SWIG v4.1.1
+  #if PY_VERSION_HEX >= 0x03020000
+  # define SWIGPY_SLICEOBJECT PyObject
+  #else
+  # define SWIGPY_SLICEOBJECT PySliceObject
+  #endif
 
+  // fix for SWIG v2.0.4
+  #define SWIGPY_SLICE_ARG(obj)   ((SWIGPY_SLICEOBJECT*)(obj))
   #define SWIGPY_UNICODE_ARG(obj) ((PyObject*) (obj))
 %}
 
@@ -75,6 +81,7 @@
 %shared_ptr(SketchAPI_Sketch)
 %shared_ptr(SketchAPI_SketchEntity)
 %shared_ptr(SketchAPI_Point)
+%shared_ptr(SketchAPI_MacroMiddlePoint)
 %shared_ptr(SketchAPI_Projection)
 %shared_ptr(SketchAPI_Rectangle)
 %shared_ptr(SketchAPI_Rotation)
@@ -88,6 +95,9 @@
 // std::pair -> []
 %template(PointRefAttrPair) std::pair<std::shared_ptr<GeomAPI_Pnt2d>, ModelHighAPI_RefAttr>;
 
+%template(RectangleAndPoint) std::pair<std::shared_ptr<SketchAPI_Rectangle>, std::shared_ptr<SketchAPI_Point>>;
+
+
 %typecheck(SWIG_TYPECHECK_POINTER) std::shared_ptr<ModelAPI_Feature>, const std::shared_ptr<ModelAPI_Feature> & {
   std::shared_ptr<ModelAPI_Feature> * temp_feature;
   std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
 // all supported interfaces (the order is very important according dependencies: base class first)
 %include "SketchAPI_SketchEntity.h"
 %include "SketchAPI_Point.h"
+%include "SketchAPI_MacroMiddlePoint.h"
 %include "SketchAPI_IntersectionPoint.h"
 %include "SketchAPI_Line.h"
 %include "SketchAPI_Circle.h"