From: mpv Date: Mon, 16 Sep 2019 12:16:31 +0000 (+0300) Subject: Save in export to XAO BRep with free top level shape. X-Git-Tag: V9_4_0a2~4^2~91 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=870b612035b040527741030e36a438703ecad0f2;p=modules%2Fshaper.git Save in export to XAO BRep with free top level shape. --- diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_XAOExport.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_XAOExport.cpp index 22abe96f8..9f0983fe2 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_XAOExport.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_XAOExport.cpp @@ -67,7 +67,14 @@ bool XAOExport(const std::string& theFileName, } try { + XAO::BrepGeometry* aGeometry = dynamic_cast(theXao->getGeometry()); + TopoDS_Shape aShape = aGeometry->getTopoDS_Shape(); + bool aWasFree = aShape.Free(); // make top level topology free, same as imported + if (!aWasFree) + aShape.Free(Standard_True); XAO::XaoExporter::saveToFile(theXao, theFileName, ""); + if (!aWasFree) + aShape.Free(Standard_False); } catch (XAO::XAO_Exception& e) { theError = e.what(); return false;