From: eap Date: Thu, 15 Nov 2012 16:18:57 +0000 (+0000) Subject: 0021381: EDF 1984 BLSURFPLUGIN: Sub-mesh with BLSURF X-Git-Tag: V6_6_0~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4bafb379082505ff134ca5beda05d072475cd423;p=plugins%2Fblsurfplugin.git 0021381: EDF 1984 BLSURFPLUGIN: Sub-mesh with BLSURF Fix a regression: restore inversing order of nodes of pre-computed sub-meshes to have increasing node parameters --- diff --git a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx index 02cc52c..ad036b8 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx @@ -1917,7 +1917,19 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, return error(COMPERR_BAD_INPUT_MESH,"No node on vertex"); const std::vector& nodeDataVec = nodeData->GetUVPtStruct(); - if ( nodeDataVec.empty() ) { + if ( !nodeDataVec.empty() ) + { + if ( Abs( nodeDataVec[0].param - tmin ) > Abs( nodeDataVec.back().param - tmin )) + { + nodeData->Reverse(); + nodeData->GetUVPtStruct(); // nodeData recomputes nodeDataVec + } + // tmin and tmax can change in case of viscous layer on an adjacent edge + tmin = nodeDataVec.front().param; + tmax = nodeDataVec.back().param; + } + else + { cout << "---------------- Invalid nodeData" << endl; nodeData.reset(); } @@ -1949,15 +1961,18 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, dcad_get_edge_discretization(dcad, edg, &dedge); dcad_edge_discretization_set_vertex_count( dedge, nbNodes ); - //cout << endl << " EDGE " << ic << endl; - //cout << "tmin = "<GetID() << endl; + // cout << "\tt = " << t + // << "\t uv = ( " << uv[0] << ","<< uv[1] << " ) " + // << "\t u = " << nData.param + // << "\t ID = " << nData.node->GetID() << endl; dcad_edge_discretization_set_vertex_coordinates( dedge, iN+1, t, uv, nXYZ._xyz ); } dcad_edge_discretization_set_property(dedge, DISTENE_DCAD_PROPERTY_REQUIRED); @@ -2443,6 +2458,15 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, if ( !sm->IsMeshComputed() ) sm->SetIsAlwaysComputed( true ); + // Set error to FACE's w/o elements + for ( int i = 1; i <= fmap.Extent(); ++i ) + { + SMESH_subMesh* sm = aMesh.GetSubMesh( fmap(i) ); + if ( !sm->GetSubMeshDS() || sm->GetSubMeshDS()->NbElements() == 0 ) + sm->GetComputeError().reset + ( new SMESH_ComputeError( COMPERR_ALGO_FAILED, _comment, this )); + } + // Issue 0019864. On DebianSarge, FE signals do not obey to OSD::SetSignal(false) #ifndef WNT if ( oldFEFlags > 0 )