mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-18 11:30:37 +05:00
0021140: EDF 1759 SMESH: Netgen1D2D fails on subshape
Fix work on edges computed with the Composed Segment discretizer
This commit is contained in:
parent
063408f854
commit
98119844c8
@ -91,6 +91,7 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace,
|
||||
{
|
||||
int nbEdges = theEdges.size();
|
||||
myEdge.resize( nbEdges );
|
||||
myEdgeID.resize( nbEdges );
|
||||
myC2d.resize( nbEdges );
|
||||
myC3dAdaptor.resize( nbEdges );
|
||||
myFirst.resize( nbEdges );
|
||||
@ -118,6 +119,7 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace,
|
||||
if ( myEdgeLength[i] < DBL_MIN ) nbDegen++;
|
||||
myLength += myEdgeLength[i];
|
||||
myEdge[i] = *edge;
|
||||
myEdgeID[i] = meshDS->ShapeToIndex( *edge );
|
||||
if ( !theIsForward ) myEdge[i].Reverse();
|
||||
|
||||
if ( theFace.IsNull() )
|
||||
@ -326,7 +328,11 @@ const vector<UVPtStruct>& StdMeshers_FaceSide::GetUVPtStruct(bool isXConst,
|
||||
uvPt.x = uvPt.y = uvPt.normParam = u_node->first;
|
||||
if ( isXConst ) uvPt.x = constValue;
|
||||
else uvPt.y = constValue;
|
||||
if ( myNormPar[ EdgeIndex ] < uvPt.normParam ) {
|
||||
const SMDS_EdgePosition* epos =
|
||||
dynamic_cast<const SMDS_EdgePosition*>(uvPt.node->GetPosition());
|
||||
if (( myNormPar[ EdgeIndex ] < uvPt.normParam ) ||
|
||||
( epos && uvPt.node->getshapeId() != myEdgeID[ EdgeIndex ])) // for myMissingVertexNodes
|
||||
{
|
||||
prevNormPar = myNormPar[ EdgeIndex ];
|
||||
++EdgeIndex;
|
||||
#ifdef _DEBUG_
|
||||
@ -340,8 +346,6 @@ const vector<UVPtStruct>& StdMeshers_FaceSide::GetUVPtStruct(bool isXConst,
|
||||
#endif
|
||||
paramSize = myNormPar[ EdgeIndex ] - prevNormPar;
|
||||
}
|
||||
const SMDS_EdgePosition* epos =
|
||||
dynamic_cast<const SMDS_EdgePosition*>(uvPt.node->GetPosition());
|
||||
if ( epos ) {
|
||||
uvPt.param = epos->GetUParameter();
|
||||
}
|
||||
@ -444,6 +448,7 @@ void StdMeshers_FaceSide::Reverse()
|
||||
}
|
||||
if ( nbEdges > 1 ) {
|
||||
reverse( myEdge );
|
||||
reverse( myEdgeID );
|
||||
reverse( myC2d );
|
||||
reverse( myC3dAdaptor );
|
||||
reverse( myFirst );
|
||||
|
@ -201,6 +201,7 @@ protected:
|
||||
// DON't FORGET tO update Reverse() when adding one more vector!
|
||||
std::vector<uvPtStruct> myPoints, myFalsePoints;
|
||||
std::vector<TopoDS_Edge> myEdge;
|
||||
std::vector<int> myEdgeID;
|
||||
std::vector<Handle(Geom2d_Curve)> myC2d;
|
||||
std::vector<GeomAdaptor_Curve> myC3dAdaptor;
|
||||
std::vector<double> myFirst, myLast;
|
||||
|
Loading…
Reference in New Issue
Block a user