]> SALOME platform Git repositories - plugins/hexoticplugin.git/commitdiff
Salome HOME
BUG: HexoticPlugin/SizeMaps: The shape location wasn'takebn into account when buildin...
authorrnc <rnc@opencascade.com>
Mon, 16 Sep 2013 15:53:30 +0000 (15:53 +0000)
committerrnc <rnc@opencascade.com>
Mon, 16 Sep 2013 15:53:30 +0000 (15:53 +0000)
Also the Hexotic working files removal is now performed only in release mode to allow debugging.

src/HexoticPlugin/HexoticPlugin_Hexotic.cxx

index c3c54a39ce4b4cf4f0483ac1c925b1468aee80ab..b6be4d6d27a80906b60a1ea862fb10ae602f7801 100644 (file)
@@ -1147,9 +1147,13 @@ void HexoticPlugin_Hexotic::createPointsSampleFromFace( const TopoDS_Shape& aSha
   BRepMesh_IncrementalMesh M(aShape, 0.01, Standard_True);
   TopLoc_Location aLocation;
   TopoDS_Face aFace = TopoDS::Face(aShape);
-  Handle(Geom_Surface) aSurf = BRep_Tool::Surface (aFace, aLocation);
+
+  // Triangulate the face
   Handle(Poly_Triangulation) aTri = BRep_Tool::Triangulation (aFace, aLocation);
   
+  // Get the transformation associated to the face location
+  gp_Trsf aTrsf = aLocation.Transformation();
+  
   // Get triangles
   int nbTriangles = aTri->NbTriangles();
   Poly_Array1OfTriangle triangles(1,nbTriangles);
@@ -1168,6 +1172,10 @@ void HexoticPlugin_Hexotic::createPointsSampleFromFace( const TopoDS_Shape& aSha
      gp_Pnt p2 = nodes.Value(aTriangle.Value(2));
      gp_Pnt p3 = nodes.Value(aTriangle.Value(3));
      
+     p1.Transform(aTrsf);
+     p2.Transform(aTrsf);
+     p3.Transform(aTrsf);
+     
      subdivideTriangle(p1, p2, p3, theSize, thePoints);  
   }
 }
@@ -1547,6 +1555,7 @@ bool HexoticPlugin_Hexotic::Compute(SMESH_Mesh&          aMesh,
       if (myError)
 */
         hexahedraMessage = "success";
+        #ifndef _DEBUG_
         removeFile(Hexotic_Out);
         removeFile(Hexotic_In);
         removeFile(aLogFileName);
@@ -1554,6 +1563,7 @@ bool HexoticPlugin_Hexotic::Compute(SMESH_Mesh&          aMesh,
         {
           removeFile( TCollection_AsciiString( sizeMapFiles[i].c_str() ) );
         }
+        #endif
       }
       else {
         hexahedraMessage = "failed";