// Created on: 1997-04-17 // Created by: Christophe MARION // Copyright (c) 1997-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 as published // by the Free Software Foundation, with special exception defined in the file // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT // distribution for complete text of the license and disclaimer of any warranty. // // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. #ifndef _HLRBRep_EdgeInterferenceTool_HeaderFile #define _HLRBRep_EdgeInterferenceTool_HeaderFile #include "Standard.hxx" #include "Standard_DefineAlloc.hxx" #include "Standard_Handle.hxx" #include "HLRAlgo_Intersection.hxx" #include "Standard_Integer.hxx" #include "TopAbs_Orientation.hxx" class HLRBRep_Data; class gp_Dir; class HLRAlgo_Interference; //! Implements the methods required to instantiates //! the EdgeInterferenceList from HLRAlgo. class HLRBRep_EdgeInterferenceTool { public: DEFINE_STANDARD_ALLOC Standard_EXPORT HLRBRep_EdgeInterferenceTool(const occ::handle& DS); Standard_EXPORT void LoadEdge(); void InitVertices(); bool MoreVertices() const; void NextVertex(); const HLRAlgo_Intersection& CurrentVertex() const; TopAbs_Orientation CurrentOrientation() const; double CurrentParameter() const; bool IsPeriodic() const; //! Returns local geometric description of the Edge at //! parameter . See method Reset of class //! EdgeFaceTransition from TopCnx for other arguments. Standard_EXPORT void EdgeGeometry(const double Param, gp_Dir& Tgt, gp_Dir& Nrm, double& Curv) const; double ParameterOfInterference(const HLRAlgo_Interference& I) const; //! True if the two interferences are on the same //! geometric locus. Standard_EXPORT bool SameInterferences(const HLRAlgo_Interference& I1, const HLRAlgo_Interference& I2) const; //! True if the Interference and the current Vertex //! are on the same geometric locus. Standard_EXPORT bool SameVertexAndInterference(const HLRAlgo_Interference& I) const; //! Returns the geometry of the boundary at the //! interference . See the AddInterference method //! of the class EdgeFaceTransition from TopCnx for //! the other arguments. Standard_EXPORT void InterferenceBoundaryGeometry(const HLRAlgo_Interference& I, gp_Dir& Tang, gp_Dir& Norm, double& Curv) const; private: occ::handle myDS; HLRAlgo_Intersection inter[2]; int cur; }; #include "HLRBRep_EdgeInterferenceTool.lxx" #endif // _HLRBRep_EdgeInterferenceTool_HeaderFile