0022104: EDF 2550 SMESH: 2D viscous layer, allow specifying edges with viscous layer

In addition to implementing IMP, avoid "limiting" _thickness to zero:

-    _thickness = Min( _hyp->GetTotalThickness(), maxPossibleThick );
+    if ( maxPossibleThick > 0. )
+      _thickness = Min( _hyp->GetTotalThickness(), maxPossibleThick );
This commit is contained in:
eap 2013-05-30 14:15:57 +00:00
parent 4a87093dce
commit cb2ff0ef70

View File

@ -522,7 +522,6 @@ bool _ViscousBuilder2D::error(const string& text )
_error->myAlgo = smError->myAlgo; _error->myAlgo = smError->myAlgo;
smError = _error; smError = _error;
} }
//makeGroupOfLE(); // debug
return false; return false;
} }
@ -573,7 +572,9 @@ bool _ViscousBuilder2D::findEdgesWithLayers()
{ {
// collect all EDGEs to ignore defined by hyp // collect all EDGEs to ignore defined by hyp
int nbMyEdgesIgnored = 0; int nbMyEdgesIgnored = 0;
vector<TGeomID> ids = _hyp->GetBndShapesToIgnore(); vector<TGeomID> ids = _hyp->GetBndShapes();
if ( _hyp->IsToIgnoreShapes() ) // EDGEs to ignore are given
{
for ( size_t i = 0; i < ids.size(); ++i ) for ( size_t i = 0; i < ids.size(); ++i )
{ {
const TopoDS_Shape& s = getMeshDS()->IndexToShape( ids[i] ); const TopoDS_Shape& s = getMeshDS()->IndexToShape( ids[i] );
@ -582,6 +583,20 @@ bool _ViscousBuilder2D::findEdgesWithLayers()
nbMyEdgesIgnored += ( _helper.IsSubShape( s, _face )); nbMyEdgesIgnored += ( _helper.IsSubShape( s, _face ));
} }
} }
}
else // EDGEs to to make the Viscous Layers on are given
{
for ( size_t iWire = 0; iWire < _faceSideVec.size(); ++iWire )
{
StdMeshers_FaceSidePtr wire = _faceSideVec[ iWire ];
for ( int iE = 0; iE < wire->NbEdges(); ++iE )
_ignoreShapeIds.insert( wire->EdgeID( iE ));
}
for ( size_t i = 0; i < ids.size(); ++i )
_ignoreShapeIds.erase( ids[i] );
nbMyEdgesIgnored = _ignoreShapeIds.size();
}
// check all EDGEs of the _face // check all EDGEs of the _face
int totalNbEdges = 0; int totalNbEdges = 0;
@ -613,7 +628,7 @@ bool _ViscousBuilder2D::findEdgesWithLayers()
set<TGeomID> neighbourIgnoreEdges; set<TGeomID> neighbourIgnoreEdges;
if (viscHyp) { if (viscHyp) {
vector<TGeomID> ids = _hyp->GetBndShapesToIgnore(); vector<TGeomID> ids = _hyp->GetBndShapes();
neighbourIgnoreEdges.insert( ids.begin(), ids.end() ); neighbourIgnoreEdges.insert( ids.begin(), ids.end() );
} }
for ( int iV = 0; iV < 2; ++iV ) for ( int iV = 0; iV < 2; ++iV )
@ -773,6 +788,7 @@ bool _ViscousBuilder2D::makePolyLines()
} }
} }
} }
if ( maxPossibleThick > 0. )
_thickness = Min( _hyp->GetTotalThickness(), maxPossibleThick ); _thickness = Min( _hyp->GetTotalThickness(), maxPossibleThick );
} }