]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
update includes because of file renaming
authorfps <fps@opencascade.com>
Fri, 6 Sep 2013 12:40:13 +0000 (12:40 +0000)
committerfps <fps@opencascade.com>
Fri, 6 Sep 2013 12:40:13 +0000 (12:40 +0000)
src/GEOMImpl/GEOMImpl_IImportExportOperations.cxx
src/GEOMImpl/GEOMImpl_IImportExportOperations.hxx
src/GEOMImpl/GEOMImpl_XAODriver.cxx

index 481a3ebeecf2331b90e54795e2cc45fbb287e25f..4ae1465eeb8d92645d294922620121d2e18c7962 100644 (file)
 #include "GEOM_ISubShape.hxx"
 #include "GEOM_PythonDump.hxx"
 
-#include "Xao.hxx"
-#include "Geometry.hxx"
-#include "Group.hxx"
-#include "XaoUtils.hxx"
+#include <XAO_Xao.hxx>
+#include <XAO_Geometry.hxx>
+#include <XAO_BrepGeometry.hxx>
+#include <XAO_Group.hxx>
+#include <XAO_Field.hxx>
+#include <XAO_XaoUtils.hxx>
 
 #include <GEOMImpl_XAODriver.hxx>
 #include <GEOMImpl_IImportExportXAO.hxx>
@@ -177,11 +179,16 @@ bool GEOMImpl_IImportExportOperations::ExportXAO(Handle(GEOM_Object) shape,
     xaoObject->setAuthor(author);
 
     XAO::Geometry* geometry = XAO::Geometry::createGeometry(XAO::BREP);
-    TopoDS_Shape topoShape = shape->GetValue();
-    exportFunction->SetValue(topoShape);
-    geometry->setShape(topoShape);
     geometry->setName(shape->GetName());
 
+    if (geometry->getFormat() == XAO::BREP)
+    {
+        TopoDS_Shape topoShape = shape->GetValue();
+        exportFunction->SetValue(topoShape);
+        XAO::BrepGeometry* brep = (XAO::BrepGeometry*)geometry;
+        brep->setTopoDS_Shape(topoShape);
+    }
+
     Handle(TColStd_HSequenceOfTransient) subObjects = m_shapesOperations->GetExistingSubObjects(shape, false);
     int nbSubObjects = subObjects->Length();
 
@@ -399,9 +406,13 @@ bool GEOMImpl_IImportExportOperations::ImportXAO(const char* fileName,
     if (function->GetDriverGUID() != GEOMImpl_XAODriver::GetID()) return false;
 
     // set the geometry
-    TopoDS_Shape geomShape = xaoGeometry->getShape();
-    function->SetValue(geomShape);
-    shape->SetName(xaoGeometry->getName().c_str());
+    if (xaoGeometry->getFormat() == XAO::BREP)
+    {
+        XAO::BrepGeometry* brep = (XAO::BrepGeometry*)xaoGeometry;
+        TopoDS_Shape geomShape = brep->getTopoDS_Shape();
+        function->SetValue(geomShape);
+        shape->SetName(xaoGeometry->getName().c_str());
+    }
 
     // create sub shapes with names
 
index 2a5511f8648b6142b5858f2a065126842a9db244..dbb29563324d295dafbeb7ebbbcb66d1b3688bf6 100644 (file)
@@ -26,7 +26,7 @@
 #include "GEOM_Engine.hxx"
 #include "GEOM_Object.hxx"
 
-#include "Geometry.hxx"
+#include <XAO_Geometry.hxx>
 
 class GEOMImpl_IShapesOperations;
 class GEOMImpl_IGroupOperations;
index 369532c8529e161fe930e3870bc7f14e13c1b3b7..9a8a798c909878a8e65b964484e1a901352f14c3 100644 (file)
 #include <TFunction_Logbook.hxx>
 #include <StdFail_NotDone.hxx>
 
-#include "Xao.hxx"
-#include "Geometry.hxx"
-#include "Group.hxx"
-#include "XaoUtils.hxx"
+#include "XAO_Xao.hxx"
+#include "XAO_Geometry.hxx"
+#include "XAO_Group.hxx"
+#include "XAO_XaoUtils.hxx"
 //@@ include required header files here @@//
 
 //=======================================================================