]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/GeomAPI/GeomAPI.i
Salome HOME
[bos #38360] [CEA] improve performances of exportXAO and PublishToStudy
[modules/shaper.git] / src / GeomAPI / GeomAPI.i
index 29d051d85d1f4f73b4078387d2d0c54bc30a8076..1ee5c3faabdc86a066a25a6a9a5f32bf39a0c0a6 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
@@ -51,6 +51,7 @@
 %shared_ptr(GeomAPI_Cylinder)
 %shared_ptr(GeomAPI_DataMapOfShapeMapOfShapes)
 %shared_ptr(GeomAPI_DataMapOfShapeShape)
+%shared_ptr(GeomAPI_IndexedMapOfShape)
 %shared_ptr(GeomAPI_Dir)
 %shared_ptr(GeomAPI_Dir2d)
 %shared_ptr(GeomAPI_Edge)
@@ -76,6 +77,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) double & (double temp) {
-  if (PyLong_Check($input)) {
-    temp = PyLong_AsLong($input);
-    $1 = &temp;
-  }
+%typemap(in, numinputs=0) double & (double temp) {
+  $1 = &temp;
 }
 
 %typemap(argout) double & {
-  $result = PyFloat_FromDouble(*$1);
+  $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_Cylinder.h"
 %include "GeomAPI_DataMapOfShapeMapOfShapes.h"
 %include "GeomAPI_DataMapOfShapeShape.h"
+%include "GeomAPI_IndexedMapOfShape.h"
 %include "GeomAPI_Dir.h"
 %include "GeomAPI_Dir2d.h"
 %include "GeomAPI_Edge.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"
 
 %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 -> {}