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