Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-03 09:15:21

0001 // Created on: 1992-11-19
0002 // Created by: Remi LEQUETTE
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 _BRepClass_Edge_HeaderFile
0018 #define _BRepClass_Edge_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 #include <TopoDS_Shape.hxx>
0024 #include <NCollection_List.hxx>
0025 #include <TopTools_ShapeMapHasher.hxx>
0026 #include <NCollection_IndexedDataMap.hxx>
0027 
0028 #include <TopoDS_Edge.hxx>
0029 #include <TopoDS_Face.hxx>
0030 
0031 //! This class is used to send the description of an
0032 //! Edge to the classifier. It contains an Edge and a
0033 //! Face. So the PCurve of the Edge can be found.
0034 class BRepClass_Edge
0035 {
0036 public:
0037   DEFINE_STANDARD_ALLOC
0038 
0039   Standard_EXPORT BRepClass_Edge();
0040 
0041   Standard_EXPORT BRepClass_Edge(const TopoDS_Edge& E, const TopoDS_Face& F);
0042 
0043   //! Returns the current Edge
0044   TopoDS_Edge& Edge() { return myEdge; }
0045 
0046   const TopoDS_Edge& Edge() const { return myEdge; }
0047 
0048   //! Returns the Face for the current Edge
0049   TopoDS_Face& Face() { return myFace; }
0050 
0051   const TopoDS_Face& Face() const { return myFace; }
0052 
0053   //! Returns the next Edge
0054   const TopoDS_Edge& NextEdge() const { return myNextEdge; }
0055 
0056   //! Finds and sets the next Edge for the current
0057   Standard_EXPORT void SetNextEdge(
0058     const NCollection_IndexedDataMap<TopoDS_Shape,
0059                                      NCollection_List<TopoDS_Shape>,
0060                                      TopTools_ShapeMapHasher>& theMapVE);
0061 
0062   //! Returns the maximum tolerance
0063   double MaxTolerance() const { return myMaxTolerance; }
0064 
0065   //! Sets the maximum tolerance at
0066   //! which to start checking in the intersector
0067   void SetMaxTolerance(const double theValue) { myMaxTolerance = theValue; }
0068 
0069   //! Returns true if we are using boxes
0070   //! in the intersector
0071   bool UseBndBox() const { return myUseBndBox; }
0072 
0073   //! Sets the status of whether we are
0074   //! using boxes or not
0075   void SetUseBndBox(const bool theValue) { myUseBndBox = theValue; }
0076 
0077 private:
0078   TopoDS_Edge myEdge;
0079   TopoDS_Face myFace;
0080   TopoDS_Edge myNextEdge;
0081   double      myMaxTolerance;
0082   bool        myUseBndBox;
0083 };
0084 
0085 #endif // _BRepClass_Edge_HeaderFile