- // TopExp_Explorer fExp( aShape, TopAbs_FACE );
- // for ( int iF = 0; fExp.More(); fExp.Next(), ++iF )
- // {
- // TopoDS_Face F = TopoDS::Face( fExp.Current() /*.Oriented( TopAbs_FORWARD )*/);
- // int faceID = meshDS->ShapeToIndex( F );
- // SMESH_ComputeErrorPtr& faceErr = aMesh.GetSubMesh( F )->GetComputeError();
-
- // aParams._quadraticMesh = helper.IsQuadraticSubMesh( F );
- // const bool ignoreMediumNodes = aParams._quadraticMesh;
-
- // // build viscous layers if required
- // if ( F.Orientation() != TopAbs_FORWARD &&
- // F.Orientation() != TopAbs_REVERSED )
- // F.Orientation( TopAbs_FORWARD ); // avoid pb with TopAbs_INTERNAL
- // SMESH_ProxyMesh::Ptr proxyMesh = StdMeshers_ViscousLayers2D::Compute( aMesh, F );
- // if ( !proxyMesh )
- // continue;
-
- // // ------------------------
- // // get all EDGEs of a FACE
- // // ------------------------
- // TSideVector wires =
- // StdMeshers_FaceSide::GetFaceWires( F, aMesh, ignoreMediumNodes, faceErr, &helper, proxyMesh );
- // if ( faceErr && !faceErr->IsOK() )
- // continue;
- // size_t nbWires = wires.size();
- // if ( nbWires == 0 )
- // {
- // faceErr.reset
- // ( new SMESH_ComputeError
- // ( COMPERR_ALGO_FAILED, "Problem in StdMeshers_FaceSide::GetFaceWires()" ));
- // continue;
- // }
- // if ( wires[0]->NbSegments() < 3 ) // ex: a circle with 2 segments
- // {
- // faceErr.reset
- // ( new SMESH_ComputeError
- // ( COMPERR_BAD_INPUT_MESH, SMESH_Comment("Too few segments: ")<<wires[0]->NbSegments()) );
- // continue;
- // }
-
- // // ----------------------
- // // compute maxh of a FACE
- // // ----------------------
-
- // if ( !aParams.has_netgen_param )
- // {
- // double edgeLength = 0;
- // if (aParams.has_LengthFromEdges_hyp )
- // {
- // // compute edgeLength as an average segment length
- // smIdType nbSegments = 0;
- // for ( size_t iW = 0; iW < nbWires; ++iW )
- // {
- // edgeLength += wires[ iW ]->Length();
- // nbSegments += wires[ iW ]->NbSegments();
- // }
- // if ( nbSegments )
- // edgeLength /= double( nbSegments );
- // netgen::mparam.maxh = edgeLength;
- // }
- // else if ( isDefaultHyp )
- // {
- // // set edgeLength by a longest segment
- // double maxSeg2 = 0;
- // for ( size_t iW = 0; iW < nbWires; ++iW )
- // {
- // const UVPtStructVec& points = wires[ iW ]->GetUVPtStruct();
- // if ( points.empty() )
- // return error( COMPERR_BAD_INPUT_MESH );
- // gp_Pnt pPrev = SMESH_TNodeXYZ( points[0].node );
- // for ( size_t i = 1; i < points.size(); ++i )
- // {
- // gp_Pnt p = SMESH_TNodeXYZ( points[i].node );
- // maxSeg2 = Max( maxSeg2, p.SquareDistance( pPrev ));
- // pPrev = p;
- // }
- // }
- // edgeLength = sqrt( maxSeg2 ) * 1.05;
- // netgen::mparam.maxh = edgeLength;
- // }
- // if ( netgen::mparam.maxh < DBL_MIN )
- // netgen::mparam.maxh = occgeoComm.GetBoundingBox().Diam();
-
- // if ( !isCommonLocalSize )
- // {
- // netgen::mparam.minh = aMesher.GetDefaultMinSize( F, netgen::mparam.maxh );
- // }
- // }
-
-
-