From: Dzmitry Razmyslovich Date: Mon, 29 Mar 2021 11:54:42 +0000 (+0200) Subject: 0032261: Mesh - some trivial improvements for mesher X-Git-Tag: V7_6_0_beta~128 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=ccb3502a56de8842750d792324f675330ef2c134;p=occt.git 0032261: Mesh - some trivial improvements for mesher BRepMesh_GeomTool::IntSegSeg misses one case, when the result is Glued --- diff --git a/src/BRepMesh/BRepMesh_GeomTool.cxx b/src/BRepMesh/BRepMesh_GeomTool.cxx index 65efa22573..abdb8ddead 100644 --- a/src/BRepMesh/BRepMesh_GeomTool.cxx +++ b/src/BRepMesh/BRepMesh_GeomTool.cxx @@ -342,18 +342,26 @@ BRepMesh_GeomTool::IntFlag BRepMesh_GeomTool::IntSegSeg( classifyPoint(theStartPnt2, theEndPnt2, theEndPnt1 ) }; + Standard_Integer aPosHash = + aPointHash[0] + aPointHash[1] + aPointHash[2] + aPointHash[3]; + // Consider case when edges have shared vertex if ( aPointHash[0] < 0 || aPointHash[1] < 0 ) { - if ( isConsiderEndPointTouch ) - return BRepMesh_GeomTool::EndPointTouch; + if (aPosHash == -1) + { + // -1 means, that 2 points are equal, and 1 point is on another curve + return BRepMesh_GeomTool::Glued; + } + else + { + if (isConsiderEndPointTouch) + return BRepMesh_GeomTool::EndPointTouch; - return BRepMesh_GeomTool::NoIntersection; + return BRepMesh_GeomTool::NoIntersection; + } } - Standard_Integer aPosHash = - aPointHash[0] + aPointHash[1] + aPointHash[2] + aPointHash[3]; - /*=========================================*/ /* 1) hash code == 1: