From 870b612035b040527741030e36a438703ecad0f2 Mon Sep 17 00:00:00 2001 From: mpv Date: Mon, 16 Sep 2019 15:16:31 +0300 Subject: [PATCH] Save in export to XAO BRep with free top level shape. --- src/GeomAlgoAPI/GeomAlgoAPI_XAOExport.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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; -- 2.39.2