Salome HOME
Make a set of curves accessible from the Python scripts.
[modules/shaper.git] / src / GeomAPI / GeomAPI.i
index aa26482458d7cac892cda2ac8a9a319fe1a1ba03..3e108a2592c03b5d92f5cdb56e1cd52486e45fad 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2020  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 /* GeomAPI.i */
 // standard definitions
 %include "typemaps.i"
 %include "std_list.i"
-%include "std_string.i"
+%include "std_map.i"
+%include "std_set.i"
 %include "std_shared_ptr.i"
+%include "std_string.i"
 
 // shared pointers
 %shared_ptr(GeomAPI_AISObject)
@@ -41,6 +42,8 @@
 %shared_ptr(GeomAPI_Ax2)
 %shared_ptr(GeomAPI_Ax3)
 %shared_ptr(GeomAPI_Box)
+%shared_ptr(GeomAPI_BSpline)
+%shared_ptr(GeomAPI_BSpline2d)
 %shared_ptr(GeomAPI_Circ)
 %shared_ptr(GeomAPI_Circ2d)
 %shared_ptr(GeomAPI_Cone)
@@ -73,6 +76,7 @@
 %shared_ptr(GeomAPI_Trsf)
 %shared_ptr(GeomAPI_Vertex)
 %shared_ptr(GeomAPI_Wire)
+%shared_ptr(GeomAPI_WireExplorer)
 %shared_ptr(GeomAPI_XY)
 %shared_ptr(GeomAPI_XYZ)
 
   }
 }
 
+%typemap(in, numinputs=0) double & (double temp) {
+  $1 = &temp;
+}
+
+%typemap(argout) double & {
+  $result = SWIG_Python_AppendOutput($result, PyFloat_FromDouble(*$1));
+}
+
+// std::dynamic_pointer_cast
+template<class T1, class T2> std::shared_ptr<T1> shared_ptr_cast(std::shared_ptr<T2> theObject);
+%template(shapeToEdge) shared_ptr_cast<GeomAPI_Edge, GeomAPI_Shape>;
+
 
 // all supported interfaces
 %include "GeomAPI_Interface.h"
 %include "GeomAPI_Ax2.h"
 %include "GeomAPI_Ax3.h"
 %include "GeomAPI_Box.h"
+%include "GeomAPI_BSpline.h"
+%include "GeomAPI_BSpline2d.h"
 %include "GeomAPI_Circ.h"
 %include "GeomAPI_Circ2d.h"
 %include "GeomAPI_Cone.h"
 %include "GeomAPI_Trsf.h"
 %include "GeomAPI_Vertex.h"
 %include "GeomAPI_Wire.h"
+%include "GeomAPI_WireExplorer.h"
 %include "GeomAPI_XY.h"
 %include "GeomAPI_XYZ.h"
 
 // std::list -> []
 %template(PointList) std::list<std::shared_ptr<GeomAPI_Pnt> >;
 %template(ShapeList) std::list<std::shared_ptr<GeomAPI_Shape> >;
+// std::set -> []
+%template(CurveSet) std::set<std::shared_ptr<GeomAPI_Curve>, GeomAPI_Curve::Comparator>;
+%template(ShapeSet) std::set<std::shared_ptr<GeomAPI_Shape>, GeomAPI_Shape::Comparator>;
+%template(OriShapeSet) std::set<std::shared_ptr<GeomAPI_Shape>, GeomAPI_Shape::ComparatorWithOri>;
+// std::map -> {}
+%template(ShapeToShapesMap) std::map<std::shared_ptr<GeomAPI_Shape>, std::set<std::shared_ptr<GeomAPI_Shape>, GeomAPI_Shape::ComparatorWithOri>, GeomAPI_Shape::Comparator>;