b311480e |
1 | -- Created on: 1994-08-25 |
2 | -- Created by: Jacques GOUSSARD |
3 | -- Copyright (c) 1994-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
8 | -- This library is free software; you can redistribute it and/or modify it under |
9 | -- the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
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. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class Modifier from BRepTools |
18 | |
ff8178ef |
19 | ---Purpose: Performs geometric modifications on a shape. |
7fd59977 |
20 | |
21 | uses Shape from TopoDS, |
22 | Modification from BRepTools, |
23 | DataMapOfShapeShape from TopTools |
24 | |
25 | raises NullObject from Standard, |
26 | NoSuchObject from Standard |
27 | |
28 | is |
29 | |
30 | Create returns Modifier from BRepTools; |
31 | ---Purpose: Creates an empty Modifier. |
32 | |
33 | |
34 | Create(S: Shape from TopoDS) |
35 | returns Modifier from BRepTools; |
36 | ---Purpose: Creates a modifier on the shape <S>. |
37 | |
38 | |
39 | Create(S: Shape from TopoDS; M: Modification from BRepTools) |
40 | returns Modifier from BRepTools; |
41 | ---Purpose: Creates a modifier on the shape <S>, and performs |
42 | -- the modifications described by <M>. |
43 | |
44 | |
45 | Init(me: in out; S: Shape from TopoDS) |
46 | is static; |
47 | ---Purpose: Initializes the modifier with the shape <S>. |
48 | |
49 | |
50 | Perform(me: in out; M: Modification from BRepTools) |
51 | ---Purpose: Performs the modifications described by <M>. |
52 | raises NullObject from Standard |
53 | -- if the modifier has not been initialized with a shape. |
54 | is static; |
55 | |
56 | IsDone(me) |
57 | |
58 | ---Purpose: Returns Standard_True if the modification has |
59 | -- been computed successfully. |
60 | -- |
61 | ---C++: inline |
62 | returns Boolean from Standard |
63 | is static; |
64 | |
65 | |
66 | ModifiedShape(me; S: Shape from TopoDS) |
67 | returns Shape from TopoDS |
68 | ---Purpose: Returns the modified shape corresponding to <S>. |
69 | ---C++: return const& |
70 | ---C++: inline |
71 | raises NoSuchObject from Standard |
72 | -- if S is not the initial shape or a sub-shape |
73 | -- of the initial shape. |
74 | |
75 | is static; |
76 | |
77 | |
78 | -- private implementation methods |
79 | |
80 | Put(me: in out; S: Shape from TopoDS) |
81 | |
82 | is static private; |
83 | |
84 | |
85 | Rebuild(me: in out; S: Shape from TopoDS; M: Modification from BRepTools) |
86 | returns Boolean from Standard |
87 | is static private; |
88 | |
89 | |
90 | fields |
91 | |
92 | myMap : DataMapOfShapeShape from TopTools; |
93 | myShape: Shape from TopoDS; |
94 | myDone : Boolean from Standard; |
95 | |
96 | end Modifier; |