Salome HOME
22525: EDF 2863 SMESH : problem between BLSurf with viscous layer and projection
authoreap <eap@opencascade.com>
Fri, 21 Mar 2014 12:27:14 +0000 (16:27 +0400)
committereap <eap@opencascade.com>
Fri, 21 Mar 2014 12:27:14 +0000 (16:27 +0400)
  Always check zero UV

src/SMESH/SMESH_MesherHelper.cxx
src/SMESHUtils/SMESH_File.cxx

index ded66ca31447cd9704fe13988619cc7a2f69c033..6a97d47246cc5928909c9a7037536ebf849d245b 100644 (file)
@@ -478,7 +478,10 @@ bool SMESH_MesherHelper::toCheckPosOnShape(int shapeID ) const
 
 void SMESH_MesherHelper::setPosOnShapeValidity(int shapeID, bool ok ) const
 {
 
 void SMESH_MesherHelper::setPosOnShapeValidity(int shapeID, bool ok ) const
 {
-  ((SMESH_MesherHelper*)this)->myNodePosShapesValidity.insert( make_pair( shapeID, ok));
+  std::map< int,bool >::iterator sh_ok = 
+    ((SMESH_MesherHelper*)this)->myNodePosShapesValidity.insert( make_pair( shapeID, ok)).first;
+  if ( !ok )
+    sh_ok->second = ok;
 }
 
 //=======================================================================
 }
 
 //=======================================================================
@@ -661,9 +664,10 @@ bool SMESH_MesherHelper::CheckNodeUV(const TopoDS_Face&   F,
                                      const bool           force,
                                      double               distXYZ[4]) const
 {
                                      const bool           force,
                                      double               distXYZ[4]) const
 {
-  int shapeID = n->getshapeId();
+  int  shapeID = n->getshapeId();
   bool infinit = ( Precision::IsInfinite( uv.X() ) || Precision::IsInfinite( uv.Y() ));
   bool infinit = ( Precision::IsInfinite( uv.X() ) || Precision::IsInfinite( uv.Y() ));
-  if ( force || toCheckPosOnShape( shapeID ) || infinit )
+  bool zero    = ( uv.X() == 0. && uv.Y() == 0. );
+  if ( force || toCheckPosOnShape( shapeID ) || infinit || zero )
   {
     // check that uv is correct
     TopLoc_Location loc;
   {
     // check that uv is correct
     TopLoc_Location loc;
@@ -898,7 +902,8 @@ bool SMESH_MesherHelper::CheckNodeU(const TopoDS_Edge&   E,
 {
   int  shapeID = n->getshapeId();
   bool infinit = Precision::IsInfinite( u );
 {
   int  shapeID = n->getshapeId();
   bool infinit = Precision::IsInfinite( u );
-  if ( force || toCheckPosOnShape( shapeID ) || infinit )
+  bool zero    = ( u == 0. );
+  if ( force || toCheckPosOnShape( shapeID ) || infinit || zero )
   {
     TopLoc_Location loc; double f,l;
     Handle(Geom_Curve) curve = BRep_Tool::Curve( E,loc,f,l );
   {
     TopLoc_Location loc; double f,l;
     Handle(Geom_Curve) curve = BRep_Tool::Curve( E,loc,f,l );
index ae5f9bb111868ced9102a16a34266df3b9bdf133..c31c2e8bc1e90cc2e9e5a26240907a4b6a826b97 100644 (file)
@@ -21,8 +21,8 @@
 // Created   : Wed Mar 10 11:23:25 2010
 // Author    : Edward AGAPOV (eap)
 //
 // Created   : Wed Mar 10 11:23:25 2010
 // Author    : Edward AGAPOV (eap)
 //
+
 #include "SMESH_File.hxx"
 #include "SMESH_File.hxx"
-#include "utilities.h"
 
 #include <fcntl.h>
 #include <sys/stat.h>
 
 #include <fcntl.h>
 #include <sys/stat.h>