Open CASCADE Technology 7.8.2.dev
BinTools_ShapeSet Class Reference

Writes topology in OStream in binary format. More...

#include <BinTools_ShapeSet.hxx>

Inheritance diagram for BinTools_ShapeSet:

Public Member Functions

 BinTools_ShapeSet ()
 Builds an empty ShapeSet.
 
virtual ~BinTools_ShapeSet ()
 
virtual void Clear ()
 Clears the content of the set.
 
Standard_Integer Add (const TopoDS_Shape &S)
 Stores and its sub-shape. Returns the index of . The method AddGeometry is called on each sub-shape.
 
const TopoDS_ShapeShape (const Standard_Integer I)
 Returns the sub-shape of index .
 
Standard_Integer Index (const TopoDS_Shape &S) const
 Returns the index of .
 
const BinTools_LocationSetLocations () const
 
BinTools_LocationSetChangeLocations ()
 
Standard_Integer NbShapes () const
 Returns number of shapes read from file.
 
virtual void Write (Standard_OStream &OS, const Message_ProgressRange &theRange=Message_ProgressRange())
 Writes the content of me on the stream <OS> in binary format that can be read back by Read.
 
virtual void Read (Standard_IStream &IS, const Message_ProgressRange &theRange=Message_ProgressRange())
 Reads the content of me from the binary stream <IS>. me is first cleared.
 
virtual void Write (const TopoDS_Shape &S, Standard_OStream &OS)
 Writes on <OS> the shape . Writes the orientation, the index of the TShape and the index of the Location.
 
virtual void WriteGeometry (Standard_OStream &OS, const Message_ProgressRange &theRange=Message_ProgressRange()) const
 Writes the geometry of me on the stream <OS> in a binary format that can be read back by Read.
 
virtual void ReadGeometry (Standard_IStream &IS, const Message_ProgressRange &theRange=Message_ProgressRange())
 Reads the geometry of me from the stream <IS>.
 
virtual void ReadFlagsAndSubs (TopoDS_Shape &S, const TopAbs_ShapeEnum T, Standard_IStream &IS, const Standard_Integer NbShapes)
 Reads from <IS> a shape flags and sub-shapes and modifies S.
 
virtual void ReadSubs (TopoDS_Shape &S, Standard_IStream &IS, const Standard_Integer NbShapes)
 Reads from <IS> a shape and returns it in S. <NbShapes> is the number of tshapes in the set.
 
virtual void Read (Standard_IStream &, TopoDS_Shape &)
 An empty virtual method for redefinition in shape-reader.
 
virtual void WriteShape (const TopoDS_Shape &S, Standard_OStream &OS) const
 Writes the shape on the stream <OS> in a binary format that can be read back by Read.
 
virtual void ReadShape (const TopAbs_ShapeEnum T, Standard_IStream &IS, TopoDS_Shape &S)
 Reads a shape of type <T> from the stream <IS> and returns it in .
 
virtual void AddShape (const TopoDS_Shape &S)
 Stores the shape .
 
virtual void AddShapes (TopoDS_Shape &S1, const TopoDS_Shape &S2)
 Inserts the shape <S2> in the shape <S1>.
 
void ReadPolygon3D (Standard_IStream &IS, const Message_ProgressRange &theRange=Message_ProgressRange())
 Reads the 3d polygons of me from the stream <IS>.
 
void WritePolygon3D (Standard_OStream &OS, const Message_ProgressRange &theRange=Message_ProgressRange()) const
 Writes the 3d polygons on the stream <OS> in a format that can be read back by Read.
 
void ReadTriangulation (Standard_IStream &IS, const Message_ProgressRange &theRange=Message_ProgressRange())
 Reads the triangulation of me from the stream <IS>.
 
void WriteTriangulation (Standard_OStream &OS, const Message_ProgressRange &theRange=Message_ProgressRange()) const
 Writes the triangulation on the stream <OS> in a format that can be read back by Read.
 
void ReadPolygonOnTriangulation (Standard_IStream &IS, const Message_ProgressRange &theRange=Message_ProgressRange())
 Reads the polygons on triangulation of me from the stream <IS>.
 
