# ApplicationFramework
TKBinL
BinTools

# BinTools_ShapeSet Class Reference

Writes topology in OStream in binary format
.

`#include <BinTools_ShapeSet.hxx>`

## Public Member Functions

void * | operator new (size_t, void *anAddress)
void * | operator new (size_t size)
void | operator delete (void *anAddress)
Standard_EXPORT | BinTools_ShapeSet (const Standard_Boolean isWithTriangles=Standard_False)
| Builds an empty ShapeSet. Parameter <iswithtriangles> is added for XML Persistence .
virtual Standard_EXPORT void | Delete ()
virtual Standard_EXPORT | ~BinTools_ShapeSet ()
Standard_EXPORT void | SetFormatNb (const Standard_Integer theFormatNb)
Standard_EXPORT 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.
virtual Standard_EXPORT void | Clear ()
| Clears the content of the set. .
Standard_EXPORT 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. .
Standard_EXPORT const TopoDS_Shape & | Shape (const Standard_Integer I) const
| Returns the sub-shape of index . .
Standard_EXPORT Standard_Integer | Index (const TopoDS_Shape &S) const
| Returns the index of <s>. .
Standard_EXPORT const BinTools_LocationSet & | Locations () const
Standard_EXPORT BinTools_LocationSet & | ChangeLocations ()
Standard_EXPORT Standard_Integer | NbShapes () const
| Returns number of shapes read from file. .
virtual Standard_EXPORT 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. 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. .
virtual Standard_EXPORT void | Read (Standard_IStream &IS)
| 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. .
virtual Standard_EXPORT 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. .
virtual Standard_EXPORT 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. .
virtual Standard_EXPORT void | ReadGeometry (Standard_IStream &IS)
| Reads the geometry of me from the stream <is>. .
virtual Standard_EXPORT 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. .
virtual Standard_EXPORT 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. .
virtual Standard_EXPORT 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>. .
virtual Standard_EXPORT void | AddGeometry (const TopoDS_Shape &S)
| Stores the goemetry of <s>. .
virtual Standard_EXPORT void | AddShapes (TopoDS_Shape &S1, const TopoDS_Shape &S2)
| Inserts the shape <s2> in the shape <s1>. .
Standard_EXPORT void | ReadPolygon3D (Standard_IStream &IS)
| Reads the 3d polygons of me from the stream <is>. .
Standard_EXPORT void | WritePolygon3D (Standard_OStream &OS) const
| Writes the 3d polygons on the stream <os> in a format that can be read back by Read. .
Standard_EXPORT void | ReadTriangulation (Standard_IStream &IS)
| Reads the triangulation of me from the stream <is>. .
Standard_EXPORT void | WriteTriangulation (Standard_OStream &OS) const
| Writes the triangulation on the stream <os> in a format that can be read back by Read. .
Standard_EXPORT void | ReadPolygonOnTriangulation (Standard_IStream &IS)
| Reads the polygons on triangulation of me from the stream <is>. .
Standard_EXPORT 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. .

## Private Attributes

TopTools_IndexedMapOfShape | myShapes
BinTools_LocationSet | myLocations
Standard_Integer | myFormatNb
BRep_Builder | myBuilder
BinTools_SurfaceSet | mySurfaces
BinTools_CurveSet | myCurves
BinTools_Curve2dSet | myCurves2d
TColStd_IndexedMapOfTransient | myPolygons2D
TColStd_IndexedMapOfTransient | myPolygons3D
TColStd_IndexedMapOfTransient | myTriangulations
TColStd_IndexedMapOfTransient | myNodes
Standard_Boolean | myWithTriangles

## Constructor & Destructor Documentation

Standard_EXPORT BinTools_ShapeSet::BinTools_ShapeSet | ( | const Standard_Boolean | isWithTriangles = `Standard_False` | ) |

virtual Standard_EXPORT BinTools_ShapeSet::~BinTools_ShapeSet | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

Standard_EXPORT Standard_Integer BinTools_ShapeSet::Add | ( | const TopoDS_Shape & | S | ) |

virtual Standard_EXPORT void BinTools_ShapeSet::AddGeometry | ( | const TopoDS_Shape & | S | ) | `[virtual]`

virtual Standard_EXPORT void BinTools_ShapeSet::AddShapes | ( | TopoDS_Shape & | S1,
|  | const TopoDS_Shape & | S2
| ) | `[virtual]`

Standard_EXPORT BinTools_LocationSet& BinTools_ShapeSet::ChangeLocations | ( |  | ) |

