mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-31 15:00:33 +05:00
0020951: EDF 1501 SMESH: Conversion linear/quadratic with medium nodes on geometry fails with GHS3D
* Fix GetNodeUV() for a node on seam edge: enable projection of node in face * Fix GetMediumNode(): set a node in volume #1 as well * Fix QFace::GetLinkChain(), case of triangles
This commit is contained in:
parent
a8864480d4
commit
52be03b564
@ -380,7 +380,7 @@ gp_XY SMESH_MesherHelper::GetNodeUV(const TopoDS_Face& F,
|
|||||||
// for a node on a seam edge select one of UVs on 2 pcurves
|
// for a node on a seam edge select one of UVs on 2 pcurves
|
||||||
if ( n2 && IsSeamShape( edgeID ) )
|
if ( n2 && IsSeamShape( edgeID ) )
|
||||||
{
|
{
|
||||||
uv = GetUVOnSeam( uv, GetNodeUV( F, n2, 0 ));
|
uv = GetUVOnSeam( uv, GetNodeUV( F, n2, 0, check ));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // adjust uv to period
|
{ // adjust uv to period
|
||||||
@ -843,7 +843,7 @@ const SMDS_MeshNode* SMESH_MesherHelper::GetMediumNode(const SMDS_MeshNode* n1,
|
|||||||
CheckNodeU( E, n12, U, BRep_Tool::Tolerance( E ), /*force=*/true);
|
CheckNodeU( E, n12, U, BRep_Tool::Tolerance( E ), /*force=*/true);
|
||||||
meshDS->SetNodeOnEdge(n12, edgeID, U);
|
meshDS->SetNodeOnEdge(n12, edgeID, U);
|
||||||
}
|
}
|
||||||
else if ( myShapeID > 1 )
|
else if ( myShapeID > 0 )
|
||||||
{
|
{
|
||||||
meshDS->SetNodeInVolume(n12, myShapeID);
|
meshDS->SetNodeInVolume(n12, myShapeID);
|
||||||
}
|
}
|
||||||
@ -1616,7 +1616,7 @@ namespace { // Structures used by FixQuadraticElements()
|
|||||||
}
|
}
|
||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief Make up chain of links
|
* \brief Make up a chain of links
|
||||||
* \param iSide - link to add first
|
* \param iSide - link to add first
|
||||||
* \param chain - chain to fill in
|
* \param chain - chain to fill in
|
||||||
* \param pos - postion of medium nodes the links should have
|
* \param pos - postion of medium nodes the links should have
|
||||||
@ -1636,18 +1636,26 @@ namespace { // Structures used by FixQuadraticElements()
|
|||||||
if ( _sides.size() != 4 ) { // triangle - visit all my continous faces
|
if ( _sides.size() != 4 ) { // triangle - visit all my continous faces
|
||||||
MSGBEG( *this );
|
MSGBEG( *this );
|
||||||
list< const QFace* > faces( 1, this );
|
list< const QFace* > faces( 1, this );
|
||||||
for (list< const QFace* >::iterator fIt = faces.begin(); fIt != faces.end(); ++fIt ) {
|
while ( !faces.empty() ) {
|
||||||
const QFace* face = *fIt;
|
const QFace* face = faces.front();
|
||||||
for ( int i = 0; i < face->_sides.size(); ++i ) {
|
for ( int i = 0; i < face->_sides.size(); ++i ) {
|
||||||
if ( !face->_sideIsAdded[i] && face->_sides[i] ) {
|
if ( !face->_sideIsAdded[i] && face->_sides[i] ) {
|
||||||
face->_sideIsAdded[i] = true;
|
face->_sideIsAdded[i] = true;
|
||||||
TChain::iterator chLink = chain.insert( chain.begin(), TChainLink(face->_sides[i]));
|
// find a face side in the chain
|
||||||
|
TChain::iterator chLink = chain.begin();
|
||||||
|
for ( ; chLink != chain.end(); ++chLink )
|
||||||
|
if ( chLink->_qlink == face->_sides[i] )
|
||||||
|
break;
|
||||||
|
if ( chLink == chain.end() )
|
||||||
|
chLink = chain.insert( chain.begin(), TChainLink(face->_sides[i]));
|
||||||
|
// add a face to a chained link and put a continues face in the queue
|
||||||
chLink->SetFace( face );
|
chLink->SetFace( face );
|
||||||
if ( face->_sides[i]->MediumPos() >= pos )
|
if ( face->_sides[i]->MediumPos() >= pos )
|
||||||
if ( const QFace* contFace = face->_sides[i]->GetContinuesFace( face ))
|
if ( const QFace* contFace = face->_sides[i]->GetContinuesFace( face ))
|
||||||
faces.push_back( contFace );
|
faces.push_back( contFace );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
faces.pop_front();
|
||||||
}
|
}
|
||||||
if ( error < ERR_TRI )
|
if ( error < ERR_TRI )
|
||||||
error = ERR_TRI;
|
error = ERR_TRI;
|
||||||
|
Loading…
Reference in New Issue
Block a user