mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-25 17:00:34 +05:00
in GetNodeParamOnEdge(), take into account that nodes on vertices not
always present, e.g. when Composite side discretisation is used
This commit is contained in:
parent
91d01b7efe
commit
24f41d7b2b
@ -335,16 +335,18 @@ bool SMESH_Algo::GetNodeParamOnEdge(const SMESHDS_Mesh* theMesh,
|
|||||||
return false;
|
return false;
|
||||||
const SMDS_EdgePosition* epos =
|
const SMDS_EdgePosition* epos =
|
||||||
static_cast<const SMDS_EdgePosition*>(node->GetPosition().get());
|
static_cast<const SMDS_EdgePosition*>(node->GetPosition().get());
|
||||||
paramSet.insert( epos->GetUParameter() );
|
if ( !paramSet.insert( epos->GetUParameter() ).second )
|
||||||
++nbEdgeNodes;
|
return false; // equal parameters
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// add vertex nodes params
|
// add vertex nodes params
|
||||||
Standard_Real f, l;
|
TopoDS_Vertex V1,V2;
|
||||||
BRep_Tool::Range(theEdge, f, l);
|
TopExp::Vertices( theEdge, V1, V2);
|
||||||
paramSet.insert( f );
|
if ( VertexNode( V1, theMesh ) &&
|
||||||
paramSet.insert( l );
|
!paramSet.insert( BRep_Tool::Parameter(V1,theEdge) ).second )
|
||||||
if ( paramSet.size() != nbEdgeNodes + 2 )
|
return false; // there are equal parameters
|
||||||
|
if ( VertexNode( V2, theMesh ) &&
|
||||||
|
!paramSet.insert( BRep_Tool::Parameter(V2,theEdge) ).second )
|
||||||
return false; // there are equal parameters
|
return false; // there are equal parameters
|
||||||
|
|
||||||
// fill the vector
|
// fill the vector
|
||||||
@ -488,7 +490,7 @@ GeomAbs_Shape SMESH_Algo::Continuity(const TopoDS_Edge & E1,
|
|||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
const SMDS_MeshNode* SMESH_Algo::VertexNode(const TopoDS_Vertex& V,
|
const SMDS_MeshNode* SMESH_Algo::VertexNode(const TopoDS_Vertex& V,
|
||||||
SMESHDS_Mesh* meshDS)
|
const SMESHDS_Mesh* meshDS)
|
||||||
{
|
{
|
||||||
if ( SMESHDS_SubMesh* sm = meshDS->MeshElements(V) ) {
|
if ( SMESHDS_SubMesh* sm = meshDS->MeshElements(V) ) {
|
||||||
SMDS_NodeIteratorPtr nIt= sm->GetNodes();
|
SMDS_NodeIteratorPtr nIt= sm->GetNodes();
|
||||||
|
Loading…
Reference in New Issue
Block a user