virtual Standard_EXPORT void BinTools_ShapeSet::Clear | ( |  | ) | `[virtual]`

virtual Standard_EXPORT void BinTools_ShapeSet::Delete | ( |  | ) | `[virtual]`

Standard_EXPORT Standard_Integer BinTools_ShapeSet::FormatNb | ( |  | ) | const

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

Standard_EXPORT const BinTools_LocationSet& BinTools_ShapeSet::Locations | ( |  | ) | const

Standard_EXPORT Standard_Integer BinTools_ShapeSet::NbShapes | ( |  | ) | const

void BinTools_ShapeSet::operator delete | ( | void * | anAddress | ) | `[inline]`

void* BinTools_ShapeSet::operator new | ( | size_t | size | ) | `[inline]`

void* BinTools_ShapeSet::operator new | ( | size_t | ,
|  | void * | anAddress
| ) | `[inline]`

virtual Standard_EXPORT void BinTools_ShapeSet::Read | ( | TopoDS_Shape & | S,
|  | Standard_IStream & | IS,
|  | const Standard_Integer | NbShapes
| ) | const`[virtual]`

virtual Standard_EXPORT void BinTools_ShapeSet::Read | ( | Standard_IStream & | IS | ) | `[virtual]`

virtual Standard_EXPORT void BinTools_ShapeSet::ReadGeometry | ( | const TopAbs_ShapeEnum | T,
|  | Standard_IStream & | IS,
|  | TopoDS_Shape & | S
| ) | `[virtual]`

virtual Standard_EXPORT void BinTools_ShapeSet::ReadGeometry | ( | Standard_IStream & | IS | ) | `[virtual]`

Standard_EXPORT void BinTools_ShapeSet::ReadPolygon3D | ( | Standard_IStream & | IS | ) |

Standard_EXPORT void BinTools_ShapeSet::ReadPolygonOnTriangulation | ( | Standard_IStream & | IS | ) |

Standard_EXPORT void BinTools_ShapeSet::ReadTriangulation | ( | Standard_IStream & | IS | ) |

Standard_EXPORT void BinTools_ShapeSet::SetFormatNb | ( | const Standard_Integer | theFormatNb | ) |

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

virtual Standard_EXPORT void BinTools_ShapeSet::Write | ( | const TopoDS_Shape & | S,
|  | Standard_OStream & | OS
| ) | const`[virtual]`

virtual Standard_EXPORT void BinTools_ShapeSet::Write | ( | Standard_OStream & | OS | ) | const`[virtual]`

virtual Standard_EXPORT void BinTools_ShapeSet::WriteGeometry | ( | const TopoDS_Shape & | S,
|  | Standard_OStream & | OS
| ) | const`[virtual]`

virtual Standard_EXPORT void BinTools_ShapeSet::WriteGeometry | ( | Standard_OStream & | OS | ) | const`[virtual]`

Standard_EXPORT void BinTools_ShapeSet::WritePolygon3D | ( | Standard_OStream & | OS | ) | const

Standard_EXPORT void BinTools_ShapeSet::WritePolygonOnTriangulation | ( | Standard_OStream & | OS | ) | const

Standard_EXPORT void BinTools_ShapeSet::WriteTriangulation | ( | Standard_OStream & | OS | ) | const

## Field Documentation

BRep_Builder BinTools_ShapeSet::myBuilder `[private]`

BinTools_CurveSet BinTools_ShapeSet::myCurves `[private]`

BinTools_Curve2dSet BinTools_ShapeSet::myCurves2d `[private]`

Standard_Integer BinTools_ShapeSet::myFormatNb `[private]`

BinTools_LocationSet BinTools_ShapeSet::myLocations `[private]`

TColStd_IndexedMapOfTransient BinTools_ShapeSet::myNodes `[private]`

TColStd_IndexedMapOfTransient BinTools_ShapeSet::myPolygons2D `[private]`

TColStd_IndexedMapOfTransient BinTools_ShapeSet::myPolygons3D `[private]`

TopTools_IndexedMapOfShape BinTools_ShapeSet::myShapes `[private]`

BinTools_SurfaceSet BinTools_ShapeSet::mySurfaces `[private]`

TColStd_IndexedMapOfTransient BinTools_ShapeSet::myTriangulations `[private]`

Standard_Boolean BinTools_ShapeSet::myWithTriangles `[private]`

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

- BinTools_ShapeSet.hxx