From 86f1d9283686410112af008862f6cddd70ae3dd1 Mon Sep 17 00:00:00 2001 From: fps Date: Fri, 6 Sep 2013 12:40:13 +0000 Subject: [PATCH] update includes because of file renaming --- .../GEOMImpl_IImportExportOperations.cxx | 31 +++++++++++++------ .../GEOMImpl_IImportExportOperations.hxx | 2 +- src/GEOMImpl/GEOMImpl_XAODriver.cxx | 8 ++--- 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/src/GEOMImpl/GEOMImpl_IImportExportOperations.cxx b/src/GEOMImpl/GEOMImpl_IImportExportOperations.cxx index 481a3ebee..4ae1465ee 100644 --- a/src/GEOMImpl/GEOMImpl_IImportExportOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IImportExportOperations.cxx @@ -45,10 +45,12 @@ #include "GEOM_ISubShape.hxx" #include "GEOM_PythonDump.hxx" -#include "Xao.hxx" -#include "Geometry.hxx" -#include "Group.hxx" -#include "XaoUtils.hxx" +#include +#include +#include +#include +#include +#include #include #include @@ -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 diff --git a/src/GEOMImpl/GEOMImpl_IImportExportOperations.hxx b/src/GEOMImpl/GEOMImpl_IImportExportOperations.hxx index 2a5511f86..dbb295633 100644 --- a/src/GEOMImpl/GEOMImpl_IImportExportOperations.hxx +++ b/src/GEOMImpl/GEOMImpl_IImportExportOperations.hxx @@ -26,7 +26,7 @@ #include "GEOM_Engine.hxx" #include "GEOM_Object.hxx" -#include "Geometry.hxx" +#include class GEOMImpl_IShapesOperations; class GEOMImpl_IGroupOperations; diff --git a/src/GEOMImpl/GEOMImpl_XAODriver.cxx b/src/GEOMImpl/GEOMImpl_XAODriver.cxx index 369532c85..9a8a798c9 100644 --- a/src/GEOMImpl/GEOMImpl_XAODriver.cxx +++ b/src/GEOMImpl/GEOMImpl_XAODriver.cxx @@ -26,10 +26,10 @@ #include #include -#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 @@// //======================================================================= -- 2.39.2