From: eap Date: Thu, 15 Nov 2012 15:10:30 +0000 (+0000) Subject: 0021543: EDF 1978 SMESH: Viscous layer for 2D meshes (validation.hdf) X-Git-Tag: V6_6_0rc1~42 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a918ba2cf9ed92cc178d2855566b025be8ce20f6;p=modules%2Fsmesh.git 0021543: EDF 1978 SMESH: Viscous layer for 2D meshes (validation.hdf) Fix orientation of normals on a REVERSED FACE --- diff --git a/src/StdMeshers/StdMeshers_ViscousLayers2D.cxx b/src/StdMeshers/StdMeshers_ViscousLayers2D.cxx index a8da5a014..884c41a80 100644 --- a/src/StdMeshers/StdMeshers_ViscousLayers2D.cxx +++ b/src/StdMeshers/StdMeshers_ViscousLayers2D.cxx @@ -497,7 +497,8 @@ _ViscousBuilder2D::_ViscousBuilder2D(SMESH_Mesh& theMesh, _helper.SetSubShape( _face ); _helper.SetElementsOnShape(true); - _surface = BRep_Tool::Surface( theFace ); + //_face.Orientation( TopAbs_FORWARD ); + _surface = BRep_Tool::Surface( _face ); if ( _hyp ) _fPowN = pow( _hyp->GetStretchFactor(), _hyp->GetNumberLayers() ); @@ -684,7 +685,8 @@ bool _ViscousBuilder2D::makePolyLines() // in order not to miss collisions Handle(Geom2d_Curve) pcurve = L._wire->Curve2d( L._edgeInd ); - const bool reverse = ( L._wire->Edge( iE ).Orientation() == TopAbs_REVERSED ); + const bool reverse = (( L._wire->Edge( iE ).Orientation() == TopAbs_REVERSED ) ^ + (_face.Orientation() == TopAbs_REVERSED )); for ( int i = L._firstPntInd; i <= L._lastPntInd; ++i ) { _LayerEdge& lEdge = L._lEdges[ i - L._firstPntInd ];