void WritePolygonOnTriangulation (Standard_OStream &OS, const Message_ProgressRange &theRange=Message_ProgressRange()) const
 Writes the polygons on triangulation on the stream <OS> in a format that can be read back by Read.
 
- Public Member Functions inherited from BinTools_ShapeSetBase
 BinTools_ShapeSetBase ()
 A default constructor.
 
virtual ~BinTools_ShapeSetBase ()
 
Standard_Boolean IsWithTriangles () const
 Return true if shape should be stored with triangles.
 
Standard_Boolean IsWithNormals () const
 Return true if shape should be stored triangulation with normals.
 
void SetWithTriangles (const Standard_Boolean theWithTriangles)
 Define if shape will be stored with triangles. Ignored (always written) if face defines only triangulation (no surface).
 
void SetWithNormals (const Standard_Boolean theWithNormals)
 Define if shape will be stored triangulation with normals. Ignored (always written) if face defines only triangulation (no surface).
 
void SetFormatNb (const Standard_Integer theFormatNb)
 Sets the BinTools_FormatVersion.
 
Standard_Integer FormatNb () const
 Returns the BinTools_FormatVersion.
 

Additional Inherited Members

- Static Public Attributes inherited from BinTools_ShapeSetBase
static const Standard_CString THE_ASCII_VERSIONS [BinTools_FormatVersion_UPPER+1]
 

Detailed Description

Writes topology in OStream in binary format.

Constructor & Destructor Documentation

◆ BinTools_ShapeSet()

BinTools_ShapeSet::BinTools_ShapeSet ( )

Builds an empty ShapeSet.

Parameters
theWithTriangles[in] flag to write triangulation data

◆ ~BinTools_ShapeSet()

virtual BinTools_ShapeSet::~BinTools_ShapeSet ( )
virtual

Member Function Documentation

◆ Add()

Standard_Integer BinTools_ShapeSet::Add ( const TopoDS_Shape & S)

Stores and its sub-shape. Returns the index of . The method AddGeometry is called on each sub-shape.

◆ AddShape()

virtual void BinTools_ShapeSet::AddShape ( const TopoDS_Shape & S)
virtual

Stores the shape .

◆ AddShapes()

virtual void BinTools_ShapeSet::AddShapes ( TopoDS_Shape & S1,
const TopoDS_Shape & S2 )
virtual

Inserts the shape <S2> in the shape <S1>.

◆ ChangeLocations()

BinTools_LocationSet & BinTools_ShapeSet::ChangeLocations ( )

◆ Clear()

virtual void BinTools_ShapeSet::Clear ( )
virtual

Clears the content of the set.

Reimplemented from BinTools_ShapeSetBase.

◆ Index()

Standard_Integer BinTools_ShapeSet::Index ( const TopoDS_Shape & S) const

Returns the index of .

◆ Locations()

const BinTools_LocationSet & BinTools_ShapeSet::Locations ( ) const

◆ NbShapes()

Standard_Integer BinTools_ShapeSet::NbShapes ( ) const

Returns number of shapes read from file.

◆ Read() [1/2]

virtual void BinTools_ShapeSet::Read ( Standard_IStream & ,
TopoDS_Shape &  )
inlinevirtual

An empty virtual method for redefinition in shape-reader.

Reimplemented from BinTools_ShapeSetBase.

◆ Read() [2/2]

virtual void BinTools_ShapeSet::Read ( Standard_IStream & IS,
const Message_ProgressRange & theRange = Message_ProgressRange() )
virtual

Reads the content of me from the binary stream <IS>. me is first cleared.

Reads the locations.

Reads the geometry calling ReadGeometry.

Reads the shapes. For each shape Reads the type. calls ReadGeometry(T,S). Reads the flag, the subshapes.

Reimplemented from BinTools_ShapeSetBase.

◆ ReadFlagsAndSubs()

virtual void BinTools_ShapeSet::ReadFlagsAndSubs ( TopoDS_Shape & S,
const TopAbs_ShapeEnum T,
Standard_IStream & IS,
const Standard_Integer NbShapes )
virtual

