From e741f3a2d49ccc25947b46a4aefacde5a4e84ca0 Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 2 Dec 2011 11:10:23 +0000 Subject: [PATCH] + make copy of shape and remove triangulation before exporting git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5205 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d --- src/Mod/Part/App/PropertyTopoShape.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Mod/Part/App/PropertyTopoShape.cpp b/src/Mod/Part/App/PropertyTopoShape.cpp index 2d50006e0..76ec1f748 100644 --- a/src/Mod/Part/App/PropertyTopoShape.cpp +++ b/src/Mod/Part/App/PropertyTopoShape.cpp @@ -243,14 +243,16 @@ void PropertyPartShape::SaveDocFile (Base::Writer &writer) const return; // NOTE: Cleaning the triangulation may cause problems on some algorithms like BOP // Before writing to the project we clean all triangulation data to save memory - // BRepTools::Clean(_Shape._Shape); + BRepBuilderAPI_Copy copy(_Shape._Shape); + const TopoDS_Shape& myShape = copy.Shape(); + BRepTools::Clean(myShape); // remove triangulation // create a temporary file and copy the content to the zip stream // once the tmp. filename is known use always the same because otherwise // we may run into some problems on the Linux platform static Base::FileInfo fi(Base::FileInfo::getTempFileName()); - if (!BRepTools::Write(_Shape._Shape,(const Standard_CString)fi.filePath().c_str())) { + if (!BRepTools::Write(myShape,(const Standard_CString)fi.filePath().c_str())) { // Note: Do NOT throw an exception here because if the tmp. file could // not be created we should not abort. // We only print an error message but continue writing the next files to the