Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:50

0001 // Created on: 1993-10-29
0002 // Created by: Jean Marc LACHAUME
0003 // Copyright (c) 1993-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _HatchGen_PointOnHatching_HeaderFile
0018 #define _HatchGen_PointOnHatching_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <HatchGen_PointsOnElement.hxx>
0025 #include <HatchGen_IntersectionPoint.hxx>
0026 #include <Standard_Boolean.hxx>
0027 class IntRes2d_IntersectionPoint;
0028 class HatchGen_PointOnElement;
0029 
0030 
0031 
0032 class HatchGen_PointOnHatching  : public HatchGen_IntersectionPoint
0033 {
0034 public:
0035 
0036   DEFINE_STANDARD_ALLOC
0037 
0038   
0039   //! Creates an empty point.
0040   Standard_EXPORT HatchGen_PointOnHatching();
0041 
0042   //! Creates a point from an intersection point.
0043   Standard_EXPORT HatchGen_PointOnHatching(const IntRes2d_IntersectionPoint& Point);
0044   
0045   //! Adds a point on element to the point.
0046   Standard_EXPORT void AddPoint (const HatchGen_PointOnElement& Point, const Standard_Real Confusion);
0047   
0048   //! Returns the number of elements intersecting the
0049   //! hatching at this point.
0050   Standard_EXPORT Standard_Integer NbPoints() const;
0051   
0052   //! Returns the Index-th point on element of the point.
0053   //! The exception OutOfRange is raised if
0054   //! Index > NbPoints.
0055   Standard_EXPORT const HatchGen_PointOnElement& Point (const Standard_Integer Index) const;
0056   
0057   //! Removes the Index-th point on element of the point.
0058   //! The exception OutOfRange is raised if
0059   //! Index > NbPoints.
0060   Standard_EXPORT void RemPoint (const Standard_Integer Index);
0061   
0062   //! Removes all the points on element of the point.
0063   Standard_EXPORT void ClrPoints();
0064   
0065   //! Tests if the point is lower than an other.
0066   //! A point on hatching P1 is said to be lower than an
0067   //! other P2 if :
0068   //! P2.myParam - P1.myParam > Confusion
0069   Standard_EXPORT Standard_Boolean IsLower (const HatchGen_PointOnHatching& Point, const Standard_Real Confusion) const;
0070   
0071   //! Tests if the  point is equal to an other.
0072   //! A  point on hatching P1 is said to be equal to an
0073   //! other P2 if :
0074   //! | P2.myParam - P1.myParam | <= Confusion
0075   Standard_EXPORT Standard_Boolean IsEqual (const HatchGen_PointOnHatching& Point, const Standard_Real Confusion) const;
0076   
0077   //! Tests if the point is greater than an other.
0078   //! A point on hatching P1 is said to be greater than an
0079   //! other P2 if :
0080   //! P1.myParam - P2.myParam > Confusion
0081   Standard_EXPORT Standard_Boolean IsGreater (const HatchGen_PointOnHatching& Point, const Standard_Real Confusion) const;
0082   
0083   //! Dump of the point.
0084   Standard_EXPORT void Dump (const Standard_Integer Index = 0) const;
0085 
0086 
0087 
0088 
0089 protected:
0090 
0091 
0092 
0093   HatchGen_PointsOnElement myPoints;
0094 
0095 
0096 private:
0097 
0098 
0099 
0100 
0101 
0102 };
0103 
0104 
0105 
0106 
0107 
0108 
0109 
0110 #endif // _HatchGen_PointOnHatching_HeaderFile