22502: [CEA 1070] "Convert to quadratic" does not work if some edges are not set by some elements during meshing

Fix a case of a node on VERTEX not belonging to EDGE the segment of node is on
This commit is contained in:
eap 2014-03-04 16:04:11 +04:00
parent 457be09338
commit 590f139ee4

View File

@ -1423,8 +1423,15 @@ const SMDS_MeshNode* SMESH_MesherHelper::GetMediumNode(const SMDS_MeshNode* n1,
return getMediumNodeOnComposedWire(n1,n2,force3d); return getMediumNodeOnComposedWire(n1,n2,force3d);
} }
E = TopoDS::Edge(meshDS->IndexToShape( edgeID = pos.first )); E = TopoDS::Edge(meshDS->IndexToShape( edgeID = pos.first ));
u[0] = GetNodeU(E,n1,n2, force3d ? 0 : &uvOK[0]); try {
u[1] = GetNodeU(E,n2,n1, force3d ? 0 : &uvOK[1]); u[0] = GetNodeU(E,n1,n2, force3d ? 0 : &uvOK[0]);
u[1] = GetNodeU(E,n2,n1, force3d ? 0 : &uvOK[1]);
}
catch ( Standard_Failure& f )
{
// issue 22502 / a node is on VERTEX not belonging to E
return getMediumNodeOnComposedWire(n1,n2,force3d);
}
} }
if ( !force3d & uvOK[0] && uvOK[1] ) if ( !force3d & uvOK[0] && uvOK[1] )