mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-31 20:40:37 +05:00
Regression of 3D_mesh_NETGEN/C7
In _QuadFaceGrid::AddContinuousFace(), orient new children equally
This commit is contained in:
parent
58311e9176
commit
851ba377cb
@ -58,17 +58,15 @@
|
|||||||
|
|
||||||
|
|
||||||
#ifdef _DEBUG_
|
#ifdef _DEBUG_
|
||||||
|
// #define DEB_FACES
|
||||||
|
// #define DEB_GRID
|
||||||
|
// #define DUMP_VERT(msg,V) \
|
||||||
|
// { TopoDS_Vertex v = V; gp_Pnt p = BRep_Tool::Pnt(v); \
|
||||||
|
// cout << msg << "( "<< p.X()<<", "<<p.Y()<<", "<<p.Z()<<" )"<<endl;}
|
||||||
|
#endif
|
||||||
|
|
||||||
//#define DEB_FACES
|
#ifndef DUMP_VERT
|
||||||
//#define DEB_GRID
|
|
||||||
#define DUMP_VERT(msg,V) \
|
|
||||||
// { TopoDS_Vertex v = V; gp_Pnt p = BRep_Tool::Pnt(v);\
|
|
||||||
// cout << msg << "( "<< p.X()<<", "<<p.Y()<<", "<<p.Z()<<" )"<<endl;}
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#define DUMP_VERT(msg,v)
|
#define DUMP_VERT(msg,v)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
@ -715,7 +713,7 @@ bool _QuadFaceGrid::AddContinuousFace( const _QuadFaceGrid& other )
|
|||||||
const _FaceSide& otherSide = other.GetSide( i );
|
const _FaceSide& otherSide = other.GetSide( i );
|
||||||
int iMyCommon;
|
int iMyCommon;
|
||||||
if ( mySides.Contain( otherSide, &iMyCommon ) ) {
|
if ( mySides.Contain( otherSide, &iMyCommon ) ) {
|
||||||
// check if normals of two faces are collinear at all vertices of a otherSide
|
// check if normals of two faces are collinear at all vertices of an otherSide
|
||||||
const double angleTol = M_PI / 180. / 2.;
|
const double angleTol = M_PI / 180. / 2.;
|
||||||
int iV, nbV = otherSide.NbVertices(), nbCollinear = 0;
|
int iV, nbV = otherSide.NbVertices(), nbCollinear = 0;
|
||||||
for ( iV = 0; iV < nbV; ++iV )
|
for ( iV = 0; iV < nbV; ++iV )
|
||||||
@ -740,15 +738,20 @@ bool _QuadFaceGrid::AddContinuousFace( const _QuadFaceGrid& other )
|
|||||||
myChildren.push_back( *this );
|
myChildren.push_back( *this );
|
||||||
myFace.Nullify();
|
myFace.Nullify();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// orient new children equally
|
||||||
|
int otherBottomIndex = ( 4 + i - iMyCommon + 2 ) % 4;
|
||||||
if ( other.IsComplex() )
|
if ( other.IsComplex() )
|
||||||
for ( TChildIterator children = other.GetChildren(); children.more(); )
|
for ( TChildIterator children = other.GetChildren(); children.more(); ) {
|
||||||
myChildren.push_back( children.next() );
|
myChildren.push_back( children.next() );
|
||||||
else
|
myChildren.back().SetBottomSide( myChildren.back().GetSide( otherBottomIndex ));
|
||||||
|
}
|
||||||
|
else {
|
||||||
myChildren.push_back( other );
|
myChildren.push_back( other );
|
||||||
|
myChildren.back().SetBottomSide( myChildren.back().GetSide( otherBottomIndex ));
|
||||||
|
}
|
||||||
|
|
||||||
myLeftBottomChild = 0;
|
myLeftBottomChild = 0;
|
||||||
//int otherBottomIndex = ( 4 + i - iMyCommon + 2 ) % 4;
|
|
||||||
//myChildren.back().SetBottomSide( other.GetSide( otherBottomIndex ));
|
|
||||||
|
|
||||||
// collect vertices in mySides
|
// collect vertices in mySides
|
||||||
if ( other.IsComplex() )
|
if ( other.IsComplex() )
|
||||||
|
Loading…
Reference in New Issue
Block a user