// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _ShapeExtend_Explorer_HeaderFile #define _ShapeExtend_Explorer_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_Macro_HeaderFile #include #endif #ifndef _Handle_TopTools_HSequenceOfShape_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif #ifndef _TopAbs_ShapeEnum_HeaderFile #include #endif class Standard_TypeMismatch; class TopoDS_Shape; class TopTools_HSequenceOfShape; class TopTools_ListOfShape; //! This class is intended to
//! explore shapes and convert different representations
//! (list, sequence, compound) of complex shapes. It provides tools for:
//! - obtaining type of the shapes in context of TopoDS_Compound,
//! - exploring shapes in context of TopoDS_Compound,
//! - converting different representations of shapes (list, sequence, compound).
class ShapeExtend_Explorer { public: void* operator new(size_t,void* anAddress) { return anAddress; } void* operator new(size_t size) { return Standard::Allocate(size); } void operator delete(void *anAddress) { if (anAddress) Standard::Free((Standard_Address&)anAddress); } //! Creates an object Explorer
Standard_EXPORT ShapeExtend_Explorer(); //! Converts a sequence of Shapes to a Compound
Standard_EXPORT TopoDS_Shape CompoundFromSeq(const Handle(TopTools_HSequenceOfShape)& seqval) const; //! Converts a Compound to a list of Shapes
//! if is not a compound, the list contains only
//! if is Null, the list is empty
//! if is a Compound, its sub-shapes are put into the list
//! then if is True, if a sub-shape is a Compound, it
//! is not put to the list but its sub-shapes are (recursive)
Standard_EXPORT Handle_TopTools_HSequenceOfShape SeqFromCompound(const TopoDS_Shape& comp,const Standard_Boolean expcomp) const; //! Converts a Sequence of Shapes to a List of Shapes
//! if True (D), commands the list to start from scratch
//! else, the list is cumulated
Standard_EXPORT void ListFromSeq(const Handle(TopTools_HSequenceOfShape)& seqval,TopTools_ListOfShape& lisval,const Standard_Boolean clear = Standard_True) const; //! Converts a List of Shapes to a Sequence of Shapes
Standard_EXPORT Handle_TopTools_HSequenceOfShape SeqFromList(const TopTools_ListOfShape& lisval) const; //! Returns the type of a Shape: true type if is False
//! If is True and 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
Standard_EXPORT TopAbs_ShapeEnum ShapeType(const TopoDS_Shape& shape,const Standard_Boolean compound) const; //! Builds a COMPOUND from the given shape.
//! It explores the shape level by level, according to the
//! argument. If is False, only COMPOUND
//! items are explored, else all items are.
//! The following shapes are added to resulting compound:
//! - shapes which comply to
//! - if is WIRE, considers also free edges (and makes wires)
//! - if is SHELL, considers also free faces (and makes shells)
//! If is True, gathers items in compounds which
//! correspond to starting COMPOUND,SOLID or SHELL containers, or
//! items directly contained in a Compound
Standard_EXPORT TopoDS_Shape SortedCompound(const TopoDS_Shape& shape,const TopAbs_ShapeEnum type,const Standard_Boolean explore,const Standard_Boolean compound) 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
Standard_EXPORT 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; protected: private: }; // other Inline functions and methods (like "C++: function call" methods) #endif