Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1997-04-17
0002 // Created by: Christophe MARION
0003 // Copyright (c) 1997-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 _HLRBRep_EdgeInterferenceTool_HeaderFile
0018 #define _HLRBRep_EdgeInterferenceTool_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <HLRAlgo_Intersection.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <TopAbs_Orientation.hxx>
0027 class HLRBRep_Data;
0028 class gp_Dir;
0029 class HLRAlgo_Interference;
0030 
0031 
0032 //! Implements the  methods required  to  instantiates
0033 //! the EdgeInterferenceList from HLRAlgo.
0034 class HLRBRep_EdgeInterferenceTool 
0035 {
0036 public:
0037 
0038   DEFINE_STANDARD_ALLOC
0039 
0040   
0041   Standard_EXPORT HLRBRep_EdgeInterferenceTool(const Handle(HLRBRep_Data)& DS);
0042   
0043   Standard_EXPORT void LoadEdge();
0044   
0045     void InitVertices();
0046   
0047     Standard_Boolean MoreVertices() const;
0048   
0049     void NextVertex();
0050   
0051     const HLRAlgo_Intersection& CurrentVertex() const;
0052   
0053     TopAbs_Orientation CurrentOrientation() const;
0054   
0055     Standard_Real CurrentParameter() const;
0056   
0057     Standard_Boolean IsPeriodic() const;
0058   
0059   //! Returns local geometric description of the Edge at
0060   //! parameter   <Para>.  See  method  Reset  of  class
0061   //! EdgeFaceTransition from TopCnx for other arguments.
0062   Standard_EXPORT void EdgeGeometry (const Standard_Real Param, gp_Dir& Tgt, gp_Dir& Nrm, Standard_Real& Curv) const;
0063   
0064     Standard_Real ParameterOfInterference (const HLRAlgo_Interference& I) const;
0065   
0066   //! True if   the  two interferences are on   the same
0067   //! geometric locus.
0068   Standard_EXPORT Standard_Boolean SameInterferences (const HLRAlgo_Interference& I1, const HLRAlgo_Interference& I2) const;
0069   
0070   //! True if the  Interference and the  current  Vertex
0071   //! are on the same geometric locus.
0072   Standard_EXPORT Standard_Boolean SameVertexAndInterference (const HLRAlgo_Interference& I) const;
0073   
0074   //! Returns   the  geometry of  the   boundary  at the
0075   //! interference  <I>.  See the AddInterference method
0076   //! of the class  EdgeFaceTransition  from  TopCnx for
0077   //! the other arguments.
0078   Standard_EXPORT void InterferenceBoundaryGeometry (const HLRAlgo_Interference& I, gp_Dir& Tang, gp_Dir& Norm, Standard_Real& Curv) const;
0079 
0080 
0081 
0082 
0083 protected:
0084 
0085 
0086 
0087 
0088 
0089 private:
0090 
0091 
0092 
0093   Handle(HLRBRep_Data) myDS;
0094   HLRAlgo_Intersection inter[2];
0095   Standard_Integer cur;
0096 
0097 
0098 };
0099 
0100 
0101 #include <HLRBRep_EdgeInterferenceTool.lxx>
0102 
0103 
0104 
0105 
0106 
0107 #endif // _HLRBRep_EdgeInterferenceTool_HeaderFile