]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Add Bool, Pnt, Pnt2d and Dir attributes
authorspo <sergey.pokhodenko@opencascade.com>
Tue, 7 Jun 2016 13:42:35 +0000 (16:42 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Fri, 17 Jun 2016 11:41:04 +0000 (14:41 +0300)
src/ModelHighAPI/CMakeLists.txt
src/ModelHighAPI/ModelHighAPI_Tools.cpp
src/ModelHighAPI/ModelHighAPI_Tools.h

index b513ee600dc3a01cbe626e4d6a08486d85469b3e..c495be0d1ee2198e34aea89cc60260ef20574834 100644 (file)
@@ -21,6 +21,8 @@ SET(PROJECT_SOURCES
 SET(PROJECT_LIBRARIES
   Config
   Events
+  GeomAPI
+  GeomDataAPI
   ModelAPI
 )
 
@@ -45,6 +47,7 @@ SET(SWIG_LINK_LIBRARIES
 INCLUDE_DIRECTORIES(
   ${PROJECT_SOURCE_DIR}/src/Events
   ${PROJECT_SOURCE_DIR}/src/GeomAPI
+  ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
   ${PROJECT_SOURCE_DIR}/src/ModelAPI
 )
 
index 478c19503c1ca3b163c84a076371d0b2d2f78873..0c82867a682b8d00b9240a0efa55a8abf7404775 100644 (file)
@@ -7,6 +7,14 @@
 //--------------------------------------------------------------------------------------
 #include "ModelHighAPI_Tools.h"
 //--------------------------------------------------------------------------------------
+#include <GeomAPI_Dir.h>
+#include <GeomAPI_Pnt.h>
+#include <GeomAPI_Pnt2d.h>
+//--------------------------------------------------------------------------------------
+#include <GeomDataAPI_Dir.h>
+#include <GeomDataAPI_Point.h>
+#include <GeomDataAPI_Point2D.h>
+//--------------------------------------------------------------------------------------
 #include <ModelAPI_AttributeBoolean.h>
 #include <ModelAPI_AttributeDocRef.h>
 #include <ModelAPI_AttributeDouble.h>
 //--------------------------------------------------------------------------------------
 #include "ModelHighAPI_Double.h"
 #include "ModelHighAPI_Selection.h"
+
+//--------------------------------------------------------------------------------------
+void fillAttribute(const std::shared_ptr<GeomAPI_Pnt2d> & theValue,
+                   const std::shared_ptr<GeomDataAPI_Point2D> & theAttribute)
+{
+  theAttribute->setValue(theValue);
+}
+
+//--------------------------------------------------------------------------------------
+void fillAttribute(const std::shared_ptr<GeomAPI_Dir> & theValue,
+                   const std::shared_ptr<GeomDataAPI_Dir> & theAttribute)
+{
+  theAttribute->setValue(theValue);
+}
+
+//--------------------------------------------------------------------------------------
+void fillAttribute(const std::shared_ptr<GeomAPI_Pnt> & theValue,
+                   const std::shared_ptr<GeomDataAPI_Point> & theAttribute)
+{
+  theAttribute->setValue(theValue);
+}
+
+//--------------------------------------------------------------------------------------
+void fillAttribute(bool theValue,
+                   const std::shared_ptr<ModelAPI_AttributeBoolean> & theAttribute)
+{
+  theAttribute->setValue(theValue);
+}
+
 //--------------------------------------------------------------------------------------
 void fillAttribute(const ModelHighAPI_Double & theValue,
                    const std::shared_ptr<ModelAPI_AttributeDouble> & theAttribute)
index f8e8b268e0a7eb2793da69ca0202dc531844f533..fbfd81f97991f48e63be7a150676de0c4d86be0c 100644 (file)
 #include <memory>
 #include <string>
 //--------------------------------------------------------------------------------------
+class GeomAPI_Dir;
+class GeomAPI_Pnt;
+class GeomAPI_Pnt2d;
+//--------------------------------------------------------------------------------------
+class GeomDataAPI_Dir;
+class GeomDataAPI_Point;
+class GeomDataAPI_Point2D;
+//--------------------------------------------------------------------------------------
 class ModelAPI_AttributeBoolean;
 class ModelAPI_AttributeDocRef;
 class ModelAPI_AttributeDouble;
@@ -30,6 +38,23 @@ class ModelAPI_AttributeString;
 class ModelHighAPI_Double;
 class ModelHighAPI_Selection;
 //--------------------------------------------------------------------------------------
+MODELHIGHAPI_EXPORT
+void fillAttribute(const std::shared_ptr<GeomAPI_Pnt2d> & theValue,
+                   const std::shared_ptr<GeomDataAPI_Point2D> & theAttribute);
+
+MODELHIGHAPI_EXPORT
+void fillAttribute(const std::shared_ptr<GeomAPI_Dir> & theValue,
+                   const std::shared_ptr<GeomDataAPI_Dir> & theAttribute);
+
+MODELHIGHAPI_EXPORT
+void fillAttribute(const std::shared_ptr<GeomAPI_Pnt> & theValue,
+                   const std::shared_ptr<GeomDataAPI_Point> & theAttribute);
+
+//--------------------------------------------------------------------------------------
+MODELHIGHAPI_EXPORT
+void fillAttribute(bool theValue,
+                   const std::shared_ptr<ModelAPI_AttributeBoolean> & theAttribute);
+
 MODELHIGHAPI_EXPORT
 void fillAttribute(const ModelHighAPI_Double & theValue,
                    const std::shared_ptr<ModelAPI_AttributeDouble> & theAttribute);