mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0031946: Modeling Data - replace version numbers with enumerations in TopTools and BinTools
Added enumerations BinTools_FormatVersion & TopTools_FormatVersion for more clear version tracking in the code. Added new BinTools::Write() & BRepTools::Write() overloaded functions with version & isWithTriangles parameters. Added new "readbrep"/"writebrep" DRAW commands handling reading and writing of both Binary and ASCII .brep formats and providing arguments to setup writing of triangulation data and of format version. "binrestore" is made an alias to new command "readbrep". "binsave" now is an alias to new "writebrep" saving into binary format by default ("writebrep" writes into ASCII format by default).
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include <Message_Messenger.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TDF_Attribute.hxx>
|
||||
#include <TDocStd_FormatVersion.hxx>
|
||||
#include <TopLoc_Datum3D.hxx>
|
||||
#include <TopLoc_Location.hxx>
|
||||
#include <TopTools_LocationSet.hxx>
|
||||
@@ -149,7 +150,7 @@ Standard_Boolean XmlMXCAFDoc_LocationDriver::Translate
|
||||
return Standard_False;
|
||||
|
||||
Standard_Integer aFileVer = theMap.GetHeaderData()->StorageVersion().IntegerValue();
|
||||
if( aFileVer > 5 && myLocations == 0 )
|
||||
if( aFileVer >= TDocStd_FormatVersion_VERSION_6 && myLocations == 0 )
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -157,7 +158,7 @@ Standard_Boolean XmlMXCAFDoc_LocationDriver::Translate
|
||||
Standard_Integer aPower;
|
||||
Handle(TopLoc_Datum3D) aDatum;
|
||||
|
||||
if( aFileVer > 5 )
|
||||
if( aFileVer >= TDocStd_FormatVersion_VERSION_6)
|
||||
{
|
||||
// Get Location ID
|
||||
Standard_Integer anId;
|
||||
|
Reference in New Issue
Block a user