mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0031136: Modeling Data - BinXCAF persistence loses normals from triangulation-only Faces
Information about normals are stored in BinOCAF, XmlOCAF, BRep and BBRep (in case of triangulation-only Faces). Versions of formats have been changed (11 for TDocStd, 4 for BRep Shape and 3 for Binary BRep Shape) theWithNormals parameter added to BRepTools::Write() IsWithNormals()/SetWithNormals() function added to BRepTools_ShapeSet -normals/-noNormals option added to StoreTriangulation DRAW command -normals/-noNormals option added to writebrep DRAW command Tests for writing to brep/binary brep/BinXCaf/XmlXCaf added Test for StoreTriangulation options -normals/-noNormals added
This commit is contained in:
@@ -270,7 +270,7 @@ Standard_Boolean XmlLDrivers_DocumentStorageDriver::WriteToDomDocument
|
||||
|
||||
// Document version
|
||||
Handle(TDocStd_Document) aDoc = Handle(TDocStd_Document)::DownCast (theDocument);
|
||||
Standard_Integer aFormatVersion = TDocStd_Document::CurrentStorageFormatVersion(); // the last version of the format
|
||||
TDocStd_FormatVersion aFormatVersion = TDocStd_Document::CurrentStorageFormatVersion(); // the last version of the format
|
||||
if (TDocStd_Document::CurrentStorageFormatVersion() < aDoc->StorageFormatVersion())
|
||||
{
|
||||
TCollection_ExtendedString anErrorString("Unacceptable storage format version, the last verson is used");
|
||||
@@ -365,7 +365,7 @@ Standard_Boolean XmlLDrivers_DocumentStorageDriver::WriteToDomDocument
|
||||
myRelocTable.Clear();
|
||||
|
||||
// 4. Write Shapes section
|
||||
if (WriteShapeSection(theElement, aPS.Next()))
|
||||
if (WriteShapeSection(theElement, aFormatVersion, aPS.Next()))
|
||||
::take_time (0, " +++ Fin DOM data for Shapes : ", aMessageDriver);
|
||||
if (!aPS.More())
|
||||
{
|
||||
@@ -466,7 +466,8 @@ static void take_time (const Standard_Integer isReset, const char * aHeader,
|
||||
//=======================================================================
|
||||
Standard_Boolean XmlLDrivers_DocumentStorageDriver::WriteShapeSection
|
||||
(XmlObjMgt_Element& /*theElement*/,
|
||||
const Message_ProgressRange& /*theRange*/)
|
||||
const TDocStd_FormatVersion /*theStorageFormatVersion*/,
|
||||
const Message_ProgressRange& /*theRange*/)
|
||||
{
|
||||
// empty; should be redefined in subclasses
|
||||
return Standard_False;
|
||||
|
@@ -26,6 +26,7 @@
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <XmlObjMgt_Element.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TDocStd_FormatVersion.hxx>
|
||||
|
||||
class XmlMDF_ADriverTable;
|
||||
class TCollection_ExtendedString;
|
||||
@@ -79,6 +80,7 @@ protected:
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean WriteShapeSection
|
||||
(XmlObjMgt_Element& thePDoc,
|
||||
const TDocStd_FormatVersion theStorageFormatVersion,
|
||||
const Message_ProgressRange& theRange = Message_ProgressRange());
|
||||
|
||||
Handle(XmlMDF_ADriverTable) myDrivers;
|
||||
|
Reference in New Issue
Block a user