X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHUtils%2FSMESH_Block.cxx;h=b87928995d638f8bed1cdc61e8381c557b7cf492;hb=21ea791049211d08356651965878a227b739c2ce;hp=271ef8b0a682fb6a9b7ee13369a9facc6e6d2269;hpb=251f8c052dd12dd29922210dc901b295fe999a0e;p=modules%2Fsmesh.git diff --git a/src/SMESHUtils/SMESH_Block.cxx b/src/SMESHUtils/SMESH_Block.cxx index 271ef8b0a..b87928995 100644 --- a/src/SMESHUtils/SMESH_Block.cxx +++ b/src/SMESHUtils/SMESH_Block.cxx @@ -596,6 +596,7 @@ Standard_Boolean SMESH_Block::Values(const math_Vector& theXYZ, if ( mag > DBL_MIN ) dPi /= mag; drv[ iP - 1 ] = dPi; + // drv[ iP - 1 ] = dPi / 0.001; } for ( int iP = 0; iP < 3; iP++ ) { #if 1 @@ -725,7 +726,7 @@ bool SMESH_Block::ComputeParameters(const gp_Pnt& thePoint, bool hasHint = ( 0 <= theParamsHint.X() && theParamsHint.X() <= 1 && 0 <= theParamsHint.Y() && theParamsHint.Y() <= 1 && - 0 <= theParamsHint.Y() && theParamsHint.Y() <= 1 ); + 0 <= theParamsHint.Z() && theParamsHint.Z() <= 1 ); if ( !hasHint && !myGridComputed ) { // define the first guess by thePoint projection on lines @@ -1798,8 +1799,11 @@ bool SMESH_Block::FindBlockShapes(const TopoDS_Shell& theShell, for ( ; eIt.More(); eIt.Next() ) { const TopoDS_Edge& e = TopoDS::Edge( eIt.Value() ); TopoDS_Vertex v = TopExp::FirstVertex( e ); - if ( v.IsSame( V000 )) + if ( v.IsSame( V000 )) { v = TopExp::LastVertex( e ); + if ( v.IsSame( V000 )) + return false; + } val = dir001 * gp_Vec( p000, BRep_Tool::Pnt( v )).Normalized(); if ( val > maxVal ) { V001 = v;