Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-13 09:16:38

0001 // Created on: 1993-11-05
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_Domain_HeaderFile
0018 #define _HatchGen_Domain_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Standard_Boolean.hxx>
0025 #include <HatchGen_PointOnHatching.hxx>
0026 
0027 class HatchGen_Domain
0028 {
0029 public:
0030   DEFINE_STANDARD_ALLOC
0031 
0032   //! Creates an infinite domain.
0033   Standard_EXPORT HatchGen_Domain();
0034 
0035   //! Creates a domain for the curve associated to a hatching.
0036   Standard_EXPORT HatchGen_Domain(const HatchGen_PointOnHatching& P1,
0037                                   const HatchGen_PointOnHatching& P2);
0038 
0039   //! Creates a semi-infinite domain for the curve associated
0040   //! to a hatching. The `First' flag means that the given
0041   //! point is the first one.
0042   Standard_EXPORT HatchGen_Domain(const HatchGen_PointOnHatching& P, const bool First);
0043 
0044   //! Sets the first and the second points of the domain.
0045   void SetPoints(const HatchGen_PointOnHatching& P1, const HatchGen_PointOnHatching& P2);
0046 
0047   //! Sets the first and the second points of the domain
0048   //! as the infinite.
0049   void SetPoints();
0050 
0051   //! Sets the first point of the domain.
0052   void SetFirstPoint(const HatchGen_PointOnHatching& P);
0053 
0054   //! Sets the first point of the domain at the
0055   //! infinite.
0056   void SetFirstPoint();
0057 
0058   //! Sets the second point of the domain.
0059   void SetSecondPoint(const HatchGen_PointOnHatching& P);
0060 
0061   //! Sets the second point of the domain at the
0062   //! infinite.
0063   void SetSecondPoint();
0064 
0065   //! Returns True if the domain has a first point.
0066   bool HasFirstPoint() const;
0067 
0068   //! Returns the first point of the domain.
0069   //! The exception DomainError is raised if
0070   //! HasFirstPoint returns False.
0071   const HatchGen_PointOnHatching& FirstPoint() const;
0072 
0073   //! Returns True if the domain has a second point.
0074   bool HasSecondPoint() const;
0075 
0076   //! Returns the second point of the domain.
0077   //! The exception DomainError is raised if
0078   //! HasSecondPoint returns False.
0079   const HatchGen_PointOnHatching& SecondPoint() const;
0080 
0081   //! Dump of the domain.
0082   Standard_EXPORT void Dump(const int Index = 0) const;
0083 
0084 private:
0085   bool                     myHasFirstPoint;
0086   HatchGen_PointOnHatching myFirstPoint;
0087   bool                     myHasSecondPoint;
0088   HatchGen_PointOnHatching mySecondPoint;
0089 };
0090 
0091 #include <HatchGen_Domain.lxx>
0092 
0093 #endif // _HatchGen_Domain_HeaderFile