42cf5bc1 |
1 | // Created on: 1991-04-15 |
2 | // Created by: Philippe DAUTRY |
3 | // Copyright (c) 1991-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 _Geom2dGcc_QualifiedCurve_HeaderFile |
18 | #define _Geom2dGcc_QualifiedCurve_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <GccEnt_Position.hxx> |
25 | #include <Geom2dAdaptor_Curve.hxx> |
26 | #include <Standard_Boolean.hxx> |
27 | class Geom2dAdaptor_Curve; |
28 | |
29 | |
30 | //! Describes functions for building a qualified 2D curve. |
31 | //! A qualified 2D curve is a curve with a qualifier which |
32 | //! specifies whether the solution of a construction |
33 | //! algorithm using the qualified curve (as an argument): |
34 | //! - encloses the curve, or |
35 | //! - is enclosed by the curve, or |
36 | //! - is built so that both the curve and it are external to one another, or |
37 | //! - is undefined (all solutions apply). |
38 | class Geom2dGcc_QualifiedCurve |
39 | { |
40 | public: |
41 | |
42 | DEFINE_STANDARD_ALLOC |
43 | |
44 | |
45 | //! Constructs a qualified curve by assigning the qualifier |
46 | //! Qualifier to the curve Curve. Qualifier may be: |
47 | //! - GccEnt_enclosing if the solution of a construction |
48 | //! algorithm using the qualified curve encloses the curve, or |
49 | //! - GccEnt_enclosed if the solution is enclosed by the curve, or |
50 | //! - GccEnt_outside if both the solution and the curve |
51 | //! are external to one another, or |
52 | //! - GccEnt_unqualified if all solutions apply. |
53 | //! Note: The interior of a curve is defined as the left-hand |
54 | //! side of the curve in relation to its orientation. |
55 | //! Warning |
56 | //! Curve is an adapted curve, i.e. an object which is an interface between: |
57 | //! - the services provided by a 2D curve from the package Geom2d, |
58 | //! - and those required on the curve by a computation algorithm. |
59 | //! The adapted curve is created in the following way: |
60 | //! Handle(Geom2d_Curve) mycurve = ... ; |
61 | //! Geom2dAdaptor_Curve Curve ( mycurve ) ; |
62 | //! The qualified curve is then constructed with this object: |
63 | //! GccEnt_Position myQualif = GccEnt_outside ; |
64 | //! Geom2dGcc_QualifiedCurve myQCurve ( Curve, myQualif ); |
65 | //! is private; |
66 | Standard_EXPORT Geom2dGcc_QualifiedCurve(const Geom2dAdaptor_Curve& Curve, const GccEnt_Position Qualifier); |
67 | |
68 | //! Returns a 2D curve to which the qualifier is assigned. |
69 | //! Warning |
70 | //! The returned curve is an adapted curve, i.e. an object |
71 | //! which is an interface between: |
72 | //! - the services provided by a 2D curve from the package Geom2d, |
73 | //! - and those required on the curve by a computation algorithm. |
74 | //! The Geom2d curve on which the adapted curve is |
75 | //! based can be obtained in the following way: |
76 | //! myQualifiedCurve = ... ; |
77 | //! Geom2dAdaptor_Curve myAdaptedCurve = myQualifiedCurve.Qualified(); |
78 | //! Handle(Geom2d_Curve) = myAdaptedCurve.Curve(); |
79 | Standard_EXPORT Geom2dAdaptor_Curve Qualified() const; |
80 | |
81 | //! Returns |
82 | //! - the qualifier of this qualified curve if it is enclosing, |
83 | //! enclosed or outside, or |
84 | //! - GccEnt_noqualifier if it is unqualified. |
85 | Standard_EXPORT GccEnt_Position Qualifier() const; |
86 | |
87 | //! Returns true if the solution is unqualified and false in the other cases. |
88 | Standard_EXPORT Standard_Boolean IsUnqualified() const; |
89 | |
90 | //! It returns true if the solution is Enclosing the Curv and false in |
91 | //! the other cases. |
92 | Standard_EXPORT Standard_Boolean IsEnclosing() const; |
93 | |
94 | //! It returns true if the solution is Enclosed in the Curv and false in |
95 | //! the other cases. |
96 | Standard_EXPORT Standard_Boolean IsEnclosed() const; |
97 | |
98 | //! It returns true if the solution is Outside the Curv and false in |
99 | //! the other cases. |
100 | Standard_EXPORT Standard_Boolean IsOutside() const; |
101 | |
102 | |
103 | |
104 | |
105 | protected: |
106 | |
107 | |
108 | |
109 | |
110 | |
111 | private: |
112 | |
113 | |
114 | |
115 | GccEnt_Position TheQualifier; |
116 | Geom2dAdaptor_Curve TheQualified; |
117 | |
118 | |
119 | }; |
120 | |
121 | |
122 | |
123 | |
124 | |
125 | |
126 | |
127 | #endif // _Geom2dGcc_QualifiedCurve_HeaderFile |