From 905428003cb60048ba6e772495913db2c5df834f Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 22 Oct 2014 16:09:15 +0400 Subject: [PATCH] 0025412: BRepMesh_FastDiscretFace::tryToInsertAnalyticVertex() - fix invalid comparison Remove unused field BRepMesh_FastDiscretFace::myWithShare. Remove "virtual" from method of class ::FixedVExplorer. --- src/BRepMesh/BRepMesh_FastDiscret.cxx | 2 +- src/BRepMesh/BRepMesh_FastDiscretFace.cxx | 12 ++++++------ src/BRepMesh/BRepMesh_FastDiscretFace.hxx | 6 ++---- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/BRepMesh/BRepMesh_FastDiscret.cxx b/src/BRepMesh/BRepMesh_FastDiscret.cxx index 2c8221bd15..3cea490ec4 100644 --- a/src/BRepMesh/BRepMesh_FastDiscret.cxx +++ b/src/BRepMesh/BRepMesh_FastDiscret.cxx @@ -193,7 +193,7 @@ void BRepMesh_FastDiscret::Process(const TopoDS_Face& theFace) const { OCC_CATCH_SIGNALS - BRepMesh_FastDiscretFace aTool(GetAngle(), WithShare()); + BRepMesh_FastDiscretFace aTool(GetAngle()); aTool.Perform(anAttribute); } catch (Standard_Failure) diff --git a/src/BRepMesh/BRepMesh_FastDiscretFace.cxx b/src/BRepMesh/BRepMesh_FastDiscretFace.cxx index 28004d3246..9639740d23 100644 --- a/src/BRepMesh/BRepMesh_FastDiscretFace.cxx +++ b/src/BRepMesh/BRepMesh_FastDiscretFace.cxx @@ -90,7 +90,8 @@ static Standard_Real FUN_CalcAverageDUV(TColStd_Array1OfReal& P, const Standard_ return (n? (result / (Standard_Real) n) : -1.); } -namespace { +namespace +{ //! Auxiliary class used to extract geometrical parameters of fixed TopoDS_Vertex. class FixedVExplorer @@ -119,7 +120,7 @@ namespace { return TopoDS_Vertex(); } - virtual gp_Pnt Point() const + gp_Pnt Point() const { return BRep_Tool::Pnt(myVertex); } @@ -138,12 +139,11 @@ namespace { //======================================================================= //function : BRepMesh_FastDiscretFace -//purpose : +//purpose : //======================================================================= BRepMesh_FastDiscretFace::BRepMesh_FastDiscretFace - (const Standard_Real theAngle, - const Standard_Boolean theWithShare) -: myAngle(theAngle), myWithShare(theWithShare), + (const Standard_Real theAngle) +: myAngle(theAngle), myInternalVerticesMode(Standard_True) { myAllocator = new NCollection_IncAllocator(64000); diff --git a/src/BRepMesh/BRepMesh_FastDiscretFace.hxx b/src/BRepMesh/BRepMesh_FastDiscretFace.hxx index 3c286d55b0..37dee2a02f 100644 --- a/src/BRepMesh/BRepMesh_FastDiscretFace.hxx +++ b/src/BRepMesh/BRepMesh_FastDiscretFace.hxx @@ -51,8 +51,7 @@ class BRepMesh_FastDiscretFace : public Standard_Transient public: Standard_EXPORT BRepMesh_FastDiscretFace( - const Standard_Real theAngle, - const Standard_Boolean theWithShare = Standard_True); + const Standard_Real theAngle); Standard_EXPORT void Add(const Handle(BRepMesh_FaceAttribute)& theAttribute); Standard_EXPORT void Perform(const Handle(BRepMesh_FaceAttribute)& theAttribute); @@ -119,7 +118,7 @@ private: const AnalyticSurface& theAnalyticSurface, BRepMesh::ListOfVertex& theVertices) { - if (!myClassifier->Perform(thePnt2d) == TopAbs_IN) + if (myClassifier->Perform(thePnt2d) != TopAbs_IN) return; gp_Pnt aPnt; @@ -141,7 +140,6 @@ private: private: Standard_Real myAngle; - Standard_Boolean myWithShare; Standard_Boolean myInternalVerticesMode; BRepMesh::IMapOfReal myUParam; BRepMesh::IMapOfReal myVParam; -- 2.20.1