mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-08 18:17:27 +05:00
Make SetNodeOnEdge() tell a valid range if U is invalid
Inspired by https://salome-platform.org/forum/forum_10/103286584
This commit is contained in:
parent
eb32ac37f3
commit
7cda93af40
@ -1390,8 +1390,11 @@ void SMESH_MeshEditor_i::SetNodeOnEdge(CORBA::Long NodeID, CORBA::Long EdgeID,
|
|||||||
Standard_Real f,l;
|
Standard_Real f,l;
|
||||||
BRep_Tool::Range( TopoDS::Edge( shape ), f,l);
|
BRep_Tool::Range( TopoDS::Edge( shape ), f,l);
|
||||||
if ( paramOnEdge < f || paramOnEdge > l )
|
if ( paramOnEdge < f || paramOnEdge > l )
|
||||||
THROW_SALOME_CORBA_EXCEPTION("Invalid paramOnEdge", SALOME::BAD_PARAM);
|
{
|
||||||
|
SMESH_Comment txt("Invalid paramOnEdge. It must vary in range [ ");
|
||||||
|
txt << f << ", " << l << " ]";
|
||||||
|
THROW_SALOME_CORBA_EXCEPTION(txt.c_str(), SALOME::BAD_PARAM);
|
||||||
|
}
|
||||||
mesh->SetNodeOnEdge( node, EdgeID, paramOnEdge );
|
mesh->SetNodeOnEdge( node, EdgeID, paramOnEdge );
|
||||||
|
|
||||||
myMesh->SetIsModified( true );
|
myMesh->SetIsModified( true );
|
||||||
@ -1434,14 +1437,11 @@ void SMESH_MeshEditor_i::SetNodeOnFace(CORBA::Long NodeID, CORBA::Long FaceID,
|
|||||||
v > surf.LastVParameter() );
|
v > surf.LastVParameter() );
|
||||||
|
|
||||||
if ( isOut ) {
|
if ( isOut ) {
|
||||||
#ifdef _DEBUG_
|
SMESH_Comment txt("Invalid UV. U must vary in range [ ");
|
||||||
MESSAGE ( "FACE " << FaceID << " (" << u << "," << v << ") out of "
|
txt << surf.FirstUParameter() << ", " << surf.LastUParameter() << " ], ";
|
||||||
<< " u( " << surf.FirstUParameter()
|
txt << "V must vary in range [ ";
|
||||||
<< "," << surf.LastUParameter()
|
txt << surf.FirstVParameter() << ", " << surf.LastVParameter() << " ]";
|
||||||
<< ") v( " << surf.FirstVParameter()
|
THROW_SALOME_CORBA_EXCEPTION(txt.c_str(), SALOME::BAD_PARAM);
|
||||||
<< "," << surf.LastVParameter() << ")" );
|
|
||||||
#endif
|
|
||||||
THROW_SALOME_CORBA_EXCEPTION("Invalid UV", SALOME::BAD_PARAM);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mesh->SetNodeOnFace( node, FaceID, u, v );
|
mesh->SetNodeOnFace( node, FaceID, u, v );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user