b311480e |
1 | -- Created on: 1994-12-02 |
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 | deferred class ModifyShape from BRepBuilderAPI inherits MakeShape from BRepBuilderAPI |
18 | |
19 | ---Purpose: Implements the methods of MakeShape for the |
20 | -- constant topology modifications. The methods are |
21 | -- implemented when the modification uses a Modifier |
22 | -- from BRepTools. Some of them have to be redefined |
23 | -- if the modification is implemented with another |
24 | -- tool (see Transform from BRepBuilderAPI for example). |
25 | -- The BRepBuilderAPI package provides the following |
26 | -- frameworks to perform modifications of this sort: |
27 | -- - BRepBuilderAPI_Copy to produce the copy of a shape, |
28 | -- - BRepBuilderAPI_Transform and |
29 | -- BRepBuilderAPI_GTransform to apply a geometric |
30 | -- transformation to a shape, |
31 | -- - BRepBuilderAPI_NurbsConvert to convert the |
32 | -- whole geometry of a shape into NURBS geometry, |
33 | -- - BRepOffsetAPI_DraftAngle to build a tapered shape. |
34 | |
35 | uses |
36 | Shape from TopoDS, |
37 | Face from TopoDS, |
38 | Edge from TopoDS, |
39 | ShapeModification from BRepBuilderAPI, |
40 | ListOfShape from TopTools, |
41 | |
42 | Modifier from BRepTools, |
43 | Modification from BRepTools |
44 | |
45 | raises |
46 | NullObject from Standard, |
47 | NoSuchObject from Standard |
48 | is |
49 | |
50 | Initialize; |
51 | ---Purpose: Empty constructor. |
52 | |
53 | |
54 | Initialize(S:Shape from TopoDS); |
55 | ---Purpose: Initializes the modifier with the Shape <S>, and |
56 | -- set the field <myInitialShape> to <S>. |
57 | |
58 | |
59 | Initialize(M: Modification from BRepTools); |
60 | ---Purpose: Set the field <myModification> with <M>. |
61 | |
62 | |
63 | Initialize(S: Shape from TopoDS; M: Modification from BRepTools); |
64 | ---Purpose: Initializes the modifier with the Shape <S>, and |
65 | -- set the field <myInitialShape> to <S>, and set the |
66 | -- field <myModification> with <M>, the performs the |
67 | -- modification. |
68 | |
69 | |
70 | DoModif(me: in out; S: Shape from TopoDS) |
71 | ---Purpose: Performs the previously given modification on the |
72 | -- shape <S>. |
73 | |
74 | raises NullObject from Standard |
75 | --- The exception is raised if no modification has been given. |
76 | is static protected; |
77 | |
78 | |
79 | DoModif(me: in out; M: Modification from BRepTools) |
80 | ---Purpose: Performs the modification <M> on a previously |
81 | -- given shape. |
82 | |
83 | raises NullObject from Standard |
84 | --- The exception is raised if no shape has been given. |
85 | is static protected; |
86 | |
87 | |
88 | DoModif(me: in out; S: Shape from TopoDS; |
89 | M: Modification from BRepTools) |
90 | ---Purpose: Performs the modification <M> on the shape <S>. |
91 | |
92 | is static protected; |
93 | |
94 | |
95 | --- Private implementation method |
96 | |
97 | DoModif(me: in out) |
98 | |
99 | is static private; |
100 | |
101 | ---Category: Querying isg-attention il faudrait passer en modified que |
102 | -- les faces dont les bornes sont modifiees et les faces |
103 | -- inclinees en generated (pas disponible aujourd 'hui dans BRepTools_modifier |
104 | -- a reprendre |
105 | -- |
106 | Modified (me: in out; S : Shape from TopoDS) |
107 | ---Purpose: Returns the list of shapes modified from the shape |
108 | -- <S>. |
109 | ---C++: return const & |
110 | ---Level: Public |
111 | returns ListOfShape from TopTools |
112 | is redefined virtual; |
113 | |
114 | |
115 | ModifiedShape(me; S: Shape from TopoDS) |
116 | returns Shape from TopoDS |
117 | ---Purpose: Returns the modified shape corresponding to <S>. |
118 | -- S can correspond to the entire initial shape or to its subshape. |
119 | -- Exceptions |
120 | -- Standard_NoSuchObject if S is not the initial shape or |
121 | -- a subshape of the initial shape to which the |
122 | -- transformation has been applied. Raises NoSuchObject from Standard |
123 | -- if S is not the initial shape or a sub-shape |
124 | -- of the initial shape. |
7fd59977 |
125 | raises NoSuchObject from Standard |
126 | |
127 | is virtual; |
128 | |
129 | fields |
130 | |
131 | myModifier : Modifier from BRepTools is protected; |
132 | myInitialShape : Shape from TopoDS is protected; |
133 | myModification : Modification from BRepTools is protected; |
134 | |
135 | end ModifyShape; |