1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0029723: Modeling Data - Get rid of second writing format (additional save of UV points)

Default BinTools_ShapeSet format version has been changed from 3 to 1.
BinMNaming_NamedShapeDriver (Bin OCAF) now writes shapes in 1st version of Binary format instead of 3rd.
XmlMNaming_NamedShapeDriver (Xml OCAF) now writes shapes in 1st version of ASCII  format instead of 2nd.

writebrep now by default writes into 1st binary format version instead of 3rd.
This commit is contained in:
asuraven
2020-12-15 12:31:52 +03:00
committed by bugmaster
parent 2057c37b67
commit 3b1129a546
9 changed files with 75 additions and 32 deletions

View File

@@ -17,8 +17,11 @@
//! Defined TopTools format version
enum TopTools_FormatVersion
{
TopTools_FormatVersion_VERSION_1 = 1, //!< Does not write CurveOnSurface UV Points into the file. On reading calls Check() method.
TopTools_FormatVersion_VERSION_2 = 2, //!< Stores CurveOnSurface UV Points. On reading format is recognized from Version string.
TopTools_FormatVersion_VERSION_1 = 1, //!< Does not write CurveOnSurface UV Points into the file.
//! On reading calls Check() method.
//! This is default version.
TopTools_FormatVersion_VERSION_2 = 2, //!< Stores CurveOnSurface UV Points.
//! On reading format is recognized from Version string.
TopTools_FormatVersion_CURRENT = TopTools_FormatVersion_VERSION_1 //!< The current version.
};

View File

@@ -42,7 +42,7 @@ Standard_CString TopTools_ShapeSet::Version_2 = "CASCADE Topology V2, (c) Matra-
//purpose :
//=======================================================================
TopTools_ShapeSet::TopTools_ShapeSet()
: myFormatNb (TopTools_FormatVersion_VERSION_1)
: myFormatNb (TopTools_FormatVersion_CURRENT)
{
}
@@ -700,10 +700,9 @@ void TopTools_ShapeSet::Read(Standard_IStream& IS, const Message_ProgressRange&
S.Free (buffer[0] == '1');
S.Modified (buffer[1] == '1');
if (myFormatNb >= TopTools_FormatVersion_VERSION_2)
S.Checked (buffer[2] == '1');
else
S.Checked (Standard_False); // force check at reading..
const bool isChecked = myFormatNb == TopTools_FormatVersion_VERSION_2
&& buffer[2] == '1';
S.Checked (isChecked);
S.Orientable(buffer[3] == '1');
S.Closed (buffer[4] == '1');