mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-18 10:20:37 +05:00
0021472: EDF 2080 SMESH: Projection1D2D on a Voronoi structure fails
fix GetOrderedNodes() to work if not all edges are meshed
This commit is contained in:
parent
4f5cf5faab
commit
8a81427a0c
@ -257,8 +257,8 @@ const vector<UVPtStruct>& StdMeshers_FaceSide::GetUVPtStruct(bool isXConst,
|
||||
}
|
||||
|
||||
// Put internal nodes
|
||||
SMESHDS_SubMesh* sm = meshDS->MeshElements( myEdge[i] );
|
||||
if ( !sm ) continue;
|
||||
if ( SMESHDS_SubMesh* sm = meshDS->MeshElements( myEdge[i] ))
|
||||
{
|
||||
vector< pair< double, const SMDS_MeshNode*> > u2nodeVec;
|
||||
u2nodeVec.reserve( sm->NbNodes() );
|
||||
SMDS_NodeIteratorPtr nItr = sm->GetNodes();
|
||||
@ -296,6 +296,7 @@ const vector<UVPtStruct>& StdMeshers_FaceSide::GetUVPtStruct(bool isXConst,
|
||||
}
|
||||
for ( size_t j = 0; j < u2nodeVec.size(); ++j )
|
||||
u2node.insert( u2node.end(), u2nodeVec[j] );
|
||||
}
|
||||
|
||||
// Put 2nd vertex node for a last edge
|
||||
if ( i+1 == myEdge.size() ) {
|
||||
@ -450,8 +451,8 @@ std::vector<const SMDS_MeshNode*> StdMeshers_FaceSide::GetOrderedNodes() const
|
||||
}
|
||||
|
||||
// Put internal nodes
|
||||
SMESHDS_SubMesh* sm = meshDS->MeshElements( myEdge[i] );
|
||||
if ( !sm ) continue;
|
||||
if ( SMESHDS_SubMesh* sm = meshDS->MeshElements( myEdge[i] ))
|
||||
{
|
||||
SMDS_NodeIteratorPtr nItr = sm->GetNodes();
|
||||
double paramSize = myLast[i] - myFirst[i];
|
||||
double r = myNormPar[i] - prevNormPar;
|
||||
@ -466,6 +467,7 @@ std::vector<const SMDS_MeshNode*> StdMeshers_FaceSide::GetOrderedNodes() const
|
||||
double normPar = prevNormPar + r * ( u - myFirst[i] ) / paramSize;
|
||||
u2node.insert( u2node.end(), make_pair( normPar, node ));
|
||||
}
|
||||
}
|
||||
|
||||
// Put 2nd vertex node for a last edge
|
||||
if ( i+1 == myEdge.size() ) {
|
||||
|
Loading…
Reference in New Issue
Block a user