From 0bf35de422952ec0af08f459fefa9e69e9a7af06 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Mon, 13 Feb 2017 21:25:10 +0000 Subject: [PATCH] cleanup and explain --- Geo/GModel.cpp | 18 ++++++------------ Geo/GModel.h | 1 - Parser/Gmsh.tab.cpp | 4 ++-- Parser/Gmsh.y | 4 ++-- 4 files changed, 10 insertions(+), 17 deletions(-) diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp index fb0cdd244e..635b5824aa 100644 --- a/Geo/GModel.cpp +++ b/Geo/GModel.cpp @@ -79,16 +79,16 @@ GModel::GModel(std::string name) // push new one into the list list.push_back(this); - // at the moment we always create (at least an empty) GEO model + // at the moment we always create (at least empty) internal GEO and OCC + // CAD models _createGEOInternals(); - _createOCCInternals(); -#if defined(HAVE_OCC) - setFactory("OpenCASCADE"); -#else + // FIXME: GModelFactory will be deprecated at some point, replaced by + // interfaces to internal CAD data (currently only OCC_Internals, soon + // GEO_Internals; and maybe an abstract "CAD_Internals", from which those + // would derive, with an "integer" API, easily wrapped in C or scripts) setFactory("Gmsh"); -#endif #if defined(HAVE_MESH) _fields = new FieldManager(); @@ -171,12 +171,6 @@ void GModel::setFactory(std::string name) } } -std::string GModel::getFactoryName() -{ - if(!_factory) return ""; - return _factory->getName(); -} - GModel *GModel::findByName(const std::string &name, const std::string &fileName) { // return last mesh with given name diff --git a/Geo/GModel.h b/Geo/GModel.h index 593d1a28b4..0630d6c2ad 100644 --- a/Geo/GModel.h +++ b/Geo/GModel.h @@ -501,7 +501,6 @@ class GModel // change the entity creation factory void setFactory(std::string name); - std::string getFactoryName(); // create brep geometry entities using the factory GVertex *addVertex(double x, double y, double z, double lc); diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp index c20115e4f3..b27e96f1c2 100644 --- a/Parser/Gmsh.tab.cpp +++ b/Parser/Gmsh.tab.cpp @@ -8024,8 +8024,8 @@ yyreduce: case 170: #line 1719 "Gmsh.y" { - // FIXME: when changing to OpenCASCADE, get maxTag for all dimensions - // and add that info in OCC_Internals - same in the other direction + // FIXME: when changing to OpenCASCADE, get maxTags from GEO_Internals and + // add that info in OCC_Internals - same in the other direction factory = (yyvsp[(3) - (5)].c); Free((yyvsp[(3) - (5)].c)); ;} diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y index 1923f2b73b..9b67343de9 100644 --- a/Parser/Gmsh.y +++ b/Parser/Gmsh.y @@ -1717,8 +1717,8 @@ Shape : tSetFactory '(' StringExprVar ')' tEND { - // FIXME: when changing to OpenCASCADE, get maxTag for all dimensions - // and add that info in OCC_Internals - same in the other direction + // FIXME: when changing to OpenCASCADE, get maxTags from GEO_Internals and + // add that info in OCC_Internals - same in the other direction factory = $3; Free($3); } -- GitLab