42cf5bc1 |
1 | // Created on: 1991-06-18 |
2 | // Created by: Didier PIFFAULT |
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 _Intf_TangentZone_HeaderFile |
18 | #define _Intf_TangentZone_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <Intf_SeqOfSectionPoint.hxx> |
25 | #include <Standard_Real.hxx> |
26 | #include <Standard_Integer.hxx> |
27 | #include <Standard_Boolean.hxx> |
28 | class Standard_OutOfRange; |
29 | class Intf_SectionPoint; |
30 | |
31 | |
32 | //! Describes a zone of tangence between polygons or |
33 | //! polyhedra as a sequence of points of intersection. |
34 | class Intf_TangentZone |
35 | { |
36 | public: |
37 | |
38 | DEFINE_STANDARD_ALLOC |
39 | |
40 | |
41 | //! Returns number of SectionPoint in this TangentZone. |
42 | Standard_Integer NumberOfPoints() const; |
43 | |
44 | //! Gives the SectionPoint of address <Index> in the |
45 | //! TangentZone. |
46 | Standard_EXPORT const Intf_SectionPoint& GetPoint (const Standard_Integer Index) const; |
47 | |
48 | //! Compares two TangentZones. |
49 | Standard_EXPORT Standard_Boolean IsEqual (const Intf_TangentZone& Other) const; |
50 | Standard_Boolean operator == (const Intf_TangentZone& Other) const |
51 | { |
52 | return IsEqual(Other); |
53 | } |
54 | |
55 | //! Checks if <ThePI> is in TangentZone. |
56 | Standard_EXPORT Standard_Boolean Contains (const Intf_SectionPoint& ThePI) const; |
57 | |
58 | //! Gives the parameter range of the TangentZone on the first |
59 | //! argument of the Interference. (Usable only for polygon) |
60 | void ParamOnFirst (Standard_Real& paraMin, Standard_Real& paraMax) const; |
61 | |
62 | //! Gives the parameter range of the TangentZone on the second |
63 | //! argument of the Interference. (Usable only for polygon) |
64 | void ParamOnSecond (Standard_Real& paraMin, Standard_Real& paraMax) const; |
65 | |
66 | //! Gives information about the first argument of the |
67 | //! Interference. (Usable only for polygon) |
68 | Standard_EXPORT void InfoFirst (Standard_Integer& segMin, Standard_Real& paraMin, Standard_Integer& segMax, Standard_Real& paraMax) const; |
69 | |
70 | //! Gives informations about the second argument of the |
71 | //! Interference. (Usable only for polygon) |
72 | Standard_EXPORT void InfoSecond (Standard_Integer& segMin, Standard_Real& paraMin, Standard_Integer& segMax, Standard_Real& paraMax) const; |
73 | |
74 | //! Returns True if <ThePI> is in the parameter range of the |
75 | //! TangentZone. |
76 | Standard_EXPORT Standard_Boolean RangeContains (const Intf_SectionPoint& ThePI) const; |
77 | |
78 | //! Returns True if the TangentZone <Other> has a common part |
79 | //! with <me>. |
80 | Standard_EXPORT Standard_Boolean HasCommonRange (const Intf_TangentZone& Other) const; |
81 | |
82 | //! Builds an empty tangent zone. |
83 | Standard_EXPORT Intf_TangentZone(); |
84 | |
85 | //! Copies a Tangent zone. |
86 | Standard_EXPORT Intf_TangentZone(const Intf_TangentZone& Other); |
87 | |
88 | //! Adds a SectionPoint to the TangentZone. |
89 | Standard_EXPORT void Append (const Intf_SectionPoint& Pi); |
90 | |
91 | //! Adds the TangentZone <Tzi> to <me>. |
92 | Standard_EXPORT void Append (const Intf_TangentZone& Tzi); |
93 | |
94 | //! Inserts a SectionPoint in the TangentZone. |
95 | Standard_EXPORT Standard_Boolean Insert (const Intf_SectionPoint& Pi); |
96 | |
97 | //! Inserts a point in the polygonal TangentZone. |
98 | Standard_EXPORT void PolygonInsert (const Intf_SectionPoint& Pi); |
99 | |
100 | //! Inserts a SectionPoint before <Index> in the TangentZone. |
101 | Standard_EXPORT void InsertBefore (const Standard_Integer Index, const Intf_SectionPoint& Pi); |
102 | |
103 | //! Inserts a SectionPoint after <Index> in the TangentZone. |
104 | Standard_EXPORT void InsertAfter (const Standard_Integer Index, const Intf_SectionPoint& Pi); |
105 | |
106 | Standard_EXPORT void Dump (const Standard_Integer Indent) const; |
107 | |
108 | |
109 | |
110 | |
111 | protected: |
112 | |
113 | |
114 | |
115 | |
116 | |
117 | private: |
118 | |
119 | |
120 | |
121 | Intf_SeqOfSectionPoint Result; |
122 | Standard_Real ParamOnFirstMin; |
123 | Standard_Real ParamOnFirstMax; |
124 | Standard_Real ParamOnSecondMin; |
125 | Standard_Real ParamOnSecondMax; |
126 | |
127 | |
128 | }; |
129 | |
130 | |
131 | #include <Intf_TangentZone.lxx> |
132 | |
133 | |
134 | |
135 | |
136 | |
137 | #endif // _Intf_TangentZone_HeaderFile |