OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    TopTools_ShapeSet Class Reference

    A ShapeSets contains a Shape and all its sub-shapes and locations. It can be dump, write and read. More...

    #include <TopTools_ShapeSet.hxx>

    Inheritance diagram for TopTools_ShapeSet:

    Public Member Functions

     TopTools_ShapeSet ()
     Builds an empty ShapeSet.
    virtual ~TopTools_ShapeSet ()
    void SetFormatNb (const int theFormatNb)
     Sets the TopTools_FormatVersion.
    int FormatNb () const
     Returns the TopTools_FormatVersion.
    virtual void Clear ()
     Clears the content of the set. This method can be redefined.
    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) const
     Returns the sub-shape of index .
    int Index (const TopoDS_Shape &S) const
     Returns the index of .
    const TopTools_LocationSetLocations () const
    TopTools_LocationSetChangeLocations ()
    Standard_OStreamDumpExtent (Standard_OStream &OS) const
     Dumps the number of objects in me on the stream <OS>. (Number of shapes of each type).
    void DumpExtent (TCollection_AsciiString &S) const
     Dumps the number of objects in me in the string S (Number of shapes of each type).
    virtual void Dump (Standard_OStream &OS) const
     Dumps the content of me on the stream <OS>.
    virtual void Write (Standard_OStream &OS, const Message_ProgressRange &theProgress=Message_ProgressRange())
     Writes the content of me on the stream <OS> in a format that can be read back by Read.
    virtual void Read (Standard_IStream &IS, const Message_ProgressRange &theProgress=Message_ProgressRange())
     Reads the content of me from the stream <IS>. me is first cleared.
    void Dump (const TopoDS_Shape &S, Standard_OStream &OS) const
     Dumps on <OS> the shape . Dumps the orientation, the index of the TShape and the index of the Location.
    void Write (const TopoDS_Shape &S, Standard_OStream &OS) const
     Writes on <OS> the shape . Writes the orientation, the index of the TShape and the index of the Location.
    void Read (TopoDS_Shape &S, Standard_IStream &IS) const
     Reads from <IS> a shape and returns it in S.
    virtual void AddGeometry (const TopoDS_Shape &S)
     Stores the geometry of .
    virtual void DumpGeometry (Standard_OStream &OS) const
     Dumps the geometry of me on the stream <OS>.
    virtual void WriteGeometry (Standard_OStream &OS, const Message_ProgressRange &theProgress=Message_ProgressRange())
     Writes the geometry of me on the stream <OS> in a format that can be read back by Read.
    virtual void ReadGeometry (Standard_IStream &IS, const Message_ProgressRange &theProgress=Message_ProgressRange())
     Reads the geometry of me from the stream <IS>.
    virtual void DumpGeometry (const TopoDS_Shape &S, Standard_OStream &OS) const
     Dumps the geometry of on the stream <OS>.
    virtual void WriteGeometry (const TopoDS_Shape &S, Standard_OStream &OS) const
     Writes the geometry of on the stream <OS> in a format that can be read back by Read.
    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 .
    virtual void AddShapes (TopoDS_Shape &S1, const TopoDS_Shape &S2)
     Inserts the shape <S2> in the shape <S1>. This method must be redefined to use the correct builder.
    virtual void Check (const TopAbs_ShapeEnum T, TopoDS_Shape &S)
     This method is called after each new completed shape. <T> is the type. is the shape. In this class it does nothing, but it gives the opportunity in derived classes to perform extra treatment on shapes.
    int NbShapes () const
     Returns number of shapes read from file.

    Static Public Attributes

    static const char *const THE_ASCII_VERSIONS [TopTools_FormatVersion_VERSION_3+1]

    Detailed Description

    A ShapeSets contains a Shape and all its sub-shapes and locations. It can be dump, write and read.

    Methods to handle the geometry can be redefined.

    Constructor & Destructor Documentation

    ◆ TopTools_ShapeSet()

    TopTools_ShapeSet::TopTools_ShapeSet ( )

    Builds an empty ShapeSet.

    ◆ ~TopTools_ShapeSet()

    virtual TopTools_ShapeSet::~TopTools_ShapeSet ( )
    virtual

    Member Function Documentation

    ◆ Add()

    int TopTools_ShapeSet::Add ( const TopoDS_Shape & S)

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

    ◆ AddGeometry()

    virtual void TopTools_ShapeSet::AddGeometry ( const TopoDS_Shape & S)
    virtual

    Stores the geometry of .

    Reimplemented in BRepTools_ShapeSet.

    ◆ AddShapes()

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

    Inserts the shape <S2> in the shape <S1>. This method must be redefined to use the correct builder.

    Reimplemented in BRepTools_ShapeSet.

    ◆ ChangeLocations()

    TopTools_LocationSet & TopTools_ShapeSet::ChangeLocations ( )

    ◆ Check()

    virtual void TopTools_ShapeSet::Check ( const TopAbs_ShapeEnum T,
    TopoDS_Shape & S )
    virtual

    This method is called after each new completed shape. <T> is the type. is the shape. In this class it does nothing, but it gives the opportunity in derived classes to perform extra treatment on shapes.

    Reimplemented in BRepTools_ShapeSet.

    ◆ Clear()

    virtual void TopTools_ShapeSet::Clear ( )
    virtual

    Clears the content of the set. This method can be redefined.

    Reimplemented in BRepTools_ShapeSet.

    ◆ Dump() [1/2]

    void TopTools_ShapeSet::Dump ( const TopoDS_Shape & S,
    Standard_OStream & OS ) const

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

    ◆ Dump() [2/2]

    virtual void TopTools_ShapeSet::Dump ( Standard_OStream & OS) const
    virtual

    Dumps the content of me on the stream <OS>.

    Dumps the shapes from first to last. For each Shape Dump the type, the flags, the subshapes calls DumpGeometry(S)

    Dumps the geometry calling DumpGeometry.

    Dumps the locations.

    ◆ DumpExtent() [1/2]

    Standard_OStream & TopTools_ShapeSet::DumpExtent ( Standard_OStream & OS) const

    Dumps the number of objects in me on the stream <OS>. (Number of shapes of each type).

    ◆ DumpExtent() [2/2]

    void TopTools_ShapeSet::DumpExtent ( TCollection_AsciiString & S) const

    Dumps the number of objects in me in the string S (Number of shapes of each type).

    ◆ DumpGeometry() [1/2]

    virtual void TopTools_ShapeSet::DumpGeometry ( const TopoDS_Shape & S,
    Standard_OStream & OS ) const
    virtual

    Dumps the geometry of on the stream <OS>.

    Reimplemented in BRepTools_ShapeSet.

    ◆ DumpGeometry() [2/2]

    virtual void TopTools_ShapeSet::DumpGeometry ( Standard_OStream & OS) const
    virtual

    Dumps the geometry of me on the stream <OS>.

    Reimplemented in BRepTools_ShapeSet.

    ◆ FormatNb()

    int TopTools_ShapeSet::FormatNb ( ) const

    Returns the TopTools_FormatVersion.

    ◆ Index()

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

    Returns the index of .

    ◆ Locations()

    const TopTools_LocationSet & TopTools_ShapeSet::Locations ( ) const

    ◆ NbShapes()

    int TopTools_ShapeSet::NbShapes ( ) const

    Returns number of shapes read from file.

    ◆ Read() [1/2]

    virtual void TopTools_ShapeSet::Read ( Standard_IStream & IS,
    const Message_ProgressRange & theProgress = Message_ProgressRange() )
    virtual

    Reads the content of me from the 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]

    void TopTools_ShapeSet::Read ( TopoDS_Shape & S,
    Standard_IStream & IS ) const

    Reads from <IS> a shape and returns it in S.

    ◆ ReadGeometry() [1/2]

    virtual void TopTools_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 .

    Reimplemented in BRepTools_ShapeSet.

    ◆ ReadGeometry() [2/2]

    virtual void TopTools_ShapeSet::ReadGeometry ( Standard_IStream & IS,
    const Message_ProgressRange & theProgress = Message_ProgressRange() )
    virtual

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

    Reimplemented in BRepTools_ShapeSet.

    ◆ SetFormatNb()

    void TopTools_ShapeSet::SetFormatNb ( const int theFormatNb)

    ◆ Shape()

    const TopoDS_Shape & TopTools_ShapeSet::Shape ( const int I) const

    Returns the sub-shape of index .

    ◆ Write() [1/2]

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

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

    ◆ Write() [2/2]

    virtual void TopTools_ShapeSet::Write ( Standard_OStream & OS,
    const Message_ProgressRange & theProgress = Message_ProgressRange() )
    virtual

    Writes the content of me on the stream <OS> in a 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.

    ◆ WriteGeometry() [1/2]

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

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

    Reimplemented in BRepTools_ShapeSet.

    ◆ WriteGeometry() [2/2]

    virtual void TopTools_ShapeSet::WriteGeometry ( Standard_OStream & OS,
    const Message_ProgressRange & theProgress = Message_ProgressRange() )
    virtual

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

    Reimplemented in BRepTools_ShapeSet.

    Field Documentation

    ◆ THE_ASCII_VERSIONS

    const char* const TopTools_ShapeSet::THE_ASCII_VERSIONS[TopTools_FormatVersion_VERSION_3+1]
    static

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