|
SHAPER
9.15.0
|
Sort shapes by their centers of mass, using formula X*999 + Y*99 + Z*0.9. More...
Public Types | |
| enum | ShapeOrder { ORDER_BY_HASH_VALUE , ORDER_BY_MIDDLE_POINT } |
| Different orders of shape explosion. More... | |
Public Member Functions | |
| GeomAlgoAPI_NExplode (const GeomShapePtr theContext, const GeomAPI_Shape::ShapeType theShapeType, const ShapeOrder theOrder=ORDER_BY_MIDDLE_POINT) | |
| Initializes the sorted list of shapes by the context shape and type of sub-shapes. More... | |
| GeomAlgoAPI_NExplode (const ListOfShape &theShapes, const ShapeOrder theOrder=ORDER_BY_MIDDLE_POINT) | |
| Initializes the sorted list of shapes. More... | |
| int | index (const GeomShapePtr theSubShape) |
| Returns an index (started from one) of sub-shape in the sorted list. Returns 0 if not found. More... | |
| GeomShapePtr | shape (const int theIndex) |
| Returns a shape by an index (started from one). Returns null if not found. More... | |
| void | reorder (const ShapeOrder theNewOrder) |
| Reorder the shapes. More... | |
Protected Attributes | |
| std::vector< GeomShapePtr > | mySorted |
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.
| GeomAlgoAPI_NExplode::GeomAlgoAPI_NExplode | ( | const GeomShapePtr | theContext, |
| const GeomAPI_Shape::ShapeType | theShapeType, | ||
| const ShapeOrder | theOrder = ORDER_BY_MIDDLE_POINT |
||
| ) |
Initializes the sorted list of shapes by the context shape and type of sub-shapes.
| GeomAlgoAPI_NExplode::GeomAlgoAPI_NExplode | ( | const ListOfShape & | theShapes, |
| const ShapeOrder | theOrder = ORDER_BY_MIDDLE_POINT |
||
| ) |
Initializes the sorted list of shapes.
| int GeomAlgoAPI_NExplode::index | ( | const GeomShapePtr | theSubShape | ) |
Returns an index (started from one) of sub-shape in the sorted list. Returns 0 if not found.
| GeomShapePtr GeomAlgoAPI_NExplode::shape | ( | const int | theIndex | ) |
Returns a shape by an index (started from one). Returns null if not found.
| void GeomAlgoAPI_NExplode::reorder | ( | const ShapeOrder | theNewOrder | ) |
Reorder the shapes.