NPAL18025: Regression between 3.2.6 and 3.2.9rc1 about SMESH display

This commit is contained in:
jfa 2007-11-28 14:54:08 +00:00
parent 8b495b9b50
commit 4125a96db1

View File

@ -662,13 +662,14 @@ bool StdMeshers_Regular_1D::computeInternalParameters(Adaptor3d_Curve& theC3d,
GCPnts_AbscissaPoint Discret( theC3d, eltSize, param ); GCPnts_AbscissaPoint Discret( theC3d, eltSize, param );
if ( !Discret.IsDone() ) break; if ( !Discret.IsDone() ) break;
param = Discret.Parameter(); param = Discret.Parameter();
if ( param > f && param < l ) if ( f < param && param < l )
theParams.push_back( param ); theParams.push_back( param );
else else
break; break;
eltSize *= q; eltSize *= q;
} }
compensateError( a1, an, U1, Un, theLength, theC3d, theParams ); compensateError( a1, an, U1, Un, theLength, theC3d, theParams );
if (theReverse) theParams.reverse(); // NPAL18025
return true; return true;
} }
@ -703,6 +704,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(Adaptor3d_Curve& theC3d,
eltSize += q; eltSize += q;
} }
compensateError( a1, an, U1, Un, theLength, theC3d, theParams ); compensateError( a1, an, U1, Un, theLength, theC3d, theParams );
if (theReverse) theParams.reverse(); // NPAL18025
return true; return true;
} }
@ -720,7 +722,6 @@ bool StdMeshers_Regular_1D::computeInternalParameters(Adaptor3d_Curve& theC3d,
theParams.push_back( param ); theParams.push_back( param );
} }
return true; return true;
} }
default:; default:;
@ -779,11 +780,16 @@ bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aSh
const SMDS_MeshNode * idPrev = idFirst; const SMDS_MeshNode * idPrev = idFirst;
double parPrev = f; double parPrev = f;
double parLast = l; double parLast = l;
/* NPAL18025
if (reversed) { if (reversed) {
idPrev = idLast; idPrev = idLast;
idLast = idFirst;
idFirst = idPrev;
parPrev = l; parPrev = l;
parLast = f; parLast = f;
} }
*/
for (list<double>::iterator itU = params.begin(); itU != params.end(); itU++) { for (list<double>::iterator itU = params.begin(); itU != params.end(); itU++) {
double param = *itU; double param = *itU;
@ -819,15 +825,9 @@ bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aSh
meshDS->SetMeshElementOnShape(edge, shapeID); meshDS->SetMeshElementOnShape(edge, shapeID);
} }
else { else {
if(!reversed) {
SMDS_MeshEdge* edge = meshDS->AddEdge(idPrev, idLast); SMDS_MeshEdge* edge = meshDS->AddEdge(idPrev, idLast);
meshDS->SetMeshElementOnShape(edge, shapeID); meshDS->SetMeshElementOnShape(edge, shapeID);
} }
else {
SMDS_MeshEdge* edge = meshDS->AddEdge(idPrev, idFirst);
meshDS->SetMeshElementOnShape(edge, shapeID);
}
}
} }
else else
{ {