X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_2smeshpy.cxx;h=17ee75746e49b91d4e0f02b86d1e43d47f08f01d;hp=d5dadd0e1a15447ff2fa4633c9b3b19adf8be59f;hb=b2eb2c3cef7c6fffbcc17e027be5e4d0357a935a;hpb=92bb7ceb6e3649e91fc0ad6942e838b79b71cab2 diff --git a/src/SMESH_I/SMESH_2smeshpy.cxx b/src/SMESH_I/SMESH_2smeshpy.cxx index d5dadd0e1..17ee75746 100644 --- a/src/SMESH_I/SMESH_2smeshpy.cxx +++ b/src/SMESH_I/SMESH_2smeshpy.cxx @@ -2048,7 +2048,7 @@ void _pyMesh::Process( const Handle(_pyCommand)& theCommand ) { addCmd = *cmd; cmd = addHypCmds.erase( cmd ); - if ( !theGen->IsToKeepAllCommands() && CanClear() ) { + if ( !theGen->IsToKeepAllCommands() /*&& CanClear()*/ ) { addCmd->Clear(); theCommand->Clear(); } @@ -3474,28 +3474,31 @@ bool _pySegmentLengthAroundVertexHyp::Addition2Creation( const Handle(_pyCommand _pyID vertex = theCmd->GetArg( 1 ); - // the problem here is that segment algo will not be found + // the problem here is that segment algo can be not found // by pyHypothesis::Addition2Creation() for , so we try to find // geometry where segment algorithm is assigned - Handle(_pyHypothesis) algo; _pyID geom = vertex; + Handle(_pyHypothesis) algo = theGen->FindAlgo( geom, theMeshID, this ); while ( algo.IsNull() && !geom.IsEmpty()) { // try to find geom as a father of geom = FatherID( geom ); algo = theGen->FindAlgo( geom, theMeshID, this ); } - if ( algo.IsNull() ) + if ( algo.IsNull() || geom.IsEmpty() ) return false; // also possible to find geom as brother of veretex... + // set geom instead of vertex theCmd->SetArg( 1, geom ); - // set vertex as a second arg - if ( myCurCrMethod->myArgs.size() < 1) setCreationArg( 1, "1" ); // :( - setCreationArg( 2, vertex ); - // mesh.AddHypothesis(vertex, SegmentLengthAroundVertex) --> - // theMeshID.LengthNearVertex( length, vertex ) - return _pyHypothesis::Addition2Creation( theCmd, theMeshID ); + // SegmentLengthAroundVertex = Regular_1D.LengthNearVertex( length ) + if ( _pyHypothesis::Addition2Creation( theCmd, theMeshID )) + { + // set vertex as a second arg + theCmd->SetArg( 2, vertex ); + + return true; + } } return false; }