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