From 91db52567f22ea819dabc46ca7c525ac9edd0b36 Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 23 Aug 2010 05:26:19 +0000 Subject: [PATCH] 0020958: EDF 1529 SMESH : If some faces have been meshed with small quadrangles Netgen 3D creates pyramids with volume zero and fails bool CheckIntersection(const gp_Pnt& P, const gp_Pnt& PC, gp_Pnt& Pint, SMESH_Mesh& aMesh, const TopoDS_Shape& aShape, - const TopoDS_Shape& NotCheckedFace); + const SMDS_MeshElement* NotCheckedFace); --- src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx | 9 +++++---- src/StdMeshers/StdMeshers_QuadToTriaAdaptor.hxx | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx b/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx index 530ff50d1..215f39e55 100644 --- a/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx +++ b/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx @@ -228,7 +228,7 @@ static bool HasIntersection(const gp_Pnt& P, const gp_Pnt& PC, gp_Pnt& Pint, * \param Pint - (out) intersection point * \param aMesh - mesh * \param aShape - shape to check faces on - * \param NotCheckedFace - not used + * \param NotCheckedFace - mesh face not to check * \retval bool - true if there is an intersection */ //================================================================================ @@ -238,7 +238,7 @@ bool StdMeshers_QuadToTriaAdaptor::CheckIntersection (const gp_Pnt& P, gp_Pnt& Pint, SMESH_Mesh& aMesh, const TopoDS_Shape& aShape, - const TopoDS_Shape& NotCheckedFace) + const SMDS_MeshElement* NotCheckedFace) { if ( !myElemSearcher ) myElemSearcher = SMESH_MeshEditor(&aMesh).GetElementSearcher(); @@ -266,6 +266,7 @@ bool StdMeshers_QuadToTriaAdaptor::CheckIntersection (const gp_Pnt& P, for ( int i = 0; i < suspectElems.size(); ++i ) { const SMDS_MeshElement* face = suspectElems[i]; + if ( face == NotCheckedFace ) continue; Handle(TColgp_HSequenceOfPnt) aContour = new TColgp_HSequenceOfPnt; for ( int i = 0; i < face->NbCornerNodes(); ++i ) aContour->Append( SMESH_MeshEditor::TNodeXYZ( face->GetNode(i) )); @@ -501,7 +502,7 @@ bool StdMeshers_QuadToTriaAdaptor::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape else { // check possible intersection with other faces gp_Pnt Pint; - bool check = CheckIntersection(PCbest, PC, Pint, aMesh, aShape, aShapeFace); + bool check = CheckIntersection(PCbest, PC, Pint, aMesh, aShape, face); if(check) { //cout<<"--PC("<