OCC Main Page | ModelingData | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

ModelingData
TKBRep
BRepTools


BRepTools_ReShape Class Reference

Rebuilds a Shape by making pre-defined substitutions on some
of its components
.

#include <BRepTools_ReShape.hxx>


Public Member Functions

Standard_EXPORT BRepTools_ReShape ()
 Returns an empty Reshape
.
Standard_EXPORT void Clear ()
 Clears all substitutions requests
.
Standard_EXPORT 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
.
Standard_EXPORT 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
.
Standard_EXPORT Standard_Boolean IsRecorded (const TopoDS_Shape &shape) const
 Tells if a shape is recorded for Replace/Remove
.
Standard_EXPORT 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
.
virtual Standard_EXPORT 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.
.
virtual Standard_EXPORT TopoDS_Shape Apply (const TopoDS_Shape &shape, const TopAbs_ShapeEnum until, const Standard_Integer buildmode)
 Applies the substitutions requests to a shape

<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
.
virtual Standard_EXPORT TopoDS_Shape Apply (const TopoDS_Shape &shape, const TopAbs_ShapeEnum until=TopAbs_SHAPE)
 Applies the substitutions requests to a shape.

<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.
.
Standard_EXPORT Standard_Boolean & ModeConsiderLocation ()
 Returns (modifiable) the flag which defines whether Location of shape take into account
during replacing shapes.
.
Standard_EXPORT Standard_Boolean & ModeConsiderOrientation ()
 Returns (modifiable) the flag which defines whether Orientation of shape take into account
during replacing shapes.
.
Standard_EXPORT const Handle (Standard_Type)&DynamicType() const

Protected Attributes

Standard_Integer myStatus

Private Attributes

TopTools_DataMapOfShapeShape myNMap
TopTools_DataMapOfShapeShape myRMap
Standard_Boolean myConsiderLocation
Standard_Boolean myConsiderOrientation


Constructor & Destructor Documentation

Standard_EXPORT BRepTools_ReShape::BRepTools_ReShape  ) 
 


Member Function Documentation

virtual Standard_EXPORT TopoDS_Shape BRepTools_ReShape::Apply const TopoDS_Shape shape,
const TopAbs_ShapeEnum  until = TopAbs_SHAPE
[virtual]
 

virtual Standard_EXPORT TopoDS_Shape BRepTools_ReShape::Apply const TopoDS_Shape shape,
const TopAbs_ShapeEnum  until,
const Standard_Integer  buildmode
[virtual]
 

Standard_EXPORT void BRepTools_ReShape::Clear  ) 
 

Standard_EXPORT const BRepTools_ReShape::Handle Standard_Type   )  const
 

Standard_EXPORT Standard_Boolean BRepTools_ReShape::IsRecorded const TopoDS_Shape shape  )  const
 

Standard_EXPORT Standard_Boolean& BRepTools_ReShape::ModeConsiderLocation  ) 
 

Standard_EXPORT Standard_Boolean& BRepTools_ReShape::ModeConsiderOrientation  ) 
 

Standard_EXPORT void BRepTools_ReShape::Remove const TopoDS_Shape shape,
const Standard_Boolean  oriented = Standard_False
 

Standard_EXPORT void BRepTools_ReShape::Replace const TopoDS_Shape shape,
const TopoDS_Shape newshape,
const Standard_Boolean  oriented = Standard_False
 

virtual Standard_EXPORT Standard_Integer BRepTools_ReShape::Status const TopoDS_Shape shape,
TopoDS_Shape newsh,
const Standard_Boolean  last = Standard_False
[virtual]
 

Standard_EXPORT TopoDS_Shape BRepTools_ReShape::Value const TopoDS_Shape shape  )  const
 


Field Documentation

Standard_Boolean BRepTools_ReShape::myConsiderLocation [private]
 

Standard_Boolean BRepTools_ReShape::myConsiderOrientation [private]
 

TopTools_DataMapOfShapeShape BRepTools_ReShape::myNMap [private]
 

TopTools_DataMapOfShapeShape BRepTools_ReShape::myRMap [private]
 

Standard_Integer BRepTools_ReShape::myStatus [protected]
 


The documentation for this class was generated from the following file:
Generated on Mon Aug 25 13:22:35 2008 for OpenCASCADE by  doxygen 1.4.1