- SMESH_ComputeErrorPtr err = projector1D->GetComputeError();
- if ( err->IsOK() ) err->myName = COMPERR_ALGO_FAILED;
- tgtEdgeSm->GetComputeError() = err;
- return false;
+ DBGOUT( "COMPUTE H edge " << srcSM->GetId());
+ srcSM->ComputeSubMeshStateEngine( SMESH_subMesh::COMPUTE ); // nodes on VERTEXes
+ srcSM->ComputeStateEngine( SMESH_subMesh::COMPUTE ); // segments on the EDGE
+ }
+ srcSM->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE );
+
+ if ( !tgtSM->IsMeshComputed() )
+ {
+ // compute nodes on VERTEXes
+ tgtSM->ComputeSubMeshStateEngine( SMESH_subMesh::COMPUTE );
+ // project segments
+ DBGOUT( "COMPUTE H edge (proj) " << tgtSM->GetId());
+ projector1D->myHyp.SetSourceEdge( TopoDS::Edge( srcSM->GetSubShape() ));
+ projector1D->InitComputeError();
+ bool ok = projector1D->Compute( *mesh, tgtSM->GetSubShape() );
+ if ( !ok )
+ {
+ SMESH_ComputeErrorPtr err = projector1D->GetComputeError();
+ if ( err->IsOK() ) err->myName = COMPERR_ALGO_FAILED;
+ tgtSM->GetComputeError() = err;
+ return false;
+ }