Open CASCADE Technology  7.4.0
Public Member Functions
BinTools_ShapeSet Class Reference

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

#include <BinTools_ShapeSet.hxx>

Public Member Functions

 BinTools_ShapeSet (const Standard_Boolean isWithTriangles=Standard_False)
 Builds an empty ShapeSet. Parameter <isWithTriangles> is added for XML Persistence. More...
 
virtual ~BinTools_ShapeSet ()
 
Standard_Boolean IsWithTriangles () const
 Return true if shape should be stored with triangles. More...
 
void SetWithTriangles (const Standard_Boolean isWithTriangles)
 Define if shape will be stored with triangles. Ignored (always written) if face defines only triangulation (no surface). More...
 
void SetFormatNb (const Standard_Integer theFormatNb)
 
Standard_Integer FormatNb () const
 two formats available for the moment: First: does not write CurveOnSurface UV Points into the file on reading calls Check() method. Second: stores CurveOnSurface UV Points. On reading format is recognized from Version string. More...
 
virtual void Clear ()
 Clears the content of the set. More...
 
Standard_Integer Add (const TopoDS_Shape &S)
 Stores <S> and its sub-shape. Returns the index of <S>. The method AddGeometry is called on each sub-shape. More...
 
const TopoDS_ShapeShape (const Standard_Integer I) const
 Returns the sub-shape of index . More...
 
Standard_Integer Index (const TopoDS_Shape &S) const
 Returns the index of <S>. More...
 
const BinTools_LocationSetLocations () const
 
BinTools_LocationSetChangeLocations ()
 
Standard_Integer NbShapes () const
 Returns number of shapes read from file. More...
 
virtual void Write (Standard_OStream &OS) const
 Writes the content of me on the stream <OS> in binary format that can be read back by Read. More...
 
virtual void Read (Standard_IStream &IS)
 Reads the content of me from the binary stream <IS>. me is first cleared. More...
 
virtual void Write (const TopoDS_Shape &S, Standard_OStream &OS) const
 Writes on <OS> the shape <S>. Writes the orientation, the index of the TShape and the index of the Location. More...
 
virtual void WriteGeometry (Standard_OStream &OS) const
 Writes the geometry of me on the stream <OS> in a binary format that can be read back by Read. More...
 
virtual void ReadGeometry (Standard_IStream &IS)
 Reads the geometry of me from the stream <IS>. More...
 
virtual void Read (TopoDS_Shape &S, Standard_IStream &IS, const Standard_Integer NbShapes) const
 Reads from <IS> a shape and returns it in S. <NbShapes> is the number of tshapes in the set. More...
 
virtual void WriteGeometry (const TopoDS_Shape &S, Standard_OStream &OS) const
 Writes the geometry of <S> on the stream <OS> in a binary format that can be read back by Read. More...
 
virtual void ReadGeometry (const TopAbs_ShapeEnum T, Standard_IStream &IS, TopoDS_Shape &S)
 Reads the geometry of a shape of type <T> from the stream <IS> and returns it in <S>. More...
 
virtual void AddGeometry (const TopoDS_Shape &S)
 Stores the goemetry of <S>. More...
 
virtual void AddShapes (TopoDS_Shape &S1, const TopoDS_Shape &S2)
 Inserts the shape <S2> in the shape <S1>. More...
 
void ReadPolygon3D (Standard_IStream &IS)
 Reads the 3d polygons of me from the stream <IS>. More...
 
void WritePolygon3D (Standard_OStream &OS) const
 Writes the 3d polygons on the stream <OS> in a format that can be read back by Read. More...
 
void ReadTriangulation (Standard_IStream &IS)
 Reads the triangulation of me from the stream <IS>. More...
 
void WriteTriangulation (Standard_OStream &OS) const
 Writes the triangulation on the stream <OS> in a format that can be read back by Read. More...
 
void ReadPolygonOnTriangulation (Standard_IStream &IS)
 Reads the polygons on triangulation of me from the stream <IS>. More...
 
void WritePolygonOnTriangulation (Standard_OStream &OS) const
 Writes the polygons on triangulation on the stream <OS> in a format that can be read back by Read. More...
 

Detailed Description

Writes topology in OStream in binary format.

Constructor & Destructor Documentation

◆ BinTools_ShapeSet()

BinTools_ShapeSet::BinTools_ShapeSet ( const Standard_Boolean  isWithTriangles = Standard_False)

Builds an empty ShapeSet. Parameter <isWithTriangles> is added for XML Persistence.

◆ ~BinTools_ShapeSet()

virtual BinTools_ShapeSet::~BinTools_ShapeSet ( )
virtual

Member Function Documentation

◆ Add()

Standard_Integer BinTools_ShapeSet::Add ( const TopoDS_Shape S)

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

◆ AddGeometry()

virtual void BinTools_ShapeSet::AddGeometry ( const TopoDS_Shape S)
virtual

Stores the goemetry of <S>.

◆ 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.

◆ FormatNb()

Standard_Integer BinTools_ShapeSet::FormatNb ( ) const

two formats available for the moment: First: does not write CurveOnSurface UV Points into the file on reading calls Check() method. Second: stores CurveOnSurface UV Points. On reading format is recognized from Version string.

◆ Index()

Standard_Integer BinTools_ShapeSet::Index ( const TopoDS_Shape S) const

Returns the index of <S>.

◆ IsWithTriangles()

Standard_Boolean BinTools_ShapeSet::IsWithTriangles ( ) const
inline

Return true if shape should be stored with triangles.

◆ 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 IS)
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.

◆ Read() [2/2]

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

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

◆ ReadGeometry() [1/2]

virtual void BinTools_ShapeSet::ReadGeometry ( Standard_IStream IS)
virtual

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

◆ ReadGeometry() [2/2]

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

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

◆ ReadPolygon3D()

void BinTools_ShapeSet::ReadPolygon3D ( Standard_IStream IS)

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

◆ ReadPolygonOnTriangulation()

void BinTools_ShapeSet::ReadPolygonOnTriangulation ( Standard_IStream IS)

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

◆ ReadTriangulation()

void BinTools_ShapeSet::ReadTriangulation ( Standard_IStream IS)

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

◆ SetFormatNb()

void BinTools_ShapeSet::SetFormatNb ( const Standard_Integer  theFormatNb)

◆ SetWithTriangles()

void BinTools_ShapeSet::SetWithTriangles ( const Standard_Boolean  isWithTriangles)
inline

Define if shape will be stored with triangles. Ignored (always written) if face defines only triangulation (no surface).

◆ Shape()

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

Returns the sub-shape of index .

◆ Write() [1/2]

virtual void BinTools_ShapeSet::Write ( Standard_OStream OS) const
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.

◆ Write() [2/2]

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

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

◆ WriteGeometry() [1/2]

virtual void BinTools_ShapeSet::WriteGeometry ( Standard_OStream OS) const
virtual

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

◆ WriteGeometry() [2/2]

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

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

◆ WritePolygon3D()

void BinTools_ShapeSet::WritePolygon3D ( Standard_OStream OS) 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

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

◆ WriteTriangulation()

void BinTools_ShapeSet::WriteTriangulation ( Standard_OStream OS) 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: