mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-18 12:30:32 +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
|
// Put internal nodes
|
||||||
SMESHDS_SubMesh* sm = meshDS->MeshElements( myEdge[i] );
|
if ( SMESHDS_SubMesh* sm = meshDS->MeshElements( myEdge[i] ))
|
||||||
if ( !sm ) continue;
|
{
|
||||||
vector< pair< double, const SMDS_MeshNode*> > u2nodeVec;
|
vector< pair< double, const SMDS_MeshNode*> > u2nodeVec;
|
||||||
u2nodeVec.reserve( sm->NbNodes() );
|
u2nodeVec.reserve( sm->NbNodes() );
|
||||||
SMDS_NodeIteratorPtr nItr = sm->GetNodes();
|
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 )
|
for ( size_t j = 0; j < u2nodeVec.size(); ++j )
|
||||||
u2node.insert( u2node.end(), u2nodeVec[j] );
|
u2node.insert( u2node.end(), u2nodeVec[j] );
|
||||||
|
}
|
||||||
|
|
||||||
// Put 2nd vertex node for a last edge
|
// Put 2nd vertex node for a last edge
|
||||||
if ( i+1 == myEdge.size() ) {
|
if ( i+1 == myEdge.size() ) {
|
||||||
@ -450,8 +451,8 @@ std::vector<const SMDS_MeshNode*> StdMeshers_FaceSide::GetOrderedNodes() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Put internal nodes
|
// Put internal nodes
|
||||||
SMESHDS_SubMesh* sm = meshDS->MeshElements( myEdge[i] );
|
if ( SMESHDS_SubMesh* sm = meshDS->MeshElements( myEdge[i] ))
|
||||||
if ( !sm ) continue;
|
{
|
||||||
SMDS_NodeIteratorPtr nItr = sm->GetNodes();
|
SMDS_NodeIteratorPtr nItr = sm->GetNodes();
|
||||||
double paramSize = myLast[i] - myFirst[i];
|
double paramSize = myLast[i] - myFirst[i];
|
||||||
double r = myNormPar[i] - prevNormPar;
|
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;
|
double normPar = prevNormPar + r * ( u - myFirst[i] ) / paramSize;
|
||||||
u2node.insert( u2node.end(), make_pair( normPar, node ));
|
u2node.insert( u2node.end(), make_pair( normPar, node ));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Put 2nd vertex node for a last edge
|
// Put 2nd vertex node for a last edge
|
||||||
if ( i+1 == myEdge.size() ) {
|
if ( i+1 == myEdge.size() ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user