SHAPER
9.12.0

Sort shapes by their centers of mass, using formula X*999 + Y*99 + Z*0.9. More...
Public Member Functions  
Selector_NExplode (const TopoDS_ListOfShape &theShapes, const bool theOldOrder=false)  
Initializes the sorted list of shapes by the shapes list. More...  
Selector_NExplode (const TopoDS_Shape &theShape, const TopAbs_ShapeEnum theType, const bool theOldOrder=false)  
Initializes the sorted list of shapes by the context shape and type of subshapes. More...  
int  index (const TopoDS_Shape &theSubShape) 
Returns an index (started from one) of subshape in the sorted list. Returns 0 if not found. More...  
TopoDS_Shape  shape (int &theIndex) 
Returns a shape by an index (started from one). More...  
Protected Attributes  
std::shared_ptr< GeomAlgoAPI_NExplode >  mySorted 
keep the ordered list of shapes More...  
bool  myToBeReordered 
the list has to be reordered More...  
Sort shapes by their centers of mass, using formula X*999 + Y*99 + Z*0.9.
Algorithm is copied from GEOM module, which uses nexplode Draw command from OCCT. Used for getting index of sub0shape in WeakNaming algorithm.
Selector_NExplode::Selector_NExplode  (  const TopoDS_ListOfShape &  theShapes, 
const bool  theOldOrder = false 

) 
Initializes the sorted list of shapes by the shapes list.
Selector_NExplode::Selector_NExplode  (  const TopoDS_Shape &  theShape, 
const TopAbs_ShapeEnum  theType,  
const bool  theOldOrder = false 

) 
Initializes the sorted list of shapes by the context shape and type of subshapes.
int Selector_NExplode::index  (  const TopoDS_Shape &  theSubShape  ) 
Returns an index (started from one) of subshape in the sorted list. Returns 0 if not found.
TopoDS_Shape Selector_NExplode::shape  (  int &  theIndex  ) 
Returns a shape by an index (started from one).
Returns null if not found. Recompute the index if the old order was used. The value will contain the new ordered index.

protected 
keep the ordered list of shapes

protected 
the list has to be reordered