Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-23 09:20:19

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 //! Implements the methods required to instantiates
0032 //! the EdgeInterferenceList from HLRAlgo.
0033 class HLRBRep_EdgeInterferenceTool
0034 {
0035 public:
0036   DEFINE_STANDARD_ALLOC
0037 
0038   Standard_EXPORT HLRBRep_EdgeInterferenceTool(const occ::handle<HLRBRep_Data>& DS);
0039 
0040   Standard_EXPORT void LoadEdge();
0041 
0042   void InitVertices();
0043 
0044   bool MoreVertices() const;
0045 
0046   void NextVertex();
0047 
0048   const HLRAlgo_Intersection& CurrentVertex() const;
0049 
0050   TopAbs_Orientation CurrentOrientation() const;
0051 
0052   double CurrentParameter() const;
0053 
0054   bool IsPeriodic() const;
0055 
0056   //! Returns local geometric description of the Edge at
0057   //! parameter <Para>. See method Reset of class
0058   //! EdgeFaceTransition from TopCnx for other arguments.
0059   Standard_EXPORT void EdgeGeometry(const double Param,
0060                                     gp_Dir&      Tgt,
0061                                     gp_Dir&      Nrm,
0062                                     double&      Curv) const;
0063 
0064   double ParameterOfInterference(const HLRAlgo_Interference& I) const;
0065 
0066   //! True if the two interferences are on the same
0067   //! geometric locus.
0068   Standard_EXPORT bool SameInterferences(const HLRAlgo_Interference& I1,
0069                                          const HLRAlgo_Interference& I2) const;
0070 
0071   //! True if the Interference and the current Vertex
0072   //! are on the same geometric locus.
0073   Standard_EXPORT bool SameVertexAndInterference(const HLRAlgo_Interference& I) const;
0074 
0075   //! Returns the geometry of the boundary at the
0076   //! interference <I>. See the AddInterference method
0077   //! of the class EdgeFaceTransition from TopCnx for
0078   //! the other arguments.
0079   Standard_EXPORT void InterferenceBoundaryGeometry(const HLRAlgo_Interference& I,
0080                                                     gp_Dir&                     Tang,
0081                                                     gp_Dir&                     Norm,
0082                                                     double&                     Curv) const;
0083 
0084 private:
0085   occ::handle<HLRBRep_Data> myDS;
0086   HLRAlgo_Intersection      inter[2];
0087   int                       cur;
0088 };
0089 
0090 #include <HLRBRep_EdgeInterferenceTool.lxx>
0091 
0092 #endif // _HLRBRep_EdgeInterferenceTool_HeaderFile