From: maintenance team Date: Wed, 26 Nov 2008 08:09:05 +0000 (+0000) Subject: Update of patch for netge-4.5 X-Git-Tag: V4_1_4~16 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=486c9c314d85a8d88c6993e145d1ccf82dd57569;p=tools%2Finstall.git Update of patch for netge-4.5 --- diff --git a/config_files/patches/netgen-4.5-for-SALOME.patch b/config_files/patches/netgen-4.5-for-SALOME.patch index a7cf4c1..fac1fc0 100755 --- a/config_files/patches/netgen-4.5-for-SALOME.patch +++ b/config_files/patches/netgen-4.5-for-SALOME.patch @@ -875,140 +875,6 @@ diff -Naur netgen-4.5.old/libsrc/occ/occmeshsurf.cpp netgen-4.5.new/libsrc/occ/o namespace netgen -@@ -40,6 +42,7 @@ - */ - - -+ n=0; - - GeomLProp_SLProps lprop(occface,geominfo.u,geominfo.v,1,1e-5); - double setu=geominfo.u,setv=geominfo.v; -@@ -49,57 +52,78 @@ - double ustep = 0.01*(umax-umin); - double vstep = 0.01*(vmax-vmin); - -- n=0; -- -- while(setu < umax && (lprop.D1U().Magnitude() < 1e-5 || lprop.D1V().Magnitude() < 1e-5)) -- setu += ustep; -- if(setu < umax) -- { -- lprop.SetParameters(setu,setv); -- n(0)+=lprop.Normal().X(); -- n(1)+=lprop.Normal().Y(); -- n(2)+=lprop.Normal().Z(); -- } -- setu = geominfo.u; -- while(setu > umin && (lprop.D1U().Magnitude() < 1e-5 || lprop.D1V().Magnitude() < 1e-5)) -- setu -= ustep; -- if(setu > umin) -- { -- lprop.SetParameters(setu,setv); -- n(0)+=lprop.Normal().X(); -- n(1)+=lprop.Normal().Y(); -- n(2)+=lprop.Normal().Z(); -- } -- setu = geominfo.u; -- -- while(setv < vmax && (lprop.D1U().Magnitude() < 1e-5 || lprop.D1V().Magnitude() < 1e-5)) -- setv += ustep; -- if(setv < vmax) -- { -- lprop.SetParameters(setu,setv); -- n(0)+=lprop.Normal().X(); -- n(1)+=lprop.Normal().Y(); -- n(2)+=lprop.Normal().Z(); -- } -- setv = geominfo.v; -- while(setv > vmin && (lprop.D1U().Magnitude() < 1e-5 || lprop.D1V().Magnitude() < 1e-5)) -- setv -= ustep; -- if(setv > vmin) -- { -- lprop.SetParameters(setu,setv); -- n(0)+=lprop.Normal().X(); -- n(1)+=lprop.Normal().Y(); -- n(2)+=lprop.Normal().Z(); -- } -- setv = geominfo.v; -- -+ if ( lprop.D1V().Magnitude() < 1e-5 ) -+ { -+ while(setu < umax && (lprop.D1V().Magnitude() < 1e-5 || !lprop.IsNormalDefined())) { -+ setu += ustep; -+ if(setu < umax) -+ lprop.SetParameters(setu,setv); -+ } -+ if (lprop.D1V().Magnitude() < 1e-5 || !lprop.IsNormalDefined()) { -+ setu = geominfo.u; -+ while(setu > umin && (lprop.D1V().Magnitude() < 1e-5 || !lprop.IsNormalDefined())) { -+ setu -= ustep; -+ if(setu > umin) -+ lprop.SetParameters(setu,setv); -+ } -+ } -+ ustep = 0; -+ vstep = 0.1*(vmax-vmin); -+ setv = vmin; -+ } -+ else -+ { -+ while(setv < vmax && (lprop.D1U().Magnitude() < 1e-5 || !lprop.IsNormalDefined())) { -+ setv += vstep; -+ if(setv < vmax) -+ lprop.SetParameters(setu,setv); -+ } -+ if (lprop.D1U().Magnitude() < 1e-5 || !lprop.IsNormalDefined()) { -+ setv = geominfo.v; -+ while(setv > vmin && (lprop.D1U().Magnitude() < 1e-5 || !lprop.IsNormalDefined())) { -+ setv -= vstep; -+ if(setv > vmin) -+ lprop.SetParameters(setu,setv); -+ } -+ } -+ vstep = 0; -+ ustep = 0.1*(umax-umin); -+ setu = umin; -+ } -+ -+ if ( !lprop.IsNormalDefined() ) -+ return; -+ gp_Vec N1 = lprop.Normal(); -+ -+ const double angleTol = PI / 180.; -+ while(setu < umax && setv < vmax) { -+ lprop.SetParameters(setu,setv); -+ if ( lprop.IsNormalDefined() ) { -+ gp_Vec Ni = lprop.Normal(); -+ double angle = N1.Angle(Ni); -+ if ( angle > angleTol ) { -+ //cout << "Too large angle: " << angle * 180. / PI << endl; -+ return; -+ } -+ n(0)+=Ni.X(); -+ n(1)+=Ni.Y(); -+ n(2)+=Ni.Z(); -+ setu += ustep; -+ setv += vstep; -+ } -+ } - n.Normalize(); -+// (*testout) << "u " << geominfo.u << " v " << geominfo.v -+// <<" p " << lprop.Value().X()<<" "<