-- File: BRepTools_Substitution.cdl -- Created: Tue Mar 28 09:17:56 1995 -- Author: Yves FRICAUD -- ---Copyright: Matra Datavision 1995 class Substitution from BRepTools ---Purpose: A tool to substitute subshapes by other shapes. -- -- -- The user use the method Substitute to define the -- modifications. -- A set of shapes is designated to replace a initial -- shape. -- -- The method Build reconstructs a new Shape with the -- modifications.The Shape and the new shape are -- registered. -- uses Shape from TopoDS, ListOfShape from TopTools, DataMapOfShapeListOfShape from TopTools raises NoSuchObject from Standard is Create returns Substitution from BRepTools; Clear ( me : in out) ---Purpose: Reset all the fields. is static; Substitute (me : in out; OldShape : Shape from TopoDS; NewShapes : ListOfShape from TopTools) ---Purpose: will be replaced by . -- -- can be empty , in this case -- will disparate from its ancestors. -- -- if an item of is oriented FORWARD. -- it will be oriented as in its ancestors. -- else it will be reversed. is static; Build (me : in out; S : Shape from TopoDS) ---Purpose: Build NewShape from if its subshapes has modified. -- -- The methods and allows you to keep -- the resul of is static; IsCopied(me; S : Shape from TopoDS) returns Boolean ---Purpose: Returns True if has been replaced . is static; Copy(me; S : Shape from TopoDS) returns ListOfShape from TopTools ---Purpose: Returns the set of shapes substitued to . ---C++: return const & raises NoSuchObject from Standard -- if ! IsCopied(S) is static; fields myMap : DataMapOfShapeListOfShape from TopTools; end Substitution;