From: spo Date: Wed, 22 Jun 2016 11:31:53 +0000 (+0300) Subject: ExchangePlugin uses selectionType() like face, solid instead of Faces, Solids... X-Git-Tag: V_2.4.0~50 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=94e645508df5819676cc0ed67700dbd68c53abfb;p=modules%2Fshaper.git ExchangePlugin uses selectionType() like face, solid instead of Faces, Solids... --- diff --git a/src/ExchangePlugin/ExchangePlugin_Tools.cpp b/src/ExchangePlugin/ExchangePlugin_Tools.cpp index 5a65fc1da..a7ec0d9bf 100644 --- a/src/ExchangePlugin/ExchangePlugin_Tools.cpp +++ b/src/ExchangePlugin/ExchangePlugin_Tools.cpp @@ -20,13 +20,13 @@ std::list ExchangePlugin_Tools::split(const std::string& theString, std::string ExchangePlugin_Tools::selectionType2xaoDimension(const std::string& theType) { - if (theType == "Vertices") + if (theType == "Vertices" || theType == "vertex") return "vertex"; - else if (theType == "Edges") + else if (theType == "Edges" || theType == "edge") return "edge"; - else if (theType == "Faces") + else if (theType == "Faces" || theType == "face") return "face"; - else if (theType == "Solids") + else if (theType == "Solids" || theType == "solid") return "solid"; return std::string(); @@ -34,16 +34,14 @@ std::string ExchangePlugin_Tools::selectionType2xaoDimension(const std::string& std::string ExchangePlugin_Tools::xaoDimension2selectionType(const std::string& theDimension) { -// return theDimension; - if (theDimension == "vertex") - return "Vertices"; + return "vertex"; else if (theDimension == "edge") - return "Edges"; + return "edge"; else if (theDimension == "face") - return "Faces"; + return "face"; else if (theDimension == "solid") - return "Solids"; + return "solid"; return std::string(); } diff --git a/src/ExchangePlugin/Test/TestExport.py b/src/ExchangePlugin/Test/TestExport.py index f295039ce..26fb3c90d 100644 --- a/src/ExchangePlugin/Test/TestExport.py +++ b/src/ExchangePlugin/Test/TestExport.py @@ -92,7 +92,7 @@ def testExportXAO(): aGroupFeature = aSession.activeDocument().addFeature("Group") aGroupFeature.data().setName("boite_1") aSelectionListAttr = aGroupFeature.selectionList("group_list") - aSelectionListAttr.setSelectionType("Solids") + aSelectionListAttr.setSelectionType("solid") aSelectionListAttr.append(anImportFeature.lastResult(), None) aGroupFeature.execute() aSession.finishOperation() @@ -101,18 +101,18 @@ def testExportXAO(): aGroupFeature = aSession.activeDocument().addFeature("Group") aGroupFeature.data().setName("") aSelectionListAttr = aGroupFeature.selectionList("group_list") - aSelectionListAttr.setSelectionType("Faces") - aSelectionListAttr.append("Box_1_1/Shape1_1", "face") - aSelectionListAttr.append("Box_1_1/Shape2_1", "face") + aSelectionListAttr.setSelectionType("face") + aSelectionListAttr.append("Box_1_1/Shape1_1") + aSelectionListAttr.append("Box_1_1/Shape2_1") aGroupFeature.execute() aSession.finishOperation() # Export aSession.startOperation("Export") anExportFeature = aPart.addFeature("Export") - anExportFeature.string("ExportType").setValue("XAO") +# anExportFeature.string("ExportType").setValue("XAO") anExportFeature.string("file_path").setValue("Data/export.xao") - anExportFeature.string("file_format").setValue("XAO") +# anExportFeature.string("file_format").setValue("XAO") anExportFeature.string("xao_author").setValue("me") anExportFeature.string("xao_geometry_name").setValue("mygeom") anExportFeature.execute()