]> SALOME platform Git repositories - plugins/gmshplugin.git/commitdiff
Salome HOME
adapt to GMSH 3.0.4 and SALOME 8.3.0 V8_4_0a1 V8_4_0a2
authorPaul RASCLE <paul.rascle@edf.fr>
Sun, 6 Aug 2017 21:38:51 +0000 (23:38 +0200)
committerPaul RASCLE <paul.rascle@edf.fr>
Wed, 16 Aug 2017 07:50:05 +0000 (09:50 +0200)
CMakeLists.txt
src/GMSHPlugin/GMSHPlugin_Mesher.cxx
src/GMSHPlugin/GMSHPlugin_Mesher.hxx

index 6b10f1b35ec5f3a0ef110124f95b34ff9aa94f10..c0ce2139470fe4f0897c5bcd998d46c6ca141ad7 100644 (file)
@@ -32,7 +32,7 @@ ENDIF(WIN32)
 STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
 
 SET(${PROJECT_NAME_UC}_MAJOR_VERSION 8)
-SET(${PROJECT_NAME_UC}_MINOR_VERSION 1)
+SET(${PROJECT_NAME_UC}_MINOR_VERSION 3)
 SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
 SET(${PROJECT_NAME_UC}_VERSION
   ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
index 9ec0011921f5256382bea0401a704ae1a12fd9aa..6e2ccf18403a965385c715b7c5fe1aa06231a56d 100644 (file)
@@ -218,38 +218,38 @@ void GMSHPlugin_Mesher::CreateGmshCompounds()
     TopAbs_ShapeEnum geomType = geomShape.ShapeType();
     if (geomShape.ShapeType() == TopAbs_COMPOUND)// voir s'il ne faut pas mettre une erreur dans le cas contraire
     {
-      //printf("shapeType == TopAbs_COMPOUND\n");
+      MESSAGE("shapeType == TopAbs_COMPOUND");
       TopoDS_Iterator it(geomShape);
       TopAbs_ShapeEnum shapeType = it.Value().ShapeType();
       // compound of edges
       if (shapeType == TopAbs_EDGE)
       {
-        //printf("    shapeType == TopAbs_EDGE :");
+        MESSAGE("    shapeType == TopAbs_EDGE :");
         int num = _gModel->getNumEdges()+1;
-        Curve *curve = Create_Curve(num, MSH_SEGM_COMPOUND, 1, NULL, NULL, -1, -1, 0., 1.);
+        Curve *curve = CreateCurve(num, MSH_SEGM_COMPOUND, 1, NULL, NULL, -1, -1, 0., 1.);
         for (it; it.More(); it.Next())
         {
           TopoDS_Shape topoShape = it.Value();
           ASSERT(topoShape.ShapeType() == shapeType);
-          curve->compound.push_back(occgeo->getOCCEdgeByNativePtr(_gModel, (TopoDS_Edge&)topoShape)->tag());
+          curve->compound.push_back(occgeo->addEdgeToModel(_gModel, (TopoDS_Edge&)topoShape)->tag());
         }
         Tree_Add(_gModel->getGEOInternals()->Curves, &curve);
-        _gModel->importGEOInternals();
+        //_gModel->importGEOInternals();
       }
       // compound of faces
       else if (shapeType == TopAbs_FACE)
       {
-        //printf("    shapeType == TopAbs_FACE :");
+        MESSAGE("    shapeType == TopAbs_FACE :");
         int num = _gModel->getNumFaces()+1;
-        Surface *surface = Create_Surface(num, MSH_SURF_COMPOUND);
+        Surface *surface = CreateSurface(num, MSH_SURF_COMPOUND);
         for (it; it.More(); it.Next())
         {
           TopoDS_Shape topoShape = it.Value();
           ASSERT(topoShape.ShapeType() == shapeType);
-          surface->compound.push_back(occgeo->getOCCFaceByNativePtr(_gModel, (TopoDS_Face&)topoShape)->tag());
+          surface->compound.push_back(occgeo->addFaceToModel(_gModel, (TopoDS_Face&)topoShape)->tag());
         }
         Tree_Add(_gModel->getGEOInternals()->Surfaces, &surface);
-        _gModel->importGEOInternals();
+        _gModel->getGEOInternals()->synchronize(_gModel);
       }
     }
   }
index 2f2a4c3fe1fb8e3537294198d42df217e837578c..6da916462c12eda727891589b361d6167e649c7a 100644 (file)
 //
 // See http://www.alneos.com/ or email : contact@alneos.fr
 //
+
+#ifndef _GMSHPlugin_Mesher_HXX_
+#define _GMSHPlugin_Mesher_HXX_
+
 #include <stdio.h>
 #include "Gmsh.h"
 #include "GmshConfig.h"
 #include "GModelIO_OCC.h"
+#include "GModelIO_GEO.h"
 #include "Geo.h"
 #include "GEdgeCompound.h"
 #include "GFaceCompound.h"
 #include "MElement.h"
 
-#ifndef _GMSHPlugin_Mesher_HXX_
-#define _GMSHPlugin_Mesher_HXX_
-
 #include "GMSHPlugin_Defs.hxx"
 #include "StdMeshers_FaceSide.hxx"
 #include "SMDS_MeshElement.hxx"
@@ -42,8 +44,8 @@ class SMESH_Mesh;
 class SMESH_Comment;
 class SMESHDS_Mesh;
 class TopoDS_Shape;
-class TopTools_DataMapOfShapeShape;
-class TopTools_IndexedMapOfShape;
+//class TopTools_DataMapOfShapeShape;
+//class TopTools_IndexedMapOfShape;
 class GMSHPlugin_Hypothesis;