|
Open CASCADE Technology
6.7.1
|
Rebuilds a Shape by making pre-defined substitutions on some
of its components
In a first phase, it records requests to replace or remove
some individual shapes
For each shape, the last given request is recorded
Requests may be applied "Oriented" (i.e. only to an item with
the SAME orientation) or not (the orientation of replacing
shape is respectful of that of the original one)
Then, these requests may be applied to any shape which may
contain one or more of these individual shapes
More...
#include <BRepTools_ReShape.hxx>

Public Member Functions | |
| BRepTools_ReShape () | |
| Returns an empty Reshape More... | |
| void | Clear () |
| Clears all substitutions requests More... | |
| void | Remove (const TopoDS_Shape &shape, const Standard_Boolean oriented=Standard_False) |
| Sets a request to Remove a Shape If <oriented> is True, only for a shape with the SAME orientation. Else, whatever the orientation More... | |
| void | Replace (const TopoDS_Shape &shape, const TopoDS_Shape &newshape, const Standard_Boolean oriented=Standard_False) |
| Sets a request to Replace a Shape by a new one If <oriented> is True, only if the orientation is the same Else, whatever the orientation, and the new shape takes the same orientation as <newshape> if the replaced one has the same as <shape>, else it is reversed More... | |
| Standard_Boolean | IsRecorded (const TopoDS_Shape &shape) const |
| Tells if a shape is recorded for Replace/Remove More... | |
| TopoDS_Shape | Value (const TopoDS_Shape &shape) const |
| Returns the new value for an individual shape If not recorded, returns the original shape itself If to be Removed, returns a Null Shape Else, returns the replacing item More... | |
| virtual Standard_Integer | Status (const TopoDS_Shape &shape, TopoDS_Shape &newsh, const Standard_Boolean last=Standard_False) |
| Returns a complete substitution status for a shape 0 : not recorded, <newsh> = original <shape> < 0: to be removed, <newsh> is NULL > 0: to be replaced, <newsh> is a new item If <last> is False, returns status and new shape recorded in the map directly for the shape, if True and status > 0 then recursively searches for the last status and new shape. More... | |
| virtual TopoDS_Shape | Apply (const TopoDS_Shape &shape, const TopAbs_ShapeEnum until, const Standard_Integer buildmode) |
Applies the substitutions requests to a shape <br> | |
| virtual TopoDS_Shape | Apply (const TopoDS_Shape &shape, const TopAbs_ShapeEnum until=TopAbs_SHAPE) |
Applies the substitutions requests to a shape. <br> | |
| Standard_Boolean & | ModeConsiderLocation () |
| Returns (modifiable) the flag which defines whether Location of shape take into account during replacing shapes. More... | |
| Standard_Boolean & | ModeConsiderOrientation () |
| Returns (modifiable) the flag which defines whether Orientation of shape take into account during replacing shapes. More... | |
Public Member Functions inherited from MMgt_TShared | |
| virtual void | Delete () const |
| Memory deallocator for transient classes. More... | |
Public Member Functions inherited from Standard_Transient | |
| Standard_Transient () | |
| Empty constructor. More... | |
| Standard_Transient (const Standard_Transient &) | |
| Copy constructor – does nothing. More... | |
| Standard_Transient & | operator= (const Standard_Transient &) |
| Assignment operator, needed to avoid copying reference counter. More... | |
| virtual | ~Standard_Transient () |
| Destructor must be virtual. More... | |
| virtual void | ShallowDump (Standard_OStream &) const |
| virtual const Handle_Standard_Type & | DynamicType () const |
| Returns a type information object about this object. More... | |
| Standard_Boolean | IsInstance (const Handle_Standard_Type &theType) const |
| Returns a true value if this is an instance of Type. More... | |
| Standard_Boolean | IsInstance (const Standard_CString theTypeName) const |
| Returns a true value if this is an instance of TypeName. More... | |
| Standard_Boolean | IsKind (const Handle_Standard_Type &theType) const |
| Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More... | |
| Standard_Boolean | IsKind (const Standard_CString theTypeName) const |
| Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More... | |
| virtual Handle_Standard_Transient | This () const |
| Returns a Handle which references this object. Must never be called to objects created in stack. More... | |
| Standard_Integer | GetRefCount () const |
| Get the reference counter of this object. More... | |
Protected Attributes | |
| TopTools_DataMapOfShapeShape | myNMap |
| TopTools_DataMapOfShapeShape | myRMap |
| Standard_Integer | myStatus |
Rebuilds a Shape by making pre-defined substitutions on some
of its components
In a first phase, it records requests to replace or remove
some individual shapes
For each shape, the last given request is recorded
Requests may be applied "Oriented" (i.e. only to an item with
the SAME orientation) or not (the orientation of replacing
shape is respectful of that of the original one)
Then, these requests may be applied to any shape which may
contain one or more of these individual shapes
| BRepTools_ReShape::BRepTools_ReShape | ( | ) |
Returns an empty Reshape
|
virtual |
Applies the substitutions requests to a shape <br>
<until> gives the level of type until which requests are taken
into account. For subshapes of the type <until> no rebuild
and futher exploring are done.
ACTUALLY, NOT IMPLEMENTED BELOW TopAbs_FACE
<buildmode> says how to do on a SOLID,SHELL ... if one of its
sub-shapes has been changed:
0: at least one Replace or Remove -> COMPOUND, else as such
1: at least one Remove (Replace are ignored) -> COMPOUND
2: Replace and Remove are both ignored
If Replace/Remove are ignored or absent, the result as same
type as the starting shape
Reimplemented in ShapeBuild_ReShape.
|
virtual |
Applies the substitutions requests to a shape. <br>
<until> gives the level of type until which requests are taken
into account. For subshapes of the type <until> no rebuild
and futher exploring are done.
NOTE: each subshape can be replaced by shape of the same type
or by shape containing only shapes of that type (for
example, TopoDS_Edge can be replaced by TopoDS_Edge,
TopoDS_Wire or TopoDS_Compound containing TopoDS_Edges).
If incompatible shape type is encountered, it is ignored
and flag FAIL1 is set in Status.
Reimplemented in ShapeBuild_ReShape.
| void BRepTools_ReShape::Clear | ( | ) |
Clears all substitutions requests
| Standard_Boolean BRepTools_ReShape::IsRecorded | ( | const TopoDS_Shape & | shape | ) | const |
Tells if a shape is recorded for Replace/Remove
| Standard_Boolean& BRepTools_ReShape::ModeConsiderLocation | ( | ) |
Returns (modifiable) the flag which defines whether Location of shape take into account
during replacing shapes.
| Standard_Boolean& BRepTools_ReShape::ModeConsiderOrientation | ( | ) |
Returns (modifiable) the flag which defines whether Orientation of shape take into account
during replacing shapes.
| void BRepTools_ReShape::Remove | ( | const TopoDS_Shape & | shape, |
| const Standard_Boolean | oriented = Standard_False |
||
| ) |
Sets a request to Remove a Shape
If <oriented> is True, only for a shape with the SAME
orientation. Else, whatever the orientation
| void BRepTools_ReShape::Replace | ( | const TopoDS_Shape & | shape, |
| const TopoDS_Shape & | newshape, | ||
| const Standard_Boolean | oriented = Standard_False |
||
| ) |
Sets a request to Replace a Shape by a new one
If <oriented> is True, only if the orientation is the same
Else, whatever the orientation, and the new shape takes the
same orientation as <newshape> if the replaced one has the
same as <shape>, else it is reversed
|
virtual |
Returns a complete substitution status for a shape
0 : not recorded, <newsh> = original <shape>
< 0: to be removed, <newsh> is NULL
> 0: to be replaced, <newsh> is a new item
If <last> is False, returns status and new shape recorded in
the map directly for the shape, if True and status > 0 then
recursively searches for the last status and new shape.
Reimplemented in ShapeBuild_ReShape.
| TopoDS_Shape BRepTools_ReShape::Value | ( | const TopoDS_Shape & | shape | ) | const |
Returns the new value for an individual shape
If not recorded, returns the original shape itself
If to be Removed, returns a Null Shape
Else, returns the replacing item
|
protected |
|
protected |
|
protected |
1.8.5