Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions
BinTools_ShapeSet Class Reference

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

#include <BinTools_ShapeSet.hxx>

Inheritance diagram for BinTools_ShapeSet:
Inheritance graph
[legend]

Public Member Functions

 BinTools_ShapeSet ()
 Builds an empty ShapeSet.
 
 ~BinTools_ShapeSet () override
 
void Clear () override
 Clears the content of the set.
 
int 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 int I)
 Returns the sub-shape of index .
 
int Index (const TopoDS_Shape &S) const
 Returns the index of .
 
const BinTools_LocationSetLocations () const
 
BinTools_LocationSetChangeLocations ()
 
int NbShapes () const
 Returns number of shapes read from file.
 
void Write (Standard_OStream &OS, const Message_ProgressRange &theRange=Message_ProgressRange()) override
 Writes the content of me on the stream <OS> in binary format that can be read back by Read.
 
void Read (Standard_IStream &IS, const Message_ProgressRange &theRange=Message_ProgressRange()) override
 Reads the content of me from the binary stream <IS>. me is first cleared.
 
void Write (const TopoDS_Shape &S, Standard_OStream &OS) override
 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 int NbShapes)
 Reads from <IS> a shape flags and sub-shapes and modifies S.
 
virtual void ReadSubs (TopoDS_Shape &S, Standard_IStream &IS, const int NbShapes)
 Reads from <IS> a shape and returns it in S. <NbShapes> is the number of tshapes in the set.
 
void Read (Standard_IStream &, TopoDS_Shape &) override
 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 ()
 
bool IsWithTriangles () const
 Return true if shape should be stored with triangles.
 
bool IsWithNormals () const
 Return true if shape should be stored triangulation with normals.
 
void SetWithTriangles (const bool theWithTriangles)
 Define if shape will be stored with triangles. Ignored (always written) if face defines only triangulation (no surface).
 
void SetWithNormals (const bool theWithNormals)
 Define if shape will be stored triangulation with normals. Ignored (always written) if face defines only triangulation (no surface).
 
void SetFormatNb (const int theFormatNb)
 Sets the BinTools_FormatVersion.
 
int FormatNb () const
 Returns the BinTools_FormatVersion.
 

Additional Inherited Members

- Static Public Attributes inherited from BinTools_ShapeSetBase
static const char *const 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
[in]theWithTrianglesflag to write triangulation data

◆ ~BinTools_ShapeSet()

BinTools_ShapeSet::~BinTools_ShapeSet ( )
override

Member Function Documentation

◆ Add()

int 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()

void BinTools_ShapeSet::Clear ( )
overridevirtual

Clears the content of the set.

Reimplemented from BinTools_ShapeSetBase.

◆ Index()

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

Returns the index of .

◆ Locations()

const BinTools_LocationSet & BinTools_ShapeSet::Locations ( ) const

◆ NbShapes()

int BinTools_ShapeSet::NbShapes ( ) const

Returns number of shapes read from file.

◆ Read() [1/2]

void BinTools_ShapeSet::Read ( Standard_IStream & ,
TopoDS_Shape &  )
inlineoverridevirtual

An empty virtual method for redefinition in shape-reader.

Reimplemented from BinTools_ShapeSetBase.

◆ Read() [2/2]

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

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 int 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 int 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 int I)

Returns the sub-shape of index .

◆ Write() [1/2]

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

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]

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

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: