-- File: LocOpe_SplitShape.cdl -- Created: Tue Jul 11 16:58:44 1995 -- Author: Jacques GOUSSARD -- ---Copyright: Matra Datavision 1995 class SplitShape from LocOpe ---Purpose: Provides a tool to cut : -- - edges with a vertices, -- - faces with wires, -- and rebuilds the shape containing the edges and -- the faces. uses Vertex from TopoDS, Edge from TopoDS, Wire from TopoDS, Face from TopoDS, Shape from TopoDS, ListOfShape from TopTools, MapOfShape from TopTools, DataMapOfShapeListOfShape from TopTools raises NotDone from StdFail, ConstructionError from Standard, NoSuchObject from Standard is Create ---Purpose: Empty constructor. returns SplitShape from LocOpe; ---C++: inline Create(S: Shape from TopoDS) ---Purpose: Creates the process with the shape . returns SplitShape from LocOpe; ---C++: inline Init(me: in out; S: Shape from TopoDS) ---Purpose: Initializes the process on the shape . is static; CanSplit(me; E: Edge from TopoDS) ---Purpose: Tests if it is possible to split the edge . returns Boolean from Standard is static; Add(me: in out; V: Vertex from TopoDS; P: Real from Standard; E: Edge from TopoDS) ---Purpose: Adds the vertex on the edge , at parameter

. raises ConstructionError from Standard -- The exception ConstructionError is raised if CanSplit -- returns Standard_False, or if P is not inside the -- parametric bounds . is static; Add(me: in out; W: Wire from TopoDS; F: Face from TopoDS) ---Purpose: Adds the wire on the face . raises NoSuchObject from Standard, -- if does not belong to the original shape. ConstructionError from Standard -- for a closed wire, if it is not included in a -- sub-face of -- for an open wire, if it does not begin and end on -- wire(s) of a sub-face of is static; Shape(me) ---Purpose: Returns the "original" shape. returns Shape from TopoDS ---C++: return const& ---C++: inline is static; DescendantShapes(me: in out; S: Shape from TopoDS) ---Purpose: Returns the list of descendant shapes of . returns ListOfShape from TopTools ---C++: return const& raises NoSuchObject from Standard is static; LeftOf(me: in out; W: Wire from TopoDS; F: Face from TopoDS) ---Purpose: Returns the "left" part defined by the wire on -- the face . The returned list of shape is in -- fact a list of faces. The face is considered -- with its topological orientation in the original -- shape. is considered with its orientation. returns ListOfShape from TopTools ---C++: return const& raises NoSuchObject from Standard -- The exception is raised if the shape is null or does not -- contain the face. is static; -- -- -- -- Private implementation methods AddOpenWire(me: in out; W: Wire from TopoDS; F: Face from TopoDS) is static private; AddClosedWire(me: in out; W: Wire from TopoDS; F: Face from TopoDS) is static private; Put(me: in out; S: Shape from TopoDS) is static private; Rebuild(me: in out; S: Shape from TopoDS) returns Boolean from Standard is static private; fields myDone : Boolean from Standard; myShape : Shape from TopoDS; myMap : DataMapOfShapeListOfShape from TopTools; myDblE : MapOfShape from TopTools; myLeft : ListOfShape from TopTools; end SplitShape;