+ 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
This commit is contained in:
parent
818c38a851
commit
e741f3a2d4
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user