1 // Created on: 1993-10-29
2 // Created by: Jean Marc LACHAUME
3 // Copyright (c) 1993-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 _HatchGen_PointOnHatching_HeaderFile
18 #define _HatchGen_PointOnHatching_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <HatchGen_PointsOnElement.hxx>
25 #include <HatchGen_IntersectionPoint.hxx>
26 #include <Standard_Real.hxx>
27 #include <Standard_Integer.hxx>
28 #include <Standard_Boolean.hxx>
29 class Standard_OutOfRange;
30 class IntRes2d_IntersectionPoint;
31 class HatchGen_PointOnElement;
35 class HatchGen_PointOnHatching : public HatchGen_IntersectionPoint
42 //! Creates an empty point.
43 Standard_EXPORT HatchGen_PointOnHatching();
45 //! Creates a point from an other.
46 Standard_EXPORT HatchGen_PointOnHatching(const HatchGen_PointOnHatching& Point);
48 //! Creates a point from an intersection point.
49 Standard_EXPORT HatchGen_PointOnHatching(const IntRes2d_IntersectionPoint& Point);
51 //! Adds a point on element to the point.
52 Standard_EXPORT void AddPoint (const HatchGen_PointOnElement& Point, const Standard_Real Confusion);
54 //! Returns the number of elements intersecting the
55 //! hatching at this point.
56 Standard_EXPORT Standard_Integer NbPoints() const;
58 //! Returns the Index-th point on element of the point.
59 //! The exception OutOfRange is raised if
61 Standard_EXPORT const HatchGen_PointOnElement& Point (const Standard_Integer Index) const;
63 //! Removes the Index-th point on element of the point.
64 //! The exception OutOfRange is raised if
66 Standard_EXPORT void RemPoint (const Standard_Integer Index);
68 //! Removes all the points on element of the point.
69 Standard_EXPORT void ClrPoints();
71 //! Tests if the point is lower than an other.
72 //! A point on hatching P1 is said to be lower than an
74 //! P2.myParam - P1.myParam > Confusion
75 Standard_EXPORT Standard_Boolean IsLower (const HatchGen_PointOnHatching& Point, const Standard_Real Confusion) const;
77 //! Tests if the point is equal to an other.
78 //! A point on hatching P1 is said to be equal to an
80 //! | P2.myParam - P1.myParam | <= Confusion
81 Standard_EXPORT Standard_Boolean IsEqual (const HatchGen_PointOnHatching& Point, const Standard_Real Confusion) const;
83 //! Tests if the point is greater than an other.
84 //! A point on hatching P1 is said to be greater than an
86 //! P1.myParam - P2.myParam > Confusion
87 Standard_EXPORT Standard_Boolean IsGreater (const HatchGen_PointOnHatching& Point, const Standard_Real Confusion) const;
89 //! Dump of the point.
90 Standard_EXPORT void Dump (const Standard_Integer Index = 0) const;
99 HatchGen_PointsOnElement myPoints;
116 #endif // _HatchGen_PointOnHatching_HeaderFile