Salome HOME
IMP23369: [CEA 1513] compute a mesh using an already existing mesh with MG-CADSurf
[modules/smesh.git] / src / StdMeshers / StdMeshers_ViscousLayers.cxx
index 393e2799c01714de60e0edae02ef2ab991cb1bb0..1a117aff222f58264a7e1d2ff30eb78281070213 100644 (file)
@@ -95,7 +95,7 @@
 #include <string>
 
 #ifdef _DEBUG_
-//#define __myDEBUG
+#define __myDEBUG
 //#define __NOT_INVALIDATE_BAD_SMOOTH
 //#define __NODES_AT_POS
 #endif
@@ -7546,7 +7546,7 @@ bool _LayerEdge::SegTriaInter( const gp_Ax1& lastSegment,
   const gp_Dir& dir  = lastSegment.Direction();
 
   /* calculate distance from vert0 to ray origin */
-  gp_XYZ tvec = orig.XYZ() - vert0;
+  //gp_XYZ tvec = orig.XYZ() - vert0;
 
   //if ( tvec * dir > EPSILON )
     // intersected face is at back side of the temporary face this _LayerEdge belongs to
@@ -7565,6 +7565,9 @@ bool _LayerEdge::SegTriaInter( const gp_Ax1& lastSegment,
   if ( det > -ANGL_EPSILON && det < ANGL_EPSILON )
     return false;
 
+  /* calculate distance from vert0 to ray origin */
+  gp_XYZ tvec = orig.XYZ() - vert0;
+
   /* calculate U parameter and test bounds */
   double u = ( tvec * pvec ) / det;
   //if (u < 0.0 || u > 1.0)