0024510: Remove unused local variables
[occt.git] / src / ShapeUpgrade / ShapeUpgrade_WireDivide.cdl
1 -- Created on: 1999-04-15
2 -- Created by: Roman LYGIN
3 -- Copyright (c) 1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
8 -- This library is free software; you can redistribute it and / or modify it
9 -- under the terms of the GNU Lesser General Public version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class WireDivide from ShapeUpgrade inherits Tool from ShapeUpgrade
18
19     ---Purpose: Divides edges in the wire lying on the face or free wires or
20     --          free edges with a criterion.
21     --          Splits 3D curve and pcurve(s) of the edge on the face.
22     --          Other pcurves which may be associated with the edge are simply 
23     --          copied.
24     --          If 3D curve is splitted then pcurve on the face is splitted as
25     --          well, and wice-versa.
26     --          Input shape is not modified.
27     --          The modifications made are recorded in external context 
28     --          (ShapeBuild_ReShape). This tool is applied to all edges
29     --          before splitting them in order to keep sharing.
30
31 uses
32
33     Edge from TopoDS,
34     Wire from TopoDS,
35     Face from TopoDS,
36     Surface from Geom,
37     Location from TopLoc,
38     SplitCurve3d from ShapeUpgrade,
39     SplitCurve2d from ShapeUpgrade,
40     TransferParameters from ShapeAnalysis,
41     Status  from ShapeExtend,
42     HSequenceOfReal from TColStd,
43     EdgeDivide from ShapeUpgrade,
44     FixSmallCurves from ShapeUpgrade
45 is
46
47     Create returns mutable WireDivide from ShapeUpgrade;
48         ---Purpose: Empty constructor
49         
50     Init (me: mutable; W: Wire from TopoDS; F: Face from TopoDS);
51         ---Purpose: Initializes by wire and face
52
53     Init (me: mutable; W: Wire from TopoDS; 
54                        S: Surface from Geom); 
55         ---Purpose: Initializes by wire and surface
56
57     Load (me: mutable; W: Wire from TopoDS);
58         ---Purpose: Loads working wire
59
60     Load (me: mutable; E: Edge from TopoDS);
61         ---Purpose: Creates wire of one edge and calls Load for wire
62
63     SetFace (me: mutable; F: Face from TopoDS);
64         ---Purpose: Sets supporting surface by face
65
66     SetSurface (me: mutable; S: Surface from Geom);
67         ---Purpose: Sets supporting surface
68
69     SetSurface (me: mutable; S: Surface from Geom; L: Location from TopLoc);
70         ---Purpose: Sets supporting surface with location
71
72
73     Perform (me: mutable) is virtual;
74         ---Purpose: Computes the resulting wire by splitting all the edges
75         --          according to splitting criteria.
76         --          All the modifications made are recorded in context
77         --          (ShapeBuild_ReShape). This tool is applied to all edges
78         --          before splitting them in order to keep sharings.
79         --          If no supporting face or surface is defined, only 3d 
80         --          splitting criteria are used.
81     
82     Wire (me) returns Wire from TopoDS;
83         ---C++: return const &
84         ---Purpose: Gives the resulting Wire (equal to initial one if not done
85         --          or Null if not loaded)
86     
87     Status (me; status: Status from ShapeExtend) returns Boolean;
88         ---Purpose: Queries status of last call to Perform()
89         -- OK - no edges were splitted, wire left untouched
90         -- DONE1 - some edges were splitted
91         -- FAIL1 - some edges have no 3d curve (skipped)
92         -- FAIL2 - some edges have no pcurve (skipped)
93
94     ---Level: Internal
95     
96     SetSplitCurve3dTool(me: mutable; splitCurve3dTool: SplitCurve3d from ShapeUpgrade);
97         ---Purpose: Sets the tool for splitting 3D curves.
98     
99     SetSplitCurve2dTool(me: mutable; splitCurve2dTool: SplitCurve2d from ShapeUpgrade);
100         ---Purpose: Sets the tool for splitting pcurves.
101         
102     SetTransferParamTool(me: mutable; TransferParam: TransferParameters from ShapeAnalysis);
103     ---Purpose: Sets the tool for Transfer parameters between curves and pcurves.
104     
105     GetSplitCurve3dTool(me) returns SplitCurve3d from ShapeUpgrade
106     is virtual protected;
107         ---Purpose: Returns the tool for splitting 3D curves.
108         ---Remark: here TopoDS_Edge can be used to transfer some specific information (tolerance, etc)
109         
110     GetSplitCurve2dTool(me) returns SplitCurve2d from ShapeUpgrade
111     is virtual protected;
112         ---Purpose: Returns the tool for splitting pcurves.
113         
114     SetEdgeDivideTool (me: mutable; edgeDivideTool: EdgeDivide from ShapeUpgrade);
115         ---Purpose: Sets tool for splitting edge
116     
117     GetEdgeDivideTool (me) returns EdgeDivide from ShapeUpgrade
118     is virtual;
119         ---Purpose: returns tool for splitting edges
120         
121     GetTransferParamTool(me:mutable) returns TransferParameters from ShapeAnalysis 
122     is virtual;
123         ---Purpose: Returns the tool for Transfer of parameters.
124         
125     SetEdgeMode(me : mutable;EdgeMode : Integer);
126         ---Purpose:Sets mode for splitting 3d curves from edges.
127         -- 0 - only curve 3d from free edges.
128         -- 1 - only curve 3d from shared edges.
129         -- 2 -  all curve 3d. 
130          
131     SetFixSmallCurveTool(me : mutable; FixSmallCurvesTool : FixSmallCurves from ShapeUpgrade);
132         ---Purpose:Sets tool for fixing small curves with specified min tolerance;
133         
134      GetFixSmallCurveTool(me) returns FixSmallCurves from ShapeUpgrade;
135         ---Purpose:Returns tool for fixing small curves 
136
137 fields
138     
139     mySplitCurve3dTool: SplitCurve3d from ShapeUpgrade;
140     mySplitCurve2dTool: SplitCurve2d from ShapeUpgrade;
141     myEdgeDivide      : EdgeDivide from ShapeUpgrade;
142     myTransferParamTool : TransferParameters from ShapeAnalysis;
143     myFace  : Face from TopoDS is protected; -- supporting face
144     myWire  : Wire from TopoDS is protected; -- wire being splitted
145     myStatus: Integer is protected;
146     myEdgeMode : Integer is protected;
147     myFixSmallCurveTool : FixSmallCurves from ShapeUpgrade;
148
149 end WireDivide;