1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +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:
asuraven
2020-11-17 20:37:01 +03:00
committed by bugmaster
parent 6fab0b3428
commit 9f45d35b6b
40 changed files with 703 additions and 209 deletions

View File

@@ -52,6 +52,7 @@ Handle(XmlMDF_ADriverTable) XmlDrivers_DocumentStorageDriver::AttributeDrivers
//=======================================================================
Standard_Boolean XmlDrivers_DocumentStorageDriver::WriteShapeSection
(XmlObjMgt_Element& theElement,
const TDocStd_FormatVersion theStorageFormatVersion,
const Message_ProgressRange& theRange)
{
Standard_Boolean isShape(Standard_False);
@@ -60,7 +61,7 @@ Standard_Boolean XmlDrivers_DocumentStorageDriver::WriteShapeSection
{
Handle(XmlMNaming_NamedShapeDriver) aNamedShapeDriver =
Handle(XmlMNaming_NamedShapeDriver)::DownCast (aDriver);
aNamedShapeDriver->WriteShapeSection (theElement, theRange);
aNamedShapeDriver->WriteShapeSection (theElement, theStorageFormatVersion, theRange);
isShape = Standard_True;
}
return isShape;

View File

@@ -42,7 +42,8 @@ public:
(const Handle(Message_Messenger)& theMsgDriver) Standard_OVERRIDE;
Standard_EXPORT virtual Standard_Boolean WriteShapeSection
(XmlObjMgt_Element& thePDoc,
(XmlObjMgt_Element& thePDoc,
const TDocStd_FormatVersion theStorageFormatVersion,
const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE;
DEFINE_STANDARD_RTTIEXT(XmlDrivers_DocumentStorageDriver,XmlLDrivers_DocumentStorageDriver)