0030686: Visualization, SelectMgr_ViewerSelector - sorting issues of transformation...
[occt.git] / src / GeomAPI / GeomAPI_IntSS.hxx
1 // Created on: 1995-03-14
2 // Created by: Jacques GOUSSARD
3 // Copyright (c) 1995-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 under
9 // the terms of the GNU Lesser General Public License 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 #ifndef _GeomAPI_IntSS_HeaderFile
18 #define _GeomAPI_IntSS_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <GeomInt_IntSS.hxx>
25 #include <Standard_Real.hxx>
26 #include <Standard_Boolean.hxx>
27 #include <Standard_Integer.hxx>
28 class StdFail_NotDone;
29 class Standard_OutOfRange;
30 class Geom_Surface;
31 class Geom_Curve;
32
33
34 //! This class implements methods for
35 //! computing the intersection curves   between two surfaces.
36 //! The result is curves from Geom.  The "domain" used for
37 //! a surface   is the natural  parametric domain
38 //! unless the surface is a  RectangularTrimmedSurface
39 //! from Geom.
40 class GeomAPI_IntSS 
41 {
42 public:
43
44   DEFINE_STANDARD_ALLOC
45
46   
47   //! Constructs an empty object. Use the
48   //! function Perform for further initialization algorithm by two surfaces.
49     GeomAPI_IntSS();
50   
51   //! Computes the intersection curves
52   //! between the two surfaces S1 and S2. Parameter Tol defines the precision
53   //! of curves computation. For most cases the value 1.0e-7 is recommended to use.
54   //! Warning
55   //! Use the function IsDone to verify that the intersections are successfully computed.I
56     GeomAPI_IntSS(const Handle(Geom_Surface)& S1, const Handle(Geom_Surface)& S2, const Standard_Real Tol);
57   
58   //! Initializes an algorithm with the
59   //! given arguments and computes the intersection curves between the two surfaces S1 and S2.
60   //! Parameter Tol defines the precision of curves computation. For most
61   //! cases the value 1.0e-7 is recommended to use.
62   //! Warning
63   //! Use function IsDone to verify that the intersections are successfully computed.
64     void Perform (const Handle(Geom_Surface)& S1, const Handle(Geom_Surface)& S2, const Standard_Real Tol);
65   
66   //! Returns True if the intersection was successful.
67     Standard_Boolean IsDone() const;
68   
69   //! Returns the number of computed intersection curves.
70   //! Exceptions
71   //! StdFail_NotDone if the computation fails.
72     Standard_Integer NbLines() const;
73   
74   //! Returns the computed intersection curve of index Index.
75   //! Exceptions
76   //! StdFail_NotDone if the computation fails.
77   //! Standard_OutOfRange if Index is out of range [1, NbLines] where NbLines
78   //! is the number of computed intersection curves.
79     const Handle(Geom_Curve)& Line (const Standard_Integer Index) const;
80
81
82
83
84 protected:
85
86
87
88
89
90 private:
91
92
93
94   GeomInt_IntSS myIntersec;
95
96
97 };
98
99
100 #include <GeomAPI_IntSS.lxx>
101
102
103
104
105
106 #endif // _GeomAPI_IntSS_HeaderFile