Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / src / Model / Model_Data.cpp
index 121cd1902ce3bb63b3c025fd1c78c52a2585162a..5b26417a200191515540f1806624487bd9f6b266 100644 (file)
@@ -7,6 +7,7 @@
 #include <Model_AttributeDouble.h>
 #include <GeomData_Point.h>
 #include <GeomData_Point2D.h>
+#include <GeomData_Dir.h>
 #include <TDataStd_Name.hxx>
 
 using namespace std;
@@ -43,11 +44,15 @@ void Model_Data::addAttribute(string theID, string theAttrType)
     anAttr = new Model_AttributeDouble(anAttrLab);
   else if (theAttrType == GeomData_Point::type())
     anAttr = new GeomData_Point(anAttrLab);
+  else if (theAttrType == GeomData_Dir::type())
+    anAttr = new GeomData_Dir(anAttrLab);
   else if (theAttrType == GeomData_Point2D::type())
     anAttr = new GeomData_Point2D(anAttrLab);
 
-  if (anAttr)
+  if (anAttr) {
     myAttrs[theID] = boost::shared_ptr<ModelAPI_Attribute>(anAttr);
+    anAttr->setFeature(myFeature);
+  }
   else
     ; // TODO: generate error on unknown attribute request and/or add mechanism for customization
 }