Salome HOME
[SALOME platform 0013410]: SubMesh not taken into account with Netgen 1D-2D et 1D...
authoreap <eap@opencascade.com>
Tue, 16 Sep 2008 08:56:38 +0000 (08:56 +0000)
committereap <eap@opencascade.com>
Tue, 16 Sep 2008 08:56:38 +0000 (08:56 +0000)
  Read a new aglo attribute "support-submeshes":

+      QString suppSub = atts.value("support-submeshes");
+      if ( !suppSub.isEmpty() )
+        isSupportSubmeshes = (suppSub == "true");
+

src/SMESHGUI/SMESHGUI_XmlHandler.cxx

index cf87f29ef58dc3662ab2c95ff007c1dc46e76a9c..c5c45afbc7f891fdc0b2cd21f4cc55054fea31be 100644 (file)
@@ -122,11 +122,14 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
       QString aLabel = atts.value("label-id");
       QString anIcon = atts.value("icon-id");
       bool isAux = atts.value("auxiliary") == "true";
       QString aLabel = atts.value("label-id");
       QString anIcon = atts.value("icon-id");
       bool isAux = atts.value("auxiliary") == "true";
-      bool isNeedGeom = true;
+      bool isNeedGeom = true, isSupportSubmeshes = false;
       QString aNeedGeom = atts.value("need-geom");
       if ( !aNeedGeom.isEmpty() )
         isNeedGeom = (aNeedGeom == "true");
       QString aNeedGeom = atts.value("need-geom");
       if ( !aNeedGeom.isEmpty() )
         isNeedGeom = (aNeedGeom == "true");
-      
+      QString suppSub = atts.value("support-submeshes");
+      if ( !suppSub.isEmpty() )
+        isSupportSubmeshes = (suppSub == "true");
+
       QString aDimStr = atts.value("dim");
       aDimStr = aDimStr.remove( ' ' );
       QStringList aDimList = aDimStr.split( ',', QString::SkipEmptyParts );
       QString aDimStr = atts.value("dim");
       aDimStr = aDimStr.remove( ' ' );
       QStringList aDimList = aDimStr.split( ',', QString::SkipEmptyParts );
@@ -155,7 +158,8 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
       HypothesisData* aHypData =
         new HypothesisData (aHypAlType, myPluginName, myServerLib, myClientLib,
                             aLabel, anIcon, aDim, isAux,
       HypothesisData* aHypData =
         new HypothesisData (aHypAlType, myPluginName, myServerLib, myClientLib,
                             aLabel, anIcon, aDim, isAux,
-                            attr[ HYPOS ], attr[ OPT_HYPOS ], attr[ INPUT ], attr[ OUTPUT ], isNeedGeom );
+                            attr[ HYPOS ], attr[ OPT_HYPOS ], attr[ INPUT ], attr[ OUTPUT ],
+                            isNeedGeom, isSupportSubmeshes );
 
       if (qName == "algorithm")
       {
 
       if (qName == "algorithm")
       {