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
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _Intf_TangentZone_HeaderFile
18 #define _Intf_TangentZone_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
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;
32 //! Describes a zone of tangence between polygons or
33 //! polyhedra as a sequence of points of intersection.
34 class Intf_TangentZone
41 //! Returns number of SectionPoint in this TangentZone.
42 Standard_Integer NumberOfPoints() const;
44 //! Gives the SectionPoint of address <Index> in the
46 Standard_EXPORT const Intf_SectionPoint& GetPoint (const Standard_Integer Index) const;
48 //! Compares two TangentZones.
49 Standard_EXPORT Standard_Boolean IsEqual (const Intf_TangentZone& Other) const;
50 Standard_Boolean operator == (const Intf_TangentZone& Other) const
52 return IsEqual(Other);
55 //! Checks if <ThePI> is in TangentZone.
56 Standard_EXPORT Standard_Boolean Contains (const Intf_SectionPoint& ThePI) const;
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;
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;
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;
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;
74 //! Returns True if <ThePI> is in the parameter range of the
76 Standard_EXPORT Standard_Boolean RangeContains (const Intf_SectionPoint& ThePI) const;
78 //! Returns True if the TangentZone <Other> has a common part
80 Standard_EXPORT Standard_Boolean HasCommonRange (const Intf_TangentZone& Other) const;
82 //! Builds an empty tangent zone.
83 Standard_EXPORT Intf_TangentZone();
85 //! Adds a SectionPoint to the TangentZone.
86 Standard_EXPORT void Append (const Intf_SectionPoint& Pi);
88 //! Adds the TangentZone <Tzi> to <me>.
89 Standard_EXPORT void Append (const Intf_TangentZone& Tzi);
91 //! Inserts a SectionPoint in the TangentZone.
92 Standard_EXPORT Standard_Boolean Insert (const Intf_SectionPoint& Pi);
94 //! Inserts a point in the polygonal TangentZone.
95 Standard_EXPORT void PolygonInsert (const Intf_SectionPoint& Pi);
97 //! Inserts a SectionPoint before <Index> in the TangentZone.
98 Standard_EXPORT void InsertBefore (const Standard_Integer Index, const Intf_SectionPoint& Pi);
100 //! Inserts a SectionPoint after <Index> in the TangentZone.
101 Standard_EXPORT void InsertAfter (const Standard_Integer Index, const Intf_SectionPoint& Pi);
103 Standard_EXPORT void Dump (const Standard_Integer Indent) const;
118 Intf_SeqOfSectionPoint Result;
119 Standard_Real ParamOnFirstMin;
120 Standard_Real ParamOnFirstMax;
121 Standard_Real ParamOnSecondMin;
122 Standard_Real ParamOnSecondMax;
128 #include <Intf_TangentZone.lxx>
134 #endif // _Intf_TangentZone_HeaderFile