Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1992-08-20
0002 // Created by: Christophe MARION
0003 // Copyright (c) 1992-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 _HLRAlgo_Coincidence_HeaderFile
0018 #define _HLRAlgo_Coincidence_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <Standard_Integer.hxx>
0024 #include <TopAbs_State.hxx>
0025 
0026 //! The Coincidence class is used in an Inteference to
0027 //! store information on the "hiding" edge.
0028 //!
0029 //! 2D  Data : The  tangent  and the  curvature of the
0030 //! projection of the edge  at the intersection point.
0031 //! This is necesserary  when the intersection  is  at
0032 //! the extremity of the edge.
0033 //!
0034 //! 3D   Data  :  The   state of  the   edge  near the
0035 //! intersection   with  the face (before  and after).
0036 //! This is necessary  when the  intersection is  "ON"
0037 //! the face.
0038 class HLRAlgo_Coincidence
0039 {
0040 public:
0041   DEFINE_STANDARD_ALLOC
0042 
0043   HLRAlgo_Coincidence() :
0044     myFE(0),
0045     myParam(0.),
0046     myStBef(TopAbs_IN),
0047     myStAft(TopAbs_IN)
0048   {
0049   }
0050 
0051   void Set2D (const Standard_Integer FE, const Standard_Real Param)
0052   {
0053     myFE    = FE;
0054     myParam = Param;
0055   }
0056 
0057   void SetState3D (const TopAbs_State stbef, const TopAbs_State staft)
0058   {
0059     myStBef = stbef;
0060     myStAft = staft;
0061   }
0062 
0063   void Value2D (Standard_Integer& FE, Standard_Real& Param) const
0064   {
0065     FE    = myFE;
0066     Param = myParam;
0067   }
0068 
0069   void State3D (TopAbs_State& stbef, TopAbs_State& staft) const
0070   {
0071     stbef = myStBef;
0072     staft = myStAft;
0073   }
0074 
0075 private:
0076   Standard_Integer myFE;
0077   Standard_Real myParam;
0078   TopAbs_State myStBef;
0079   TopAbs_State myStAft;
0080 };
0081 
0082 #endif // _HLRAlgo_Coincidence_HeaderFile