Fix "restrict size of elements near the segment"
This commit is contained in:
parent
4a477bf85f
commit
64caccef0d
@ -1668,12 +1668,11 @@ NETGENPlugin_Mesher::AddSegmentsToMesh(netgen::Mesh& ngMesh,
|
|||||||
int iPrev = SMESH_MesherHelper::WrapIndex( i-1, nbSegments );
|
int iPrev = SMESH_MesherHelper::WrapIndex( i-1, nbSegments );
|
||||||
int iNext = SMESH_MesherHelper::WrapIndex( i+1, nbSegments );
|
int iNext = SMESH_MesherHelper::WrapIndex( i+1, nbSegments );
|
||||||
double sunH = segLen[ iPrev ] + segLen[ i ] + segLen[ iNext ];
|
double sunH = segLen[ iPrev ] + segLen[ i ] + segLen[ iNext ];
|
||||||
int nbSeg = ( segLen[ iPrev ] > sunH / 100. +
|
int nbSeg = ( int( segLen[ iPrev ] > sunH / 100.) +
|
||||||
segLen[ i ] > sunH / 100. +
|
int( segLen[ i ] > sunH / 100.) +
|
||||||
segLen[ iNext ] > sunH / 100.);
|
int( segLen[ iNext ] > sunH / 100.));
|
||||||
double avgH = sunH / nbSeg;
|
if ( nbSeg > 0 )
|
||||||
|
RestrictLocalSize( ngMesh, 0.5*(np1+np2), sunH / nbSeg );
|
||||||
RestrictLocalSize( ngMesh, 0.5*(np1+np2), avgH );
|
|
||||||
}
|
}
|
||||||
if ( isInternalWire )
|
if ( isInternalWire )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user