0025969: Wrong result obtained by 2d classifier algorithm.
[occt.git] / src / IntTools / IntTools_FaceFace.cdl
1 -- Created on: 2000-11-23
2 -- Created by: Michael KLOKOV
3 -- Copyright (c) 2000-2014 OPEN CASCADE SAS
4 --
5 -- This file is part of Open CASCADE Technology software library.
6 --
7 -- This library is free software; you can redistribute it and/or modify it under
8 -- the terms of the GNU Lesser General Public License version 2.1 as published
9 -- by the Free Software Foundation, with special exception defined in the file
10 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 -- distribution for complete text of the license and disclaimer of any warranty.
12 --
13 -- Alternatively, this file may be used under the terms of Open CASCADE
14 -- commercial license or contractual agreement.
15
16 class FaceFace from IntTools
17
18      ---Purpose: This class provides the intersection of 
19      ---     face's underlying surfaces.
20
21 uses 
22
23     TopolTool             from Adaptor3d, 
24     HSurface              from GeomAdaptor, 
25     ListOfPntOn2S         from IntSurf ,
26     Intersection          from IntPatch,
27     Face                  from TopoDS,
28     SequenceOfCurves      from IntTools,
29     LineConstructor       from GeomInt,
30     SequenceOfPntOn2Faces from IntTools, 
31     Context from IntTools
32     
33     
34
35 raises NotDone from StdFail
36 is
37
38     Create 
39      returns FaceFace from IntTools; 
40      ---Purpose: 
41      --- Empty constructor.
42  
43
44     SetParameters(me: in out;  
45               ApproxCurves    : Boolean from Standard;
46               ComputeCurveOnS1: Boolean from Standard;
47               ComputeCurveOnS2: Boolean from Standard;
48               ApproximationTolerance: Real from Standard);
49     ---Purpose:
50     --- Modifier
51     ---
52
53     Perform(me: in out;  
54               F1: Face from TopoDS;
55               F2: Face from TopoDS);
56     ---Purpose: 
57     --- Intersects underliing surfaces of F1 and F2
58     --- Use sum of tolerance of F1 and F2 as intersection
59     --- criteria
60  
61     IsDone(me)
62      returns Boolean from Standard;
63     ---Purpose: 
64     --- Returns True if the intersection was successful
65     ---
66
67     Lines(me)
68      returns SequenceOfCurves from IntTools;
69     ---C++: return const& 
70     ---Purpose: 
71     --- Returns sequence of 3d curves as result of intersection
72     ---
73   
74     Points(me)
75      returns  SequenceOfPntOn2Faces from IntTools;
76     ---C++: return const&  
77     ---Purpose: 
78     --- Returns sequence of 3d curves as result of intersection
79     ---
80
81     TolReached3d(me)  
82      returns Real from Standard;
83     ---Purpose:
84     --- Returns tolerance reached during approximation.
85     --- If approximation was not done, returns zero.
86
87     TolReached2d(me)  
88      returns Real from Standard;
89      ---Purpose:
90      --- Returns tolerance reached during approximation.
91     --- If approximation was not done, returns zero.
92     ---
93       
94     Face1  (me) 
95      returns  Face  from  TopoDS; 
96     ---C++: return const& 
97     ---Purpose:
98     --- Returns first of processed faces
99     ---
100   
101     Face2  (me) 
102      returns  Face  from  TopoDS; 
103     ---C++: return const& 
104     ---Purpose:
105     --- Returns second of processed faces
106     ---
107      
108     TangentFaces  (me)
109      returns Boolean from Standard; 
110     ---Purpose:
111     --- Returns True if faces are tangent
112     --- 
113     PrepareLines3D (me:out; 
114          bToSplit: Boolean from Standard=Standard_True);
115     ---Purpose: 
116     --- Provides post-processing the result lines. 
117     --- <bToSplit> - the flag.           
118     --  In case of <bToSplit> is true the closed 3D-curves will be splitted  
119     --  on parts. 
120     --  In case of <bToSplit> is false the closed 3D-curves remain untouched.  
121     
122     SetList (me: in out;  
123          ListOfPnts: in out ListOfPntOn2S from IntSurf);
124     
125     ----------------------------------------------------------
126     --                  private  block
127     ----------------------------------------------------------
128     MakeCurve(me: in out; Index   : Integer from Standard;
129                        D1      : TopolTool from Adaptor3d;
130                        D2      : TopolTool from Adaptor3d)
131         is protected; 
132  
133     ComputeTolReached3d(me:out) 
134      is  protected; 
135  
136     ComputeTolerance(me:out)  
137     returns Real from Standard
138     is  protected; 
139  
140     SetContext(me:out; 
141        aContext : Context from IntTools); 
142     ---Purpose:
143     --- Sets the intersecton context 
144  
145     Context(me) 
146      returns Context from IntTools; 
147     ---C++:  return const &  
148     ---Purpose:
149     --- Gets the intersecton context 
150       
151 fields 
152  
153     myIsDone       : Boolean         from Standard;
154     myIntersector  : Intersection    from IntPatch;
155     myLConstruct   : LineConstructor from GeomInt;
156     myHS1          : HSurface        from GeomAdaptor;
157     myHS2          : HSurface        from GeomAdaptor;
158     myNbrestr      : Integer         from Standard;
159
160     myTolReached2d : Real            from Standard;
161     myTolReached3d : Real            from Standard;
162     
163     myApprox       : Boolean         from Standard;
164     myApprox1      : Boolean         from Standard;
165     myApprox2      : Boolean         from Standard;
166     myTolApprox    : Real            from Standard;
167     
168     mySeqOfCurve : SequenceOfCurves from IntTools;
169
170     myTangentFaces: Boolean         from Standard; 
171     myFace1       : Face from TopoDS;  
172     myFace2       : Face from TopoDS;  
173     myPnts        : SequenceOfPntOn2Faces from IntTools;
174     
175     myListOfPnts  : ListOfPntOn2S from IntSurf;   
176     
177     myContext     : Context from  IntTools;  
178
179 end FaceFace from IntTools;
180