From: vsr Date: Fri, 3 Jun 2011 10:10:25 +0000 (+0000) Subject: Merge from BR_Dev_For_6_3_1 03/06/2011 X-Git-Tag: V6_3_1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=42150ad36f1316afef94a6e7872304e11b23d360;p=plugins%2Fnetgenplugin.git Merge from BR_Dev_For_6_3_1 03/06/2011 --- diff --git a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx index 81ddea1..5494c94 100644 --- a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx @@ -368,6 +368,42 @@ void NETGENPlugin_Mesher::PrepareOCCgeometry(netgen::OCCGeometry& occgeo, occgeo.face_maxh_modified = 0; #endif + // { // set netgen::mparam.minh + +// TopLoc_Location loc; +// int i1, i2, i3; +// const int* pi[4] = { &i1, &i2, &i3, &i1 }; +// double maxh = 1e100; +// for ( int i = 0; i < occgeo.fmap.Extent(); ++i ) +// { +// Handle(Poly_Triangulation) triangulation = +// BRep_Tool::Triangulation ( TopoDS::Face( occgeo.fmap(i+1) ), loc); +// if ( triangulation.IsNull() ) continue; +// const TColgp_Array1OfPnt& points = triangulation->Nodes(); +// const Poly_Array1OfTriangle& trias = triangulation->Triangles(); +// for ( int iT = trias.Lower(); iT <= trias.Upper(); ++iT ) +// { +// trias(iT).Get( i1, i2, i3 ); +// for ( int j = 0; j < 3; ++j ) +// { +// double dist2 = points(*pi[j]).SquareDistance( points( *pi[j+1] )); +// if ( dist2 < maxh ) +// maxh = dist2; +// } +// } +// } +// maxh = sqrt( maxh ); +// if ( maxh > 0.5 * occgeo.boundingbox.Diam() ) // no or too rough triangulation +// { +// netgen::mparam.minh = occgeo.boundingbox.Diam()*1e-24; +// cout << "DEFAULT mparams.minh = " <