b311480e |
1 | -- Created on: 1994-12-02 |
2 | -- Created by: Jacques GOUSSARD |
3 | -- Copyright (c) 1994-1999 Matra Datavision |
4 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS |
5 | -- |
6 | -- The content of this file is subject to the Open CASCADE Technology Public |
7 | -- License Version 6.5 (the "License"). You may not use the content of this file |
8 | -- except in compliance with the License. Please obtain a copy of the License |
9 | -- at http://www.opencascade.org and read it completely before using this file. |
10 | -- |
11 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
12 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
13 | -- |
14 | -- The Original Code and all software distributed under the License is |
15 | -- distributed on an "AS IS" basis, without warranty of any kind, and the |
16 | -- Initial Developer hereby disclaims all such warranties, including without |
17 | -- limitation, any warranties of merchantability, fitness for a particular |
18 | -- purpose or non-infringement. Please see the License for the specific terms |
19 | -- and conditions governing the rights and limitations under the License. |
20 | |
7fd59977 |
21 | |
22 | |
23 | deferred class ModifyShape from BRepBuilderAPI inherits MakeShape from BRepBuilderAPI |
24 | |
25 | ---Purpose: Implements the methods of MakeShape for the |
26 | -- constant topology modifications. The methods are |
27 | -- implemented when the modification uses a Modifier |
28 | -- from BRepTools. Some of them have to be redefined |
29 | -- if the modification is implemented with another |
30 | -- tool (see Transform from BRepBuilderAPI for example). |
31 | -- The BRepBuilderAPI package provides the following |
32 | -- frameworks to perform modifications of this sort: |
33 | -- - BRepBuilderAPI_Copy to produce the copy of a shape, |
34 | -- - BRepBuilderAPI_Transform and |
35 | -- BRepBuilderAPI_GTransform to apply a geometric |
36 | -- transformation to a shape, |
37 | -- - BRepBuilderAPI_NurbsConvert to convert the |
38 | -- whole geometry of a shape into NURBS geometry, |
39 | -- - BRepOffsetAPI_DraftAngle to build a tapered shape. |
40 | |
41 | uses |
42 | Shape from TopoDS, |
43 | Face from TopoDS, |
44 | Edge from TopoDS, |
45 | ShapeModification from BRepBuilderAPI, |
46 | ListOfShape from TopTools, |
47 | |
48 | Modifier from BRepTools, |
49 | Modification from BRepTools |
50 | |
51 | raises |
52 | NullObject from Standard, |
53 | NoSuchObject from Standard |
54 | is |
55 | |
56 | Initialize; |
57 | ---Purpose: Empty constructor. |
58 | |
59 | |
60 | Initialize(S:Shape from TopoDS); |
61 | ---Purpose: Initializes the modifier with the Shape <S>, and |
62 | -- set the field <myInitialShape> to <S>. |
63 | |
64 | |
65 | Initialize(M: Modification from BRepTools); |
66 | ---Purpose: Set the field <myModification> with <M>. |
67 | |
68 | |
69 | Initialize(S: Shape from TopoDS; M: Modification from BRepTools); |
70 | ---Purpose: Initializes the modifier with the Shape <S>, and |
71 | -- set the field <myInitialShape> to <S>, and set the |
72 | -- field <myModification> with <M>, the performs the |
73 | -- modification. |
74 | |
75 | |
76 | DoModif(me: in out; S: Shape from TopoDS) |
77 | ---Purpose: Performs the previously given modification on the |
78 | -- shape <S>. |
79 | |
80 | raises NullObject from Standard |
81 | --- The exception is raised if no modification has been given. |
82 | is static protected; |
83 | |
84 | |
85 | DoModif(me: in out; M: Modification from BRepTools) |
86 | ---Purpose: Performs the modification <M> on a previously |
87 | -- given shape. |
88 | |
89 | raises NullObject from Standard |
90 | --- The exception is raised if no shape has been given. |
91 | is static protected; |
92 | |
93 | |
94 | DoModif(me: in out; S: Shape from TopoDS; |
95 | M: Modification from BRepTools) |
96 | ---Purpose: Performs the modification <M> on the shape <S>. |
97 | |
98 | is static protected; |
99 | |
100 | |
101 | --- Private implementation method |
102 | |
103 | DoModif(me: in out) |
104 | |
105 | is static private; |
106 | |
107 | ---Category: Querying isg-attention il faudrait passer en modified que |
108 | -- les faces dont les bornes sont modifiees et les faces |
109 | -- inclinees en generated (pas disponible aujourd 'hui dans BRepTools_modifier |
110 | -- a reprendre |
111 | -- |
112 | Modified (me: in out; S : Shape from TopoDS) |
113 | ---Purpose: Returns the list of shapes modified from the shape |
114 | -- <S>. |
115 | ---C++: return const & |
116 | ---Level: Public |
117 | returns ListOfShape from TopTools |
118 | is redefined virtual; |
119 | |
120 | |
121 | ModifiedShape(me; S: Shape from TopoDS) |
122 | returns Shape from TopoDS |
123 | ---Purpose: Returns the modified shape corresponding to <S>. |
124 | -- S can correspond to the entire initial shape or to its subshape. |
125 | -- Exceptions |
126 | -- Standard_NoSuchObject if S is not the initial shape or |
127 | -- a subshape of the initial shape to which the |
128 | -- transformation has been applied. Raises NoSuchObject from Standard |
129 | -- if S is not the initial shape or a sub-shape |
130 | -- of the initial shape. |
131 | ---C++: return const& |
132 | raises NoSuchObject from Standard |
133 | |
134 | is virtual; |
135 | |
136 | fields |
137 | |
138 | myModifier : Modifier from BRepTools is protected; |
139 | myInitialShape : Shape from TopoDS is protected; |
140 | myModification : Modification from BRepTools is protected; |
141 | |
142 | end ModifyShape; |