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 IntRes2d_IntersectionPoint;
30 class HatchGen_PointOnElement;
34 class HatchGen_PointOnHatching : public HatchGen_IntersectionPoint
41 //! Creates an empty point.
42 Standard_EXPORT HatchGen_PointOnHatching();
44 //! Creates a point from an intersection point.
45 Standard_EXPORT HatchGen_PointOnHatching(const IntRes2d_IntersectionPoint& Point);
47 //! Adds a point on element to the point.
48 Standard_EXPORT void AddPoint (const HatchGen_PointOnElement& Point, const Standard_Real Confusion);
50 //! Returns the number of elements intersecting the
51 //! hatching at this point.
52 Standard_EXPORT Standard_Integer NbPoints() const;
54 //! Returns the Index-th point on element of the point.
55 //! The exception OutOfRange is raised if
57 Standard_EXPORT const HatchGen_PointOnElement& Point (const Standard_Integer Index) const;
59 //! Removes the Index-th point on element of the point.
60 //! The exception OutOfRange is raised if
62 Standard_EXPORT void RemPoint (const Standard_Integer Index);
64 //! Removes all the points on element of the point.
65 Standard_EXPORT void ClrPoints();
67 //! Tests if the point is lower than an other.
68 //! A point on hatching P1 is said to be lower than an
70 //! P2.myParam - P1.myParam > Confusion
71 Standard_EXPORT Standard_Boolean IsLower (const HatchGen_PointOnHatching& Point, const Standard_Real Confusion) const;
73 //! Tests if the point is equal to an other.
74 //! A point on hatching P1 is said to be equal to an
76 //! | P2.myParam - P1.myParam | <= Confusion
77 Standard_EXPORT Standard_Boolean IsEqual (const HatchGen_PointOnHatching& Point, const Standard_Real Confusion) const;
79 //! Tests if the point is greater than an other.
80 //! A point on hatching P1 is said to be greater than an
82 //! P1.myParam - P2.myParam > Confusion
83 Standard_EXPORT Standard_Boolean IsGreater (const HatchGen_PointOnHatching& Point, const Standard_Real Confusion) const;
85 //! Dump of the point.
86 Standard_EXPORT void Dump (const Standard_Integer Index = 0) const;
95 HatchGen_PointsOnElement myPoints;
112 #endif // _HatchGen_PointOnHatching_HeaderFile