Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-14 09:13:52

0001 // Created on: 1995-12-11
0002 // Created by: Jacques GOUSSARD
0003 // Copyright (c) 1995-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 _BRepCheck_Edge_HeaderFile
0018 #define _BRepCheck_Edge_HeaderFile
0019 
0020 #include <Adaptor3d_Curve.hxx>
0021 #include <BRepCheck_Result.hxx>
0022 #include <BRepCheck_Status.hxx>
0023 
0024 class BRep_CurveRepresentation;
0025 class TopoDS_Edge;
0026 class TopoDS_Shape;
0027 
0028 class BRepCheck_Edge : public BRepCheck_Result
0029 {
0030 
0031 public:
0032   Standard_EXPORT BRepCheck_Edge(const TopoDS_Edge& E);
0033 
0034   Standard_EXPORT void InContext(const TopoDS_Shape& ContextShape) override;
0035 
0036   Standard_EXPORT void Minimum() override;
0037 
0038   Standard_EXPORT void Blind() override;
0039 
0040   Standard_EXPORT bool GeometricControls() const;
0041 
0042   Standard_EXPORT void GeometricControls(const bool B);
0043 
0044   Standard_EXPORT double Tolerance();
0045 
0046   //! Sets status of Edge;
0047   Standard_EXPORT void SetStatus(const BRepCheck_Status theStatus);
0048 
0049   //! Sets method to calculate distance: Calculating in finite number of points (if theIsExact
0050   //! is false, faster, but possible not correct result) or exact calculating by using
0051   //! BRepLib_CheckCurveOnSurface class (if theIsExact is true, slowly, but more correctly).
0052   //! Exact method is used only when edge is SameParameter.
0053   //! Default method is calculating in finite number of points
0054   void SetExactMethod(bool theIsExact) { myIsExactMethod = theIsExact; }
0055 
0056   //! Returns true if exact method selected
0057   bool IsExactMethod() { return myIsExactMethod; }
0058 
0059   //! Checks, if polygon on triangulation of heEdge
0060   //! is out of 3D-curve of this edge.
0061   Standard_EXPORT BRepCheck_Status CheckPolygonOnTriangulation(const TopoDS_Edge& theEdge);
0062 
0063   DEFINE_STANDARD_RTTIEXT(BRepCheck_Edge, BRepCheck_Result)
0064 
0065 private:
0066   occ::handle<BRep_CurveRepresentation> myCref;
0067   occ::handle<Adaptor3d_Curve>          myHCurve;
0068   bool                                  myGctrl;
0069   bool                                  myIsExactMethod;
0070 };
0071 
0072 #endif // _BRepCheck_Edge_HeaderFile