From f64fb34f8390745f8104770dc737a77281bf79de Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 7 Mar 2017 21:37:35 +0300 Subject: [PATCH] IPAL54025: MG-CADSurf regression: no edges generated on seam --- src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx index 19e1c59..28b1791 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx @@ -1579,19 +1579,20 @@ namespace const TopoDS_Face& makeProxyFace( SMESH_ProxyMesh::Ptr& viscousMesh, const TopoDS_Face& origFace) { - // get data of nodes on inner boundary of viscous layers SMESH_Mesh* origMesh = viscousMesh->GetMesh(); + + SMESH_MesherHelper helper( *origMesh ); + helper.SetSubShape( origFace ); + const bool hasSeam = helper.HasRealSeam(); + + // get data of nodes on inner boundary of viscous layers TError err; TSideVector wireVec = StdMeshers_FaceSide::GetFaceWires(origFace, *origMesh, /*skipMediumNodes = */true, - err, viscousMesh ); + err, &helper, viscousMesh ); if ( err && err->IsKO() ) throw *err.get(); // it should be caught at SMESH_subMesh - SMESH_MesherHelper helper( *origMesh ); - helper.SetSubShape( origFace ); - const bool hasSeam = helper.HasRealSeam(); - // proxy nodes and corresponding tmp VERTEXes std::vector origNodes; std::vector tmpVertex; @@ -2210,11 +2211,13 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, // IMP23368. Do not set tag to an EDGE shared by FACEs of a hyper-patch bool isInHyperPatch = false; { - std::set< int > faceTags; + std::set< int > faceTags, faceIDs; TopTools_ListIteratorOfListOfShape fIt( e2ffmap.FindFromKey( e )); for ( ; fIt.More(); fIt.Next() ) { int faceTag = meshDS->ShapeToIndex( fIt.Value() ); + if ( !faceIDs.insert( faceTag ).second ) + continue; // a face encounters twice for a seam edge int hpTag = BLSURFPlugin_Hypothesis::GetHyperPatchTag( faceTag, _hypothesis ); if ( !faceTags.insert( hpTag ).second ) { -- 2.39.2