Reads from <IS> a shape flags and sub-shapes and modifies S.

◆ ReadGeometry()

virtual void BinTools_ShapeSet::ReadGeometry ( Standard_IStream & IS,
const Message_ProgressRange & theRange = Message_ProgressRange() )
virtual

Reads the geometry of me from the stream <IS>.

◆ ReadPolygon3D()

void BinTools_ShapeSet::ReadPolygon3D ( Standard_IStream & IS,
const Message_ProgressRange & theRange = Message_ProgressRange() )

Reads the 3d polygons of me from the stream <IS>.

◆ ReadPolygonOnTriangulation()

void BinTools_ShapeSet::ReadPolygonOnTriangulation ( Standard_IStream & IS,
const Message_ProgressRange & theRange = Message_ProgressRange() )

Reads the polygons on triangulation of me from the stream <IS>.

◆ ReadShape()

virtual void BinTools_ShapeSet::ReadShape ( const TopAbs_ShapeEnum T,
Standard_IStream & IS,
TopoDS_Shape & S )
virtual

Reads a shape of type <T> from the stream <IS> and returns it in .

◆ ReadSubs()

virtual void BinTools_ShapeSet::ReadSubs ( TopoDS_Shape & S,
Standard_IStream & IS,
const Standard_Integer NbShapes )
virtual

Reads from <IS> a shape and returns it in S. <NbShapes> is the number of tshapes in the set.

◆ ReadTriangulation()

void BinTools_ShapeSet::ReadTriangulation ( Standard_IStream & IS,
const Message_ProgressRange & theRange = Message_ProgressRange() )

Reads the triangulation of me from the stream <IS>.

◆ Shape()

const TopoDS_Shape & BinTools_ShapeSet::Shape ( const Standard_Integer I)

Returns the sub-shape of index .

◆ Write() [1/2]

virtual void BinTools_ShapeSet::Write ( const TopoDS_Shape & S,
Standard_OStream & OS )
virtual

Writes on <OS> the shape . Writes the orientation, the index of the TShape and the index of the Location.

Reimplemented from BinTools_ShapeSetBase.

◆ Write() [2/2]

virtual void BinTools_ShapeSet::Write ( Standard_OStream & OS,
const Message_ProgressRange & theRange = Message_ProgressRange() )
virtual

Writes the content of me on the stream <OS> in binary format that can be read back by Read.

Writes the locations.

Writes the geometry calling WriteGeometry.

Dumps the shapes from last to first. For each shape : Write the type. calls WriteGeometry(S). Write the flags, the subshapes.

Reimplemented from BinTools_ShapeSetBase.

◆ WriteGeometry()

virtual void BinTools_ShapeSet::WriteGeometry ( Standard_OStream & OS,
const Message_ProgressRange & theRange = Message_ProgressRange() ) const
virtual

Writes the geometry of me on the stream <OS> in a binary format that can be read back by Read.

◆ WritePolygon3D()

void BinTools_ShapeSet::WritePolygon3D ( Standard_OStream & OS,
const Message_ProgressRange & theRange = Message_ProgressRange() ) const

Writes the 3d polygons on the stream <OS> in a format that can be read back by Read.

◆ WritePolygonOnTriangulation()

void BinTools_ShapeSet::WritePolygonOnTriangulation ( Standard_OStream & OS,
const Message_ProgressRange & theRange = Message_ProgressRange() ) const

Writes the polygons on triangulation on the stream <OS> in a format that can be read back by Read.

◆ WriteShape()

virtual void BinTools_ShapeSet::WriteShape ( const TopoDS_Shape & S,
Standard_OStream & OS ) const
virtual

Writes the shape on the stream <OS> in a binary format that can be read back by Read.

◆ WriteTriangulation()

void BinTools_ShapeSet::WriteTriangulation ( Standard_OStream & OS,
const Message_ProgressRange & theRange = Message_ProgressRange() ) const

Writes the triangulation on the stream <OS> in a format that can be read back by Read.


The documentation for this class was generated from the following file: