0023258: Missing parenthesis
[occt.git] / src / BRepAlgo / BRepAlgo_NormalProjection.cdl
1 -- Created on: 1997-10-13
2 -- Created by: Roman BORISOV
3 -- Copyright (c) 1997-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
21
22 class NormalProjection from BRepAlgo
23
24         ---Purpose: This class makes the projection  of a wire on a 
25         --           shape.
26
27
28 uses Shape from TopoDS, 
29      Edge  from TopoDS, 
30      Shape  from  GeomAbs, 
31      Curve  from  Adaptor3d,      
32      ListOfShape  from  TopTools, 
33      DataMapOfShapeShape  from TopTools, 
34      DataMapOfShapeListOfShape  from TopTools
35       
36
37 raises  ConstructionError from Standard, 
38         NoSuchObject      from Standard,
39         NotDone           from StdFail
40
41 is
42  
43     Create 
44      
45         returns NormalProjection;
46
47
48     Create(S: Shape from TopoDS) 
49      
50         returns NormalProjection;
51
52
53     Init(me: in out; S: Shape from TopoDS) 
54      
55         is static;
56  
57     Add(me: in out; ToProj: Shape from TopoDS) 
58         ---Purpose: Add an edge or a wire to the list of shape to project
59         --          
60         raises ConstructionError from Standard 
61         is static;
62  
63     SetParams(me  : in out;  Tol3D,  Tol2D  :  Real  from  Standard; 
64                              InternalContinuity  :  Shape  from  GeomAbs;   
65                              MaxDegree  ,  MaxSeg  :  Integer  from  Standard) 
66         ---Purpose: Set the parameters  used  for computation 
67         --          Tol3d is the requiered  tolerance between the  3d projected
68         --          curve  and its 2d representation
69         --          InternalContinuity  is the order of constraints
70         --          used for  approximation. 
71         --          MaxDeg and MaxSeg are the maximum degree and the maximum 
72         --          number of segment for BSpline resulting of an approximation.
73         
74     is  static; 
75
76     SetDefaultParams(me  : in out) 
77         ---Purpose: Set the parameters  used  for computation 
78         --          in their default values
79         
80     is  static; 
81
82     SetMaxDistance(me: in out; MaxDist: Real from Standard)
83         ---Purpose:  Sets the maximum distance between target shape and  
84         --  shape to project. If this condition is not satisfied then 
85         --  corresponding part of solution is discarded. 
86         --  if MaxDist < 0 then this method does not affect the algorithm
87
88     is  static;     
89
90     Compute3d(me:  in  out;  With3d:  Boolean  from  Standard  =  Standard_True) 
91         ---Purpose:  if  With3d = Standard_False the 3dcurve is not computed 
92         -- the  initial 3dcurve is kept  to  build the  resulting edges.         
93     is  static;
94     
95     SetLimit(me : in  out; FaceBoundaries: Boolean  from  Standard  = Standard_True) 
96         ---Purpose:  Manage  limitation  of  projected  edges.   
97         --By  default  edges  are  limited  by  face  boundaries,   
98         --else  they  are  limited  by  supporting  surface  boundaries.
99     is  static;
100
101     Build(me: in out); 
102         ---Purpose: Builds the result as a  compound. 
103
104     IsDone(me) 
105      
106         returns Boolean from Standard 
107         is static;
108
109
110     Projection(me) 
111         ---Purpose: returns the result
112         returns Shape from TopoDS 
113         ---C++: return const&  
114         raises NotDone from StdFail
115         is static;
116  
117
118     Ancestor(me; E: Edge from TopoDS) 
119         ---Purpose: For a resulting edge, returns the corresponding initial edge.
120
121         returns Shape from TopoDS
122         ---C++: return const&
123         raises NotDone      from StdFail, 
124                NoSuchObject from Standard
125         is static;
126  
127     Couple(me; E: Edge from TopoDS) 
128     ---Purpose: For a projected edge, returns the corresponding initial face.
129
130         returns Shape from TopoDS
131         ---C++: return const&
132         raises NotDone      from StdFail, 
133                NoSuchObject from Standard
134         is static;
135  
136     Generated (me: in out; S : Shape from TopoDS)
137         ---Purpose: Returns the  list   of shapes generated   from the
138         --          shape <S>. 
139         ---C++: return const & 
140     returns ListOfShape from TopTools;
141     
142
143     IsElementary(me; C:  Curve from Adaptor3d) 
144         returns Boolean from Standard 
145         is static;   
146          
147     BuildWire(me;  Liste : out  ListOfShape from TopTools)   
148         returns  Boolean  from  Standard 
149         is  static; 
150     --- Purpose : build the result as a list of wire if possible in --
151     --  a first returns a wire only if there is only a wire.
152     --  
153
154
155 fields
156  
157     myShape       : Shape          from TopoDS; 
158     myIsDone      : Boolean        from Standard;
159     myTol3d       : Real           from Standard;  
160     myTol2d       : Real           from Standard;  
161     myMaxDist     : Real           from Standard;
162     myWith3d      : Boolean        from Standard;
163     myContinuity  : Shape          from GeomAbs;         
164     myMaxDegree   : Integer        from Standard;   
165     myMaxSeg      : Integer        from Standard; 
166     myFaceBounds  : Boolean        from Standard;
167     myToProj      : Shape          from TopoDS;
168     myAncestorMap : DataMapOfShapeShape       from TopTools; 
169     myCorresp     : DataMapOfShapeShape       from TopTools;
170     myDescendants : DataMapOfShapeListOfShape       from TopTools;
171     myRes         : Shape   from TopoDS;
172
173 end NormalProjection;