0023125: Wrong results done by classifier algorithm for a point and a solid.
[occt.git] / src / BRepClass3d / BRepClass3d_SClassifier.cdl
1 -- Created on: 1996-07-15
2 -- Created by: Laurent BUCHARD
3 -- Copyright (c) 1996-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
23
24 class SClassifier from BRepClass3d
25      
26      ---Purpose: Provides an algorithm to classify a point in a solid.
27
28 uses 
29     Pnt     from gp,
30     Face    from TopoDS,
31     Shape   from TopoDS,
32     State   from TopAbs,
33     SolidExplorer from BRepClass3d
34     
35 raises
36     DomainError from Standard
37     
38     
39     
40 is 
41        
42     Create 
43         ---Purpose: Empty constructor.
44     returns SClassifier from BRepClass3d;
45     
46     
47     Create(S   : in out SolidExplorer from BRepClass3d;
48            P   :        Pnt from gp;
49            Tol :        Real from Standard)
50         ---Purpose: Constructor to classify the point P with the 
51         --          tolerance Tol on the solid S.
52     returns SClassifier from BRepClass3d;
53     
54     
55     Perform(me  : in out;
56             S   : in out  SolidExplorer from BRepClass3d;
57             P   :         Pnt from gp;
58             Tol :         Real from Standard);
59         ---Purpose: Classify the point P with the 
60         --          tolerance Tol on the solid S.
61         --          
62     PerformInfinitePoint(me  : in out;
63                          S   : in out  SolidExplorer from BRepClass3d;
64                          Tol :         Real from Standard);
65         ---Purpose: Classify an infinite point with the 
66         --          tolerance Tol on the solid S.
67
68     
69     Rejected(me)
70         ---Purpose: Returns True if the classification has been 
71         --          computed by rejection. 
72         --          The State is then OUT.
73     returns Boolean from Standard;
74     
75     
76     State(me)  returns State  from TopAbs;
77         ---Purpose: Returns the result of the classification.
78     
79     IsOnAFace(me) returns Boolean from Standard;
80         ---Purpose: Returns True when the point is a point of a face.
81     
82     Face(me) 
83         ---Purpose: Returns the face used to determine the 
84         --          classification. When the state is ON, this is the 
85         --          face containing the point. 
86         --          
87         --          When Rejected() returns True, Face() has no signification.
88     returns Face from TopoDS;
89
90             
91     ForceIn(me: in out) 
92         is protected;
93         
94     ForceOut(me: in out)
95         is protected;
96
97
98 fields
99
100     myFace         : Face       from TopoDS;
101     myState        : Integer    from Standard;  -- 1: Rejected     2: IsOnFace  3: In  4: Out
102     
103 end SClassifier;