42cf5bc1 |
1 | // Created on: 1993-11-05 |
2 | // Created by: Jean Marc LACHAUME |
3 | // Copyright (c) 1993-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 _HatchGen_Domain_HeaderFile |
18 | #define _HatchGen_Domain_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <Standard_Boolean.hxx> |
25 | #include <HatchGen_PointOnHatching.hxx> |
26 | #include <Standard_Integer.hxx> |
27 | class Standard_DomainError; |
28 | class HatchGen_PointOnHatching; |
29 | |
30 | |
31 | |
32 | class HatchGen_Domain |
33 | { |
34 | public: |
35 | |
36 | DEFINE_STANDARD_ALLOC |
37 | |
38 | |
39 | //! Creates an infinite domain. |
40 | Standard_EXPORT HatchGen_Domain(); |
41 | |
42 | //! Creates a domain for the curve associated to a hatching. |
43 | Standard_EXPORT HatchGen_Domain(const HatchGen_PointOnHatching& P1, const HatchGen_PointOnHatching& P2); |
44 | |
45 | //! Creates a semi-infinite domain for the curve associated |
46 | //! to a hatching. The `First' flag means that the given |
47 | //! point is the first one. |
48 | Standard_EXPORT HatchGen_Domain(const HatchGen_PointOnHatching& P, const Standard_Boolean First); |
49 | |
50 | //! Sets the first and the second points of the domain. |
51 | void SetPoints (const HatchGen_PointOnHatching& P1, const HatchGen_PointOnHatching& P2); |
52 | |
53 | //! Sets the first and the second points of the domain |
54 | //! as the infinite. |
55 | void SetPoints(); |
56 | |
57 | //! Sets the first point of the domain. |
58 | void SetFirstPoint (const HatchGen_PointOnHatching& P); |
59 | |
60 | //! Sets the first point of the domain at the |
61 | //! infinite. |
62 | void SetFirstPoint(); |
63 | |
64 | //! Sets the second point of the domain. |
65 | void SetSecondPoint (const HatchGen_PointOnHatching& P); |
66 | |
67 | //! Sets the second point of the domain at the |
68 | //! infinite. |
69 | void SetSecondPoint(); |
70 | |
71 | //! Returns True if the domain has a first point. |
72 | Standard_Boolean HasFirstPoint() const; |
73 | |
74 | //! Returns the first point of the domain. |
75 | //! The exception DomainError is raised if |
76 | //! HasFirstPoint returns False. |
77 | const HatchGen_PointOnHatching& FirstPoint() const; |
78 | |
79 | //! Returns True if the domain has a second point. |
80 | Standard_Boolean HasSecondPoint() const; |
81 | |
82 | //! Returns the second point of the domain. |
83 | //! The exception DomainError is raised if |
84 | //! HasSecondPoint returns False. |
85 | const HatchGen_PointOnHatching& SecondPoint() const; |
86 | |
87 | //! Dump of the domain. |
88 | Standard_EXPORT void Dump (const Standard_Integer Index = 0) const; |
89 | |
90 | |
91 | |
92 | |
93 | protected: |
94 | |
95 | |
96 | |
97 | |
98 | |
99 | private: |
100 | |
101 | |
102 | |
103 | Standard_Boolean myHasFirstPoint; |
104 | HatchGen_PointOnHatching myFirstPoint; |
105 | Standard_Boolean myHasSecondPoint; |
106 | HatchGen_PointOnHatching mySecondPoint; |
107 | |
108 | |
109 | }; |
110 | |
111 | |
112 | #include <HatchGen_Domain.lxx> |
113 | |
114 | |
115 | |
116 | |
117 | |
118 | #endif // _HatchGen_Domain_HeaderFile |