From f12c83a835a9e4667ca0b0fbaa0199e12cde437f Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 31 May 2011 14:53:31 +0000 Subject: [PATCH] 0021140: EDF 1759 SMESH: Netgen1D2D fails on subshape fix regression with seam edges --- src/NETGENPlugin/NETGENPlugin_Mesher.cxx | 149 ++++++++++++++++------- 1 file changed, 102 insertions(+), 47 deletions(-) diff --git a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx index 22186c4..fe60e38 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 = " <