b311480e |
1 | -- Created on: 2001-05-03 |
2 | -- Created by: Igor FEOKTISTOV |
3 | -- Copyright (c) 2001-2012 OPEN CASCADE SAS |
4 | -- |
5 | -- The content of this file is subject to the Open CASCADE Technology Public |
6 | -- License Version 6.5 (the "License"). You may not use the content of this file |
7 | -- except in compliance with the License. Please obtain a copy of the License |
8 | -- at http://www.opencascade.org and read it completely before using this file. |
9 | -- |
10 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
11 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
12 | -- |
13 | -- The Original Code and all software distributed under the License is |
14 | -- distributed on an "AS IS" basis, without warranty of any kind, and the |
15 | -- Initial Developer hereby disclaims all such warranties, including without |
16 | -- limitation, any warranties of merchantability, fitness for a particular |
17 | -- purpose or non-infringement. Please see the License for the specific terms |
18 | -- and conditions governing the rights and limitations under the License. |
7fd59977 |
19 | |
20 | class Limitation from QANewModTopOpe inherits MakeShape from BRepBuilderAPI |
21 | |
22 | ---Purpose: provides cutting shape by face or shell; |
23 | |
24 | uses |
25 | |
26 | Shape from TopoDS, |
27 | ListOfShape from TopTools, |
28 | ModeOfLimitation from QANewModTopOpe, |
29 | State from TopAbs, |
30 | CutPtr from QANewModTopOpe, |
31 | CommonPtr from QANewModTopOpe |
32 | is |
33 | |
34 | Create(theObjectToCut, theCutTool : Shape from TopoDS; |
35 | theMode : ModeOfLimitation from QANewModTopOpe = QANewModTopOpe_Forward) |
36 | ---Purpose: initializes and fills data structure for cutting and |
37 | -- makes cutting according to orientation theCutTool and |
38 | -- theMode. |
39 | -- if theCutTool is not face or shell does nothing. |
40 | |
41 | returns Limitation from QANewModTopOpe; |
42 | |
43 | Cut(me : in out); |
44 | ---Purpose: makes cutting according to orientation theCutTool |
45 | -- and current value of myMode. Does nothing if |
46 | -- result already exists. |
47 | |
48 | SetMode(me : in out; theMode : ModeOfLimitation from QANewModTopOpe); |
49 | |
50 | GetMode(me) returns ModeOfLimitation from QANewModTopOpe; |
51 | |
52 | Shape1(me) returns Shape from TopoDS |
53 | ---Purpose: Returns the first shape. |
54 | ---C++: return const & |
55 | ---Level: Public |
56 | is static; |
57 | |
58 | Shape2(me) returns Shape from TopoDS |
59 | ---Purpose: Returns the second shape. |
60 | ---C++: return const & |
61 | ---Level: Public |
62 | is static; |
63 | |
64 | Modified (me: in out; S : Shape from TopoDS) |
65 | ---Purpose: Returns the list of shapes modified from the shape |
66 | -- <S>. |
67 | ---C++: return const & |
68 | ---Level: Public |
69 | returns ListOfShape from TopTools |
70 | is redefined; |
7fd59977 |
71 | |
72 | Generated (me: in out; S : Shape from TopoDS) |
73 | returns ListOfShape from TopTools |
74 | is redefined; |
75 | ---Purpose: Returns the list of shapes generated from the shape <S>. |
76 | --- For use in BRepNaming. |
77 | ---C++: return const & |
78 | |
79 | HasModified (me) |
80 | returns Boolean from Standard |
81 | is virtual; |
82 | ---Purpose: Returns true if there is at least one modified shape. |
83 | --- For use in BRepNaming. |
84 | |
85 | HasGenerated (me) |
86 | returns Boolean from Standard |
87 | is virtual; |
88 | ---Purpose: Returns true if there is at least one generated shape. |
89 | --- For use in BRepNaming. |
90 | |
91 | HasDeleted (me) |
92 | returns Boolean from Standard |
93 | is virtual; |
94 | ---Purpose: Returns true if there is at least one deleted shape. |
95 | --- For use in BRepNaming. |
96 | |
97 | IsDeleted (me: in out; S : Shape from TopoDS) |
98 | returns Boolean from Standard |
99 | is redefined; |
100 | |
101 | Delete(me : in out) is redefined; |
102 | ---C++: alias "Standard_EXPORT ~QANewModTopOpe_Limitation() {Delete();}" |
103 | |
104 | |
105 | fields |
106 | |
107 | myResultFwd : Shape from TopoDS; |
108 | myResultRvs : Shape from TopoDS; |
109 | myObjectToCut : Shape from TopoDS; |
110 | myCutTool : Shape from TopoDS; |
111 | myCut : CutPtr from QANewModTopOpe; |
112 | myCommon : CommonPtr from QANewModTopOpe; |
113 | myFwdIsDone : Boolean from Standard; |
114 | myRevIsDone : Boolean from Standard; |
115 | myMode : ModeOfLimitation from QANewModTopOpe; |
116 | |
117 | end Limitation; |