+SMESH_ComputeErrorPtr
+StdMeshers_ViscousLayers2D::CheckHypothesis(SMESH_Mesh& theMesh,
+ const TopoDS_Shape& theShape,
+ SMESH_Hypothesis::Hypothesis_Status& theStatus)
+{
+ SMESH_ComputeErrorPtr error = SMESH_ComputeError::New(COMPERR_OK);
+ theStatus = SMESH_Hypothesis::HYP_OK;
+
+ TopExp_Explorer exp( theShape, TopAbs_FACE );
+ for ( ; exp.More() && theStatus == SMESH_Hypothesis::HYP_OK; exp.Next() )
+ {
+ const TopoDS_Face& face = TopoDS::Face( exp.Current() );
+ vector< const StdMeshers_ViscousLayers2D* > hyps;
+ vector< TopoDS_Shape > hypShapes;
+ if ( VISCOUS_2D::findHyps( theMesh, face, hyps, hypShapes ))
+ {
+ VISCOUS_2D::_ViscousBuilder2D builder( theMesh, face, hyps, hypShapes );
+ builder._faceSideVec =
+ StdMeshers_FaceSide::GetFaceWires( face, theMesh, true, error,
+ SMESH_ProxyMesh::Ptr(),
+ /*theCheckVertexNodes=*/false);
+ if ( error->IsOK() && !builder.findEdgesWithLayers())
+ {
+ error = builder.GetError();
+ if ( error && !error->IsOK() )
+ theStatus = SMESH_Hypothesis::HYP_INCOMPAT_HYPS;
+ }
+ }
+ }
+ return error;
+}
+// --------------------------------------------------------------------------------