Open CASCADE Technology  7.1.0.beta
Public Member Functions

ShapeExtend_Explorer Class Reference

This class is intended to explore shapes and convert different representations (list, sequence, compound) of complex shapes. It provides tools for: More...

#include <ShapeExtend_Explorer.hxx>

Public Member Functions

 ShapeExtend_Explorer ()
 Creates an object Explorer. More...
 
TopoDS_Shape CompoundFromSeq (const Handle< TopTools_HSequenceOfShape > &seqval) const
 Converts a sequence of Shapes to a Compound. More...
 
Handle< TopTools_HSequenceOfShape > SeqFromCompound (const TopoDS_Shape &comp, const Standard_Boolean expcomp) const
 Converts a Compound to a list of Shapes if <comp> is not a compound, the list contains only <comp> if <comp> is Null, the list is empty if <comp> is a Compound, its sub-shapes are put into the list then if <expcomp> is True, if a sub-shape is a Compound, it is not put to the list but its sub-shapes are (recursive) More...
 
void ListFromSeq (const Handle< TopTools_HSequenceOfShape > &seqval, TopTools_ListOfShape &lisval, const Standard_Boolean clear=Standard_True) const
 Converts a Sequence of Shapes to a List of Shapes <clear> if True (D), commands the list to start from scratch else, the list is cumulated. More...
 
Handle< TopTools_HSequenceOfShape > SeqFromList (const TopTools_ListOfShape &lisval) const
 Converts a List of Shapes to a Sequence of Shapes. More...
 
TopAbs_ShapeEnum ShapeType (const TopoDS_Shape &shape, const Standard_Boolean compound) const
 Returns the type of a Shape: true type if <compound> is False If <compound> is True and <shape> is a Compound, iterates on its items. If all are of the same type, returns this type. Else, returns COMPOUND. If it is empty, returns SHAPE For a Null Shape, returns SHAPE. More...
 
TopoDS_Shape SortedCompound (const TopoDS_Shape &shape, const TopAbs_ShapeEnum type, const Standard_Boolean explore, const Standard_Boolean compound) const
 Builds a COMPOUND from the given shape. It explores the shape level by level, according to the <explore> argument. If <explore> is False, only COMPOUND items are explored, else all items are. The following shapes are added to resulting compound: More...
 
void DispatchList (const Handle< TopTools_HSequenceOfShape > &list, Handle< TopTools_HSequenceOfShape > &vertices, Handle< TopTools_HSequenceOfShape > &edges, Handle< TopTools_HSequenceOfShape > &wires, Handle< TopTools_HSequenceOfShape > &faces, Handle< TopTools_HSequenceOfShape > &shells, Handle< TopTools_HSequenceOfShape > &solids, Handle< TopTools_HSequenceOfShape > &compsols, Handle< TopTools_HSequenceOfShape > &compounds) const
 Dispatches starting list of shapes according to their type, to the appropriate resulting lists For each of these lists, if it is null, it is firstly created else, new items are appended to the already existing ones. More...
 

Detailed Description

This class is intended to explore shapes and convert different representations (list, sequence, compound) of complex shapes. It provides tools for:

Constructor & Destructor Documentation

ShapeExtend_Explorer::ShapeExtend_Explorer ( )

Creates an object Explorer.

Member Function Documentation

TopoDS_Shape ShapeExtend_Explorer::CompoundFromSeq ( const Handle< TopTools_HSequenceOfShape > &  seqval) const

Converts a sequence of Shapes to a Compound.

void ShapeExtend_Explorer::DispatchList ( const Handle< TopTools_HSequenceOfShape > &  list,
Handle< TopTools_HSequenceOfShape > &  vertices,
Handle< TopTools_HSequenceOfShape > &  edges,
Handle< TopTools_HSequenceOfShape > &  wires,
Handle< TopTools_HSequenceOfShape > &  faces,
Handle< TopTools_HSequenceOfShape > &  shells,
Handle< TopTools_HSequenceOfShape > &  solids,
Handle< TopTools_HSequenceOfShape > &  compsols,
Handle< TopTools_HSequenceOfShape > &  compounds 
) const

Dispatches starting list of shapes according to their type, to the appropriate resulting lists For each of these lists, if it is null, it is firstly created else, new items are appended to the already existing ones.

void ShapeExtend_Explorer::ListFromSeq ( const Handle< TopTools_HSequenceOfShape > &  seqval,
TopTools_ListOfShape lisval,
const Standard_Boolean  clear = Standard_True 
) const

Converts a Sequence of Shapes to a List of Shapes <clear> if True (D), commands the list to start from scratch else, the list is cumulated.

Handle< TopTools_HSequenceOfShape > ShapeExtend_Explorer::SeqFromCompound ( const TopoDS_Shape comp,
const Standard_Boolean  expcomp 
) const

Converts a Compound to a list of Shapes if <comp> is not a compound, the list contains only <comp> if <comp> is Null, the list is empty if <comp> is a Compound, its sub-shapes are put into the list then if <expcomp> is True, if a sub-shape is a Compound, it is not put to the list but its sub-shapes are (recursive)

Handle< TopTools_HSequenceOfShape > ShapeExtend_Explorer::SeqFromList ( const TopTools_ListOfShape lisval) const

Converts a List of Shapes to a Sequence of Shapes.

TopAbs_ShapeEnum ShapeExtend_Explorer::ShapeType ( const TopoDS_Shape shape,
const Standard_Boolean  compound 
) const

Returns the type of a Shape: true type if <compound> is False If <compound> is True and <shape> is a Compound, iterates on its items. If all are of the same type, returns this type. Else, returns COMPOUND. If it is empty, returns SHAPE For a Null Shape, returns SHAPE.

TopoDS_Shape ShapeExtend_Explorer::SortedCompound ( const TopoDS_Shape shape,
const TopAbs_ShapeEnum  type,
const Standard_Boolean  explore,
const Standard_Boolean  compound 
) const

Builds a COMPOUND from the given shape. It explores the shape level by level, according to the <explore> argument. If <explore> is False, only COMPOUND items are explored, else all items are. The following shapes are added to resulting compound:

  • shapes which comply to <type>
  • if <type> is WIRE, considers also free edges (and makes wires)
  • if <type> is SHELL, considers also free faces (and makes shells) If <compound> is True, gathers items in compounds which correspond to starting COMPOUND,SOLID or SHELL containers, or items directly contained in a Compound

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