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 intersection point.
46 Standard_EXPORT HatchGen_PointOnHatching(const IntRes2d_IntersectionPoint& Point);
48 //! Adds a point on element to the point.
49 Standard_EXPORT void AddPoint (const HatchGen_PointOnElement& Point, const Standard_Real Confusion);
51 //! Returns the number of elements intersecting the
52 //! hatching at this point.
53 Standard_EXPORT Standard_Integer NbPoints() const;
55 //! Returns the Index-th point on element of the point.
56 //! The exception OutOfRange is raised if
58 Standard_EXPORT const HatchGen_PointOnElement& Point (const Standard_Integer Index) const;
60 //! Removes the Index-th point on element of the point.
61 //! The exception OutOfRange is raised if
63 Standard_EXPORT void RemPoint (const Standard_Integer Index);
65 //! Removes all the points on element of the point.
66 Standard_EXPORT void ClrPoints();
68 //! Tests if the point is lower than an other.
69 //! A point on hatching P1 is said to be lower than an
71 //! P2.myParam - P1.myParam > Confusion
72 Standard_EXPORT Standard_Boolean IsLower (const HatchGen_PointOnHatching& Point, const Standard_Real Confusion) const;
74 //! Tests if the point is equal to an other.
75 //! A point on hatching P1 is said to be equal to an
77 //! | P2.myParam - P1.myParam | <= Confusion
78 Standard_EXPORT Standard_Boolean IsEqual (const HatchGen_PointOnHatching& Point, const Standard_Real Confusion) const;
80 //! Tests if the point is greater than an other.
81 //! A point on hatching P1 is said to be greater than an
83 //! P1.myParam - P2.myParam > Confusion
84 Standard_EXPORT Standard_Boolean IsGreater (const HatchGen_PointOnHatching& Point, const Standard_Real Confusion) const;
86 //! Dump of the point.
87 Standard_EXPORT void Dump (const Standard_Integer Index = 0) const;
96 HatchGen_PointsOnElement myPoints;
113 #endif // _HatchGen_PointOnHatching_HeaderFile