From 656154b12cdcca1f1303b26f2978d59681c290d8 Mon Sep 17 00:00:00 2001 From: jfa Date: Mon, 19 Feb 2024 17:06:02 +0000 Subject: [PATCH] [bos #40620] [CEA] XAO export for SHAPER: Allow export of brep in a separate file --- src/ExchangeAPI/ExchangeAPI_Export.cpp | 32 +- src/ExchangeAPI/ExchangeAPI_Export.h | 22 +- .../ExchangePlugin_ExportFeature.cpp | 23 +- .../ExchangePlugin_ExportFeature.h | 13 + src/ExchangePlugin/ExchangePlugin_msg_fr.ts | 7 + .../Test/TestExportToXAO_SeparateShapeFile.py | 169 +++++++++ src/ExchangePlugin/Test/tests.set | 1 + src/ExchangePlugin/doc/TUI_exportFeature.rst | 15 +- src/ExchangePlugin/doc/examples/export.py | 4 - src/ExchangePlugin/doc/examples/exportXAO.py | 20 + src/ExchangePlugin/doc/exportFeature.rst | 45 ++- src/ExchangePlugin/doc/images/ExportXAO.png | Bin 0 -> 16049 bytes src/ExchangePlugin/export_widget.xml | 9 +- src/GeomAlgoAPI/GeomAlgoAPI_XAOExport.cpp | 5 +- src/GeomAlgoAPI/GeomAlgoAPI_XAOExport.h | 3 +- src/ModelHighAPI/ModelHighAPI_Macro.h | 358 +----------------- 16 files changed, 330 insertions(+), 396 deletions(-) create mode 100644 src/ExchangePlugin/Test/TestExportToXAO_SeparateShapeFile.py create mode 100644 src/ExchangePlugin/doc/examples/exportXAO.py create mode 100755 src/ExchangePlugin/doc/images/ExportXAO.png diff --git a/src/ExchangeAPI/ExchangeAPI_Export.cpp b/src/ExchangeAPI/ExchangeAPI_Export.cpp index 6d9193235..cda585a2d 100644 --- a/src/ExchangeAPI/ExchangeAPI_Export.cpp +++ b/src/ExchangeAPI/ExchangeAPI_Export.cpp @@ -41,14 +41,17 @@ ExchangeAPI_Export::ExchangeAPI_Export(const std::shared_ptr& /// Constructor with values for XAO export. ExchangeAPI_Export::ExchangeAPI_Export(const std::shared_ptr& theFeature, - const std::string & theFilePath, - const std::string & theAuthor, - const std::string & theGeometryName) + const std::string & theFilePath, + const std::string & theAuthor, + const std::string & theGeometryName, + const std::string & theShapeFilePath) : ModelHighAPI_Interface(theFeature) { initialize(); fillAttribute("XAO", theFeature->string(ExchangePlugin_ExportFeature::EXPORT_TYPE_ID())); fillAttribute(theFilePath, theFeature->string(ExchangePlugin_ExportFeature::XAO_FILE_PATH_ID())); + fillAttribute(theShapeFilePath, + theFeature->string(ExchangePlugin_ExportFeature::XAO_SHAPE_FILE_PATH_ID())); fillAttribute(theAuthor, theFeature->string(ExchangePlugin_ExportFeature::XAO_AUTHOR_ID())); fillAttribute(theGeometryName, theFeature->string(ExchangePlugin_ExportFeature::XAO_GEOMETRY_NAME_ID())); @@ -106,20 +109,23 @@ ExchangeAPI_Export::ExchangeAPI_Export(const std::shared_ptr& const std::string & theFilePath, const ModelHighAPI_Selection& theResult, const std::string & theAuthor, - const std::string & theGeometryName) + const std::string & theGeometryName, + const std::string & theShapeFilePath) : ModelHighAPI_Interface(theFeature) { initialize(); fillAttribute("XAO", theFeature->string(ExchangePlugin_ExportFeature::EXPORT_TYPE_ID())); fillAttribute(theFilePath, theFeature->string(ExchangePlugin_ExportFeature::XAO_FILE_PATH_ID())); + fillAttribute(theShapeFilePath, + theFeature->string(ExchangePlugin_ExportFeature::XAO_SHAPE_FILE_PATH_ID())); fillAttribute(theAuthor, theFeature->string(ExchangePlugin_ExportFeature::XAO_AUTHOR_ID())); fillAttribute(theGeometryName, - theFeature->string(ExchangePlugin_ExportFeature::XAO_GEOMETRY_NAME_ID())); + theFeature->string(ExchangePlugin_ExportFeature::XAO_GEOMETRY_NAME_ID())); fillAttribute("XAO", theFeature->string(ExchangePlugin_ExportFeature::FILE_FORMAT_ID())); std::list aListOfOneSel; aListOfOneSel.push_back(theResult); fillAttribute(aListOfOneSel, - theFeature->selectionList(ExchangePlugin_ExportFeature::XAO_SELECTION_LIST_ID())); + theFeature->selectionList(ExchangePlugin_ExportFeature::XAO_SELECTION_LIST_ID())); execute(); apply(); // finish operation to make sure the export is done on the current state of the history } @@ -301,14 +307,15 @@ ExportPtr exportToFile(const std::shared_ptr & thePart, } ExportPtr exportToXAO(const std::shared_ptr & thePart, - const std::string & theFilePath, - const std::string & theAuthor, - const std::string & theGeometryName) + const std::string & theFilePath, + const std::string & theAuthor, + const std::string & theGeometryName, + const std::string & theShapeFilePath) { apply(); // finish previous operation to make sure all previous operations are done std::shared_ptr aFeature = thePart->addFeature(ExchangePlugin_ExportFeature::ID()); - return ExportPtr(new ExchangeAPI_Export(aFeature, theFilePath, theAuthor, theGeometryName)); + return ExportPtr(new ExchangeAPI_Export(aFeature, theFilePath, theAuthor, theGeometryName, theShapeFilePath)); } ExportPtr exportToSTL(const std::shared_ptr & thePart, @@ -336,13 +343,14 @@ ExportPtr exportToXAO(const std::shared_ptr & thePart, const std::string & theFilePath, const ModelHighAPI_Selection& theSelectedShape, const std::string & /*theAuthor*/, - const std::string & /*theGeometryName*/) + const std::string & /*theGeometryName*/, + const std::string & theShapeFilePath) { apply(); // finish previous operation to make sure all previous operations are done std::shared_ptr aFeature = thePart->addFeature(ExchangePlugin_ExportFeature::ID()); // special internal case when for XAO a selection list is filled - return ExportPtr(new ExchangeAPI_Export(aFeature, theFilePath, theSelectedShape, "XAO")); + return ExportPtr(new ExchangeAPI_Export(aFeature, theFilePath, theSelectedShape, "XAO", "", theShapeFilePath)); } PyObject* exportToXAOMem(const std::shared_ptr & thePart, diff --git a/src/ExchangeAPI/ExchangeAPI_Export.h b/src/ExchangeAPI/ExchangeAPI_Export.h index 4fc9be602..4500c95db 100644 --- a/src/ExchangeAPI/ExchangeAPI_Export.h +++ b/src/ExchangeAPI/ExchangeAPI_Export.h @@ -54,7 +54,8 @@ public: explicit ExchangeAPI_Export(const std::shared_ptr& theFeature, const std::string & theFilePath, const std::string & theAuthor = std::string(), - const std::string & theGeometryName = std::string()); + const std::string & theGeometryName = std::string(), + const std::string & theShapeFilePath = std::string()); /// Constructor with values for STL of selected result export. EXCHANGEAPI_EXPORT @@ -72,7 +73,8 @@ public: const std::string & theFilePath, const ModelHighAPI_Selection& theResult, const std::string & theAuthor, - const std::string & theGeometryName = std::string()); + const std::string & theGeometryName = std::string(), + const std::string & theShapeFilePath = std::string()); /// Constructor with values for XAO of selected result export to memory buffer. EXCHANGEAPI_EXPORT @@ -92,7 +94,7 @@ public: EXCHANGEAPI_EXPORT virtual ~ExchangeAPI_Export(); - INTERFACE_16(ExchangePlugin_ExportFeature::ID(), + INTERFACE_17(ExchangePlugin_ExportFeature::ID(), exportType, ExchangePlugin_ExportFeature::EXPORT_TYPE_ID(), ModelAPI_AttributeString, /** ExportType */, filePath, ExchangePlugin_ExportFeature::FILE_PATH_ID(), @@ -126,7 +128,9 @@ public: ExchangePlugin_ExportFeature::STL_DEFLECTION_TYPE_RELATIVE(), ModelAPI_AttributeString, /** Type of the defelection */, memoryBuff, ExchangePlugin_ExportFeature::MEMORY_BUFFER_ID(), - ModelAPI_AttributeString, /** Bytes*/) + ModelAPI_AttributeString, /** Bytes*/, + xaoShapeFilePath, ExchangePlugin_ExportFeature::XAO_SHAPE_FILE_PATH_ID(), + ModelAPI_AttributeString, /** xao shape file path */) /// Dump wrapped feature EXCHANGEAPI_EXPORT @@ -150,9 +154,10 @@ ExportPtr exportToFile(const std::shared_ptr & thePart, */ EXCHANGEAPI_EXPORT ExportPtr exportToXAO(const std::shared_ptr & thePart, - const std::string & theFilePath, - const std::string & theAuthor = std::string(), - const std::string & theGeometryName = std::string()); + const std::string & theFilePath, + const std::string & theAuthor = std::string(), + const std::string & theGeometryName = std::string(), + const std::string & theShapeFilePath = std::string()); /**\ingroup CPPHighAPI * \brief Exports to STL file the result of the current document @@ -174,7 +179,8 @@ ExportPtr exportToXAO(const std::shared_ptr & thePart, const std::string & theFilePath, const ModelHighAPI_Selection& theSelectedShape, const std::string & theAuthor = std::string(), - const std::string & theGeometryName = std::string()); + const std::string & theGeometryName = std::string(), + const std::string & theShapeFilePath = std::string()); /**\ingroup CPPHighAPI * \brief Exports to XAO format buffer the selected result with groups parts related to it only. diff --git a/src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp b/src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp index 3924fb733..b536f54ef 100644 --- a/src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp +++ b/src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp @@ -123,6 +123,11 @@ void ExchangePlugin_ExportFeature::initAttributes() data()->addAttribute(ExchangePlugin_ExportFeature::MEMORY_BUFFER_ID(), ModelAPI_AttributeString::typeId()); + data()->addAttribute(ExchangePlugin_ExportFeature::XAO_SHAPE_FILE_PATH_ID(), + ModelAPI_AttributeString::typeId()); + data()->addAttribute(ExchangePlugin_ExportFeature::XAO_SHAPE_FILE_SEPARATE_ID(), + ModelAPI_AttributeBoolean::typeId()); + ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), ExchangePlugin_ExportFeature::XAO_FILE_PATH_ID()); ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), @@ -135,6 +140,10 @@ void ExchangePlugin_ExportFeature::initAttributes() ExchangePlugin_ExportFeature::XAO_SELECTION_LIST_ID()); ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), ExchangePlugin_ExportFeature::MEMORY_BUFFER_ID()); + ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), + ExchangePlugin_ExportFeature::XAO_SHAPE_FILE_PATH_ID()); + ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), + ExchangePlugin_ExportFeature::XAO_SHAPE_FILE_SEPARATE_ID()); // to support previous version of document, move the selection list // if the type of export operation is XAO @@ -605,7 +614,19 @@ void ExchangePlugin_ExportFeature::exportXAO(const std::string& theFileName, string(ExchangePlugin_ExportFeature::MEMORY_BUFFER_ID())->setValue(XAOExportMem(&aXao, anError)); } else { - XAOExport(theFileName, &aXao, anError); + std::string aShapeFile (""); + AttributeBooleanPtr aShapeSeparateAttr = boolean(XAO_SHAPE_FILE_SEPARATE_ID()); + if (aShapeSeparateAttr->isInitialized() && + aShapeSeparateAttr->value() == true) { + aShapeFile = theFileName + ".brep"; + } + else { + AttributeStringPtr aShapeFileAttr = string(XAO_SHAPE_FILE_PATH_ID()); + if (aShapeFileAttr->isInitialized()) + aShapeFile = aShapeFileAttr->value(); + } + + XAOExport(theFileName, &aXao, anError, aShapeFile); } if (!anError.empty()) { diff --git a/src/ExchangePlugin/ExchangePlugin_ExportFeature.h b/src/ExchangePlugin/ExchangePlugin_ExportFeature.h index a3f6fb651..295aa7618 100644 --- a/src/ExchangePlugin/ExchangePlugin_ExportFeature.h +++ b/src/ExchangePlugin/ExchangePlugin_ExportFeature.h @@ -150,6 +150,19 @@ public: static const std::string MY_XAO_GEOMETRY_NAME_ID("xao_geometry_name"); return MY_XAO_GEOMETRY_NAME_ID; } + /// attribute name of xao shape file path + inline static const std::string& XAO_SHAPE_FILE_PATH_ID() + { + static const std::string MY_XAO_SHAPE_FILE_PATH_ID("xao_shape_file_path"); + return MY_XAO_SHAPE_FILE_PATH_ID; + } + /// attribute flag to export shape in a separate file during xao export, + /// name of shape file will be xao_file_path + .brep + inline static const std::string& XAO_SHAPE_FILE_SEPARATE_ID() + { + static const std::string MY_XAO_SHAPE_FILE_SEPARATE_ID("xao_shape_file_separate"); + return MY_XAO_SHAPE_FILE_SEPARATE_ID; + } /// attribute string memory buffer inline static const std::string& MEMORY_BUFFER_ID() { diff --git a/src/ExchangePlugin/ExchangePlugin_msg_fr.ts b/src/ExchangePlugin/ExchangePlugin_msg_fr.ts index cd29c1b85..45b2343bf 100644 --- a/src/ExchangePlugin/ExchangePlugin_msg_fr.ts +++ b/src/ExchangePlugin/ExchangePlugin_msg_fr.ts @@ -223,6 +223,13 @@ Veuillez saisir le nom de la géométrie + + Export:xao_shape_file_separate + + Export shape in a separate file + Exporter la forme dans un fichier séparé + + Export:stl_absolute diff --git a/src/ExchangePlugin/Test/TestExportToXAO_SeparateShapeFile.py b/src/ExchangePlugin/Test/TestExportToXAO_SeparateShapeFile.py new file mode 100644 index 000000000..34a3f4271 --- /dev/null +++ b/src/ExchangePlugin/Test/TestExportToXAO_SeparateShapeFile.py @@ -0,0 +1,169 @@ +# Copyright (C) 2018-2024 CEA, EDF +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +from salome.shaper import model + +from GeomAPI import * + +import tempfile +import os +import math + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() + +Cyl_1 = model.addCylinder(Part_1_doc, 7, 13) +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) + +Group_1 = model.addGroup(Part_1_doc, "Faces", [model.selection("FACE", "Box_1_1/Top")]) + +Field_1 = model.addField(Part_1_doc, 1, "STRING", 1, ["Comp 1"], [model.selection("SOLID", "Box_1_1")]) +Field_1.addStep(0, 0, [[""], ["box"]]) + +with tempfile.TemporaryDirectory() as tmpdirname: + # Export entire Part + tmp_file1 = os.path.join(tmpdirname, "Part.xao") + tmp_file2 = os.path.join(tmpdirname, "Part_shape.brep") + + Export_1 = model.exportToXAO(Part_1_doc, tmp_file1, "", "", tmp_file2) + # due to the issue 2530, the export feature is removed after execution, so, + # if export was performed correctly, the feature must become invalid + #assert(Export_1.feature().error() == "") + assert(not Export_1.feature().data().isValid()) + assert(os.path.isfile(tmp_file1)) + assert(os.path.isfile(tmp_file2)) + + # Add two fields and one group to the Box_1 + Field_2 = model.addField(Part_1_doc, 1, "BOOLEAN", 1, ["Comp 1"], [model.selection("FACE", "Box_1_1/Front")]) + Field_2.addStep(0, 0, [[False], [True]]) + + Field_3_objects = [model.selection("VERTEX", "[Box_1_1/Front][Box_1_1/Left][Box_1_1/Top]"), model.selection("VERTEX", "[Box_1_1/Front][Box_1_1/Left][Box_1_1/Bottom]"), model.selection("VERTEX", "[Box_1_1/Front][Box_1_1/Right][Box_1_1/Bottom]"), model.selection("VERTEX", "[Box_1_1/Front][Box_1_1/Right][Box_1_1/Top]")] + Field_3 = model.addField(Part_1_doc, 1, "DOUBLE", 1, ["Comp 1"], Field_3_objects) + Field_3.addStep(0, 0, [[0], [1], [0], [0], [0]]) + + Group_2 = model.addGroup(Part_1_doc, "Edges", [model.selection("EDGE", "[Box_1_1/Top][Box_1_1/Left]"), model.selection("EDGE", "[Box_1_1/Top][Box_1_1/Right]")]) + + tmp_file3 = os.path.join(tmpdirname, "Box.xao") + tmp_file4 = os.path.join(tmpdirname, "Box_shape.brep") + + Export_2 = model.exportToXAO(Part_1_doc, tmp_file3, model.selection("SOLID", "Box_1_1"), + "", "", tmp_file4) + assert(Export_2.feature().error() == "") + assert(os.path.isfile(tmp_file3)) + assert(os.path.isfile(tmp_file4)) + + model.end() + + # Try to import the exported data + model.begin() + partSet = model.moduleDocument() + Part_1 = model.addPart(partSet) + Part_1_doc = Part_1.document() + + Import_1 = model.addImport(Part_1_doc, tmp_file1) + model.do() + assert(Import_1.feature().error() == "") + + model.testNbResults(Import_1, 1) + model.testNbSubResults(Import_1, [2]) + model.testNbSubShapes(Import_1, GeomAPI_Shape.SOLID, [2]) + model.testNbSubShapes(Import_1, GeomAPI_Shape.FACE, [9]) + model.testNbSubShapes(Import_1, GeomAPI_Shape.EDGE, [30]) + model.testNbSubShapes(Import_1, GeomAPI_Shape.VERTEX, [60]) + model.testResultsVolumes(Import_1, [3001.1945203]) + model.testResultsAreas(Import_1, [1479.645943]) + + assert(Import_1.name() == "Part") + assert(Import_1.result().name() == "Part_1") + assert(Import_1.subFeature(0).name() == "Group_1") + assert(Import_1.subFeature(1).name() == "Field_1") + assert(Import_1.subFeature(0).result().name() == "Group_1") + assert(Import_1.subFeature(1).result().name() == "Field_1") + + # check group + assert(Part_1_doc.size("Groups") == 1) + res1 = model.objectToResult(Part_1_doc.object("Groups", 0)) + assert(res1 is not None) + res1It = GeomAPI_ShapeExplorer(res1.shape(), GeomAPI_Shape.FACE) + assert(res1It.more()) + shape1 = res1It.current() + res1It.next() + assert(not res1It.more()) + p1 = res1.shape().middlePoint() + aTol = 1.e-7 + assert(math.fabs(p1.x() - 5) <= aTol and math.fabs(p1.y() - 5) <= aTol and math.fabs(p1.z() - 10) <= aTol), "({}, {}, {}) != ({}, {}, {})".format(p1.x(), p1.y(), p1.z(), 5, 5, 10) + + Import_2 = model.addImport(Part_1_doc, tmp_file3) + model.do() + assert(Import_2.feature().error() == "") + + model.testNbResults(Import_2, 1) + model.testNbSubResults(Import_2, [0]) + model.testNbSubShapes(Import_2, GeomAPI_Shape.SOLID, [1]) + model.testNbSubShapes(Import_2, GeomAPI_Shape.FACE, [6]) + model.testNbSubShapes(Import_2, GeomAPI_Shape.EDGE, [24]) + model.testNbSubShapes(Import_2, GeomAPI_Shape.VERTEX, [48]) + model.testResultsVolumes(Import_2, [1000]) + model.testResultsAreas(Import_2, [600]) + + assert(Import_2.name() == "Box_1_1") + assert(Import_2.result().name() == "Box_1_1_1") + assert(Import_2.subFeature(0).name() == "Group_1") + assert(Import_2.subFeature(1).name() == "Group_2") + assert(Import_2.subFeature(2).name() == "Field_1") + assert(Import_2.subFeature(3).name() == "Field_2") + assert(Import_2.subFeature(4).name() == "Field_3") + assert(Import_2.subFeature(0).result().name() == "Group_1") + assert(Import_2.subFeature(1).result().name() == "Group_2") + assert(Import_2.subFeature(2).result().name() == "Field_1") + assert(Import_2.subFeature(3).result().name() == "Field_2") + assert(Import_2.subFeature(4).result().name() == "Field_3") + + # check groups + assert(Part_1_doc.size("Groups") == 3) + + res1 = model.objectToResult(Part_1_doc.object("Groups", 1)) + assert(res1 is not None) + res1It = GeomAPI_ShapeExplorer(res1.shape(), GeomAPI_Shape.FACE) + assert(res1It.more()) + shape1 = res1It.current() + res1It.next() + assert(not res1It.more()) + p1 = res1.shape().middlePoint() + aTol = 1.e-7 + assert(math.fabs(p1.x() - 5) <= aTol and math.fabs(p1.y() - 5) <= aTol and math.fabs(p1.z() - 10) <= aTol), "({}, {}, {}) != ({}, {}, {})".format(p1.x(), p1.y(), p1.z(), 5, 5, 10) + + res2 = model.objectToResult(Part_1_doc.object("Groups", 2)) + assert(res2 is not None) + res2It = GeomAPI_ShapeExplorer(res2.shape(), GeomAPI_Shape.EDGE) + assert(res2It.more()) + edge1 = res2It.current() + res2It.next() + edge2 = res2It.current() + res2It.next() + assert(not res2It.more()) + p2 = res2.shape().middlePoint() + aTol = 1.e-7 + assert(math.fabs(p1.x() - 5) <= aTol and math.fabs(p1.y() - 5) <= aTol and math.fabs(p1.z() - 10) <= aTol), "({}, {}, {}) != ({}, {}, {})".format(p1.x(), p1.y(), p1.z(), 5, 5, 10) + + pass + +model.end() diff --git a/src/ExchangePlugin/Test/tests.set b/src/ExchangePlugin/Test/tests.set index aae491066..236656414 100755 --- a/src/ExchangePlugin/Test/tests.set +++ b/src/ExchangePlugin/Test/tests.set @@ -23,6 +23,7 @@ SET(TEST_NAMES Test2290.py Test2459.py Test18710.py + TestExportToXAO_SeparateShapeFile.py TestExportToXAOWithFields.py TestExportToXAOWithGroupNotUpdated.py TestExport_FiniteValidator.py diff --git a/src/ExchangePlugin/doc/TUI_exportFeature.rst b/src/ExchangePlugin/doc/TUI_exportFeature.rst index 4ef25d686..6a76f3cad 100644 --- a/src/ExchangePlugin/doc/TUI_exportFeature.rst +++ b/src/ExchangePlugin/doc/TUI_exportFeature.rst @@ -10,6 +10,19 @@ Export File :download:`Download this script ` + + .. _tui_export_file_XAO: + +Export XAO File +=============== + +.. literalinclude:: examples/exportXAO.py + :linenos: + :language: python + +:download:`Download this script ` + + .. _tui_export_file_STL: Export STL File @@ -20,5 +33,3 @@ Export STL File :language: python :download:`Download this script ` - - diff --git a/src/ExchangePlugin/doc/examples/export.py b/src/ExchangePlugin/doc/examples/export.py index 2a807f263..1f9b7c2b5 100644 --- a/src/ExchangePlugin/doc/examples/export.py +++ b/src/ExchangePlugin/doc/examples/export.py @@ -9,9 +9,5 @@ Part_1_doc = Part_1.document() Box_1 = model.addBox(Part_1_doc, 10, 10, 10) Export_1 = model.exportToFile(Part_1_doc, file_path, [model.selection("SOLID", "Box_1_1")]) - -file_xao = os.path.join(os.getenv("DATA_DIR"), "test.xao") -Export_2 = model.exportToXAO(Part_1_doc, file_xao, - model.selection("SOLID", "Box_1_1"), "author", "box") model.do() model.end() diff --git a/src/ExchangePlugin/doc/examples/exportXAO.py b/src/ExchangePlugin/doc/examples/exportXAO.py new file mode 100644 index 000000000..757956cf8 --- /dev/null +++ b/src/ExchangePlugin/doc/examples/exportXAO.py @@ -0,0 +1,20 @@ +from salome.shaper import model +import os + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) + +file_xao = os.path.join(os.getenv("DATA_DIR"), "test.xao") +Export_1 = model.exportToXAO(Part_1_doc, file_xao, + model.selection("SOLID", "Box_1_1"), "author", "box") + +file_xao = os.path.join(os.getenv("DATA_DIR"), "test1.xao") +file_brep = os.path.join(os.getenv("DATA_DIR"), "test1_shape.brep") +Export_2 = model.exportToXAO(Part_1_doc, file_xao, + model.selection("SOLID", "Box_1_1"), "author", "box", + file_brep) +model.do() +model.end() diff --git a/src/ExchangePlugin/doc/exportFeature.rst b/src/ExchangePlugin/doc/exportFeature.rst index 072c9495a..e8f88c2d3 100644 --- a/src/ExchangePlugin/doc/exportFeature.rst +++ b/src/ExchangePlugin/doc/exportFeature.rst @@ -95,8 +95,6 @@ In case of first choice the format of exported file will be defined according to Selection list in the property panel contains a list of exported objects which can be selected in a viewer or object browser. -*Note*: For XAO format, selection list is not available, the whole part is exported. - **Apply** button exports the file. **Cancel** button cancels the operation. @@ -109,15 +107,48 @@ Selection list in the property panel contains a list of exported objects which c :param string: The file name :param list: A list of exporting objects +Result +"""""" + +The Result of operation is an exported file. + +**See Also** a sample TUI Script of :ref:`tui_export_file` operation. + + +Export to XAO +""""""""""""" +In this case, the following property panel will be opened: + +.. figure:: images/ExportXAO.png + :align: center + + **Dialog box to export in XAO format** -.. py:function:: model.exportToXAO(Part_doc, FileNameString, Author="", GeometryName="") -.. py:function:: model.exportToXAO(Part_doc, FileNameString, Object, Author="", GeometryName="") +The file name and path can be defined in **Export file** field by direct input or browsing with **'...'** button, which opens **Export file** dialog box + +*Note*: For XAO format, selection list is not available, the whole part is exported. + +**Author** Author name, empty by default + +**Geometry name** Geometry name, empty by default + +**Export shape in a separate file** if checked, shape will be exported in a separate BREP file with path = + ".brep" + +**Apply** button exports the file. + +**Cancel** button cancels the operation. + +**TUI Command**: + +.. py:function:: model.exportToXAO(Part_doc, FileNameString, Author="", GeometryName="", ShapeFile="") +.. py:function:: model.exportToXAO(Part_doc, FileNameString, Object, Author="", GeometryName="", ShapeFile="") :param part: The current part object :param string: The file name :param object: An exporting object, if necessary :param string: The name of the author, empty by default :param string: The name for the shape processed in GEOMETRY module, empty by default + :param string: The shape file name. If not empty, shape data will be stored in a separate BREP file, given by this parameter .. py:function:: aBuffer = model.exportToXAOMem(Part_doc, Object, Author="", GeometryName="") @@ -127,12 +158,14 @@ Selection list in the property panel contains a list of exported objects which c :param string: The name of the author, empty by default :param string: The name for the shape processed in GEOMETRY module, empty by default + Result """""" -The Result of operation is an exported file. +The Result of operation is an exported XAO file. + +**See Also** a sample TUI Script of :ref:`tui_export_file_XAO` operation. -**See Also** a sample TUI Script of :ref:`tui_export_file` operation. Export to STL """"""""""""" diff --git a/src/ExchangePlugin/doc/images/ExportXAO.png b/src/ExchangePlugin/doc/images/ExportXAO.png new file mode 100755 index 0000000000000000000000000000000000000000..395844242534f0f52b1f12bb5e7054e2f4acb831 GIT binary patch literal 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ho|A*`QPB-iS?q=OO)+ff|?^;jeBgXt#UMh#y7|vG#-22;4yGD#Vi=L1AoLBE%3BdnBI5zfK)_`Q5~(|0`9G=LBM| z-02b>Ygn*52@9K0(!+p~CFJKB4-tVqi%4oFJAk7A literal 0 HcmV?d00001 diff --git a/src/ExchangePlugin/export_widget.xml b/src/ExchangePlugin/export_widget.xml index 9eff85040..10f812867 100644 --- a/src/ExchangePlugin/export_widget.xml +++ b/src/ExchangePlugin/export_widget.xml @@ -24,12 +24,13 @@ - + placeholder="Please input the author"/> - + placeholder="Please input the geometry name"/> + & theShape, //============================================================================= bool XAOExport(const std::string& theFileName, XAO::Xao* theXao, - std::string& theError) + std::string& theError, + const std::string& theShapeFileName) { #ifdef _DEBUG std::cout << "Export XAO into file " << theFileName << std::endl; @@ -72,7 +73,7 @@ bool XAOExport(const std::string& theFileName, bool aWasFree = aShape.Free(); // make top level topology free, same as imported if (!aWasFree) aShape.Free(Standard_True); - XAO::XaoExporter::saveToFile(theXao, theFileName, ""); + XAO::XaoExporter::saveToFile(theXao, theFileName, theShapeFileName); if (!aWasFree) aShape.Free(Standard_False); } catch (XAO::XAO_Exception& e) { diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_XAOExport.h b/src/GeomAlgoAPI/GeomAlgoAPI_XAOExport.h index d4ec4430b..ed135020f 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_XAOExport.h +++ b/src/GeomAlgoAPI/GeomAlgoAPI_XAOExport.h @@ -40,7 +40,8 @@ bool SetShapeToXAO(const std::shared_ptr& theShape, GEOMALGOAPI_EXPORT bool XAOExport(const std::string& theFileName, XAO::Xao* theXao, - std::string& theError); + std::string& theError, + const std::string& theShapeFileName = std::string()); /// Implementation of the export XAO to memory buffer (std::string) GEOMALGOAPI_EXPORT diff --git a/src/ModelHighAPI/ModelHighAPI_Macro.h b/src/ModelHighAPI/ModelHighAPI_Macro.h index 14f187163..3d6f716bb 100644 --- a/src/ModelHighAPI/ModelHighAPI_Macro.h +++ b/src/ModelHighAPI/ModelHighAPI_Macro.h @@ -535,182 +535,9 @@ SET_ATTRIBUTE(N_13, T_13, AN_13) \ END_INIT() \ public: -//-------------------------------------------------------------------------------------- -#define INTERFACE_15(KIND, \ - N_0, AN_0, T_0, C_0, \ - N_1, AN_1, T_1, C_1, \ - N_2, AN_2, T_2, C_2, \ - N_3, AN_3, T_3, C_3, \ - N_4, AN_4, T_4, C_4, \ - N_5, AN_5, T_5, C_5, \ - N_6, AN_6, T_6, C_6, \ - N_7, AN_7, T_7, C_7, \ - N_8, AN_8, T_8, C_8, \ - N_9, AN_9, T_9, C_9, \ - N_10, AN_10, T_10, C_10, \ - N_11, AN_11, T_11, C_11, \ - N_12, AN_12, T_12, C_12, \ - N_13, AN_13, T_13, C_13, \ - N_14, AN_14, T_14, C_14) \ - public: \ - INTERFACE_COMMON(KIND) \ - DEFINE_ATTRIBUTE(N_0, T_0, C_0) \ - DEFINE_ATTRIBUTE(N_1, T_1, C_1) \ - DEFINE_ATTRIBUTE(N_2, T_2, C_2) \ - DEFINE_ATTRIBUTE(N_3, T_3, C_3) \ - DEFINE_ATTRIBUTE(N_4, T_4, C_4) \ - DEFINE_ATTRIBUTE(N_5, T_5, C_5) \ - DEFINE_ATTRIBUTE(N_6, T_6, C_6) \ - DEFINE_ATTRIBUTE(N_7, T_7, C_7) \ - DEFINE_ATTRIBUTE(N_8, T_8, C_8) \ - DEFINE_ATTRIBUTE(N_9, T_9, C_9) \ - DEFINE_ATTRIBUTE(N_10, T_10, C_10) \ - DEFINE_ATTRIBUTE(N_11, T_11, C_11) \ - DEFINE_ATTRIBUTE(N_12, T_12, C_12) \ - DEFINE_ATTRIBUTE(N_13, T_13, C_13) \ - DEFINE_ATTRIBUTE(N_14, T_14, C_14) \ - protected: \ - START_INIT() \ - SET_ATTRIBUTE(N_0, T_0, AN_0) \ - SET_ATTRIBUTE(N_1, T_1, AN_1) \ - SET_ATTRIBUTE(N_2, T_2, AN_2) \ - SET_ATTRIBUTE(N_3, T_3, AN_3) \ - SET_ATTRIBUTE(N_4, T_4, AN_4) \ - SET_ATTRIBUTE(N_5, T_5, AN_5) \ - SET_ATTRIBUTE(N_6, T_6, AN_6) \ - SET_ATTRIBUTE(N_7, T_7, AN_7) \ - SET_ATTRIBUTE(N_8, T_8, AN_8) \ - SET_ATTRIBUTE(N_9, T_9, AN_9) \ - SET_ATTRIBUTE(N_10, T_10, AN_10) \ - SET_ATTRIBUTE(N_11, T_11, AN_11) \ - SET_ATTRIBUTE(N_12, T_12, AN_12) \ - SET_ATTRIBUTE(N_13, T_13, AN_13) \ - SET_ATTRIBUTE(N_14, T_14, AN_14) \ - END_INIT() \ - public: //-------------------------------------------------------------------------------------- -#define INTERFACE_16(KIND, \ - N_0, AN_0, T_0, C_0, \ - N_1, AN_1, T_1, C_1, \ - N_2, AN_2, T_2, C_2, \ - N_3, AN_3, T_3, C_3, \ - N_4, AN_4, T_4, C_4, \ - N_5, AN_5, T_5, C_5, \ - N_6, AN_6, T_6, C_6, \ - N_7, AN_7, T_7, C_7, \ - N_8, AN_8, T_8, C_8, \ - N_9, AN_9, T_9, C_9, \ - N_10, AN_10, T_10, C_10, \ - N_11, AN_11, T_11, C_11, \ - N_12, AN_12, T_12, C_12, \ - N_13, AN_13, T_13, C_13, \ - N_14, AN_14, T_14, C_14, \ - N_15, AN_15, T_15, C_15) \ - public: \ - INTERFACE_COMMON(KIND) \ - DEFINE_ATTRIBUTE(N_0, T_0, C_0) \ - DEFINE_ATTRIBUTE(N_1, T_1, C_1) \ - DEFINE_ATTRIBUTE(N_2, T_2, C_2) \ - DEFINE_ATTRIBUTE(N_3, T_3, C_3) \ - DEFINE_ATTRIBUTE(N_4, T_4, C_4) \ - DEFINE_ATTRIBUTE(N_5, T_5, C_5) \ - DEFINE_ATTRIBUTE(N_6, T_6, C_6) \ - DEFINE_ATTRIBUTE(N_7, T_7, C_7) \ - DEFINE_ATTRIBUTE(N_8, T_8, C_8) \ - DEFINE_ATTRIBUTE(N_9, T_9, C_9) \ - DEFINE_ATTRIBUTE(N_10, T_10, C_10) \ - DEFINE_ATTRIBUTE(N_11, T_11, C_11) \ - DEFINE_ATTRIBUTE(N_12, T_12, C_12) \ - DEFINE_ATTRIBUTE(N_13, T_13, C_13) \ - DEFINE_ATTRIBUTE(N_14, T_14, C_14) \ - DEFINE_ATTRIBUTE(N_15, T_15, C_15) \ - protected: \ - START_INIT() \ - SET_ATTRIBUTE(N_0, T_0, AN_0) \ - SET_ATTRIBUTE(N_1, T_1, AN_1) \ - SET_ATTRIBUTE(N_2, T_2, AN_2) \ - SET_ATTRIBUTE(N_3, T_3, AN_3) \ - SET_ATTRIBUTE(N_4, T_4, AN_4) \ - SET_ATTRIBUTE(N_5, T_5, AN_5) \ - SET_ATTRIBUTE(N_6, T_6, AN_6) \ - SET_ATTRIBUTE(N_7, T_7, AN_7) \ - SET_ATTRIBUTE(N_8, T_8, AN_8) \ - SET_ATTRIBUTE(N_9, T_9, AN_9) \ - SET_ATTRIBUTE(N_10, T_10, AN_10) \ - SET_ATTRIBUTE(N_11, T_11, AN_11) \ - SET_ATTRIBUTE(N_12, T_12, AN_12) \ - SET_ATTRIBUTE(N_13, T_13, AN_13) \ - SET_ATTRIBUTE(N_14, T_14, AN_14) \ - SET_ATTRIBUTE(N_15, T_15, AN_15) \ - END_INIT() \ - public: - -//-------------------------------------------------------------------------------------- -#define INTERFACE_18(KIND, \ - N_0, AN_0, T_0, C_0, \ - N_1, AN_1, T_1, C_1, \ - N_2, AN_2, T_2, C_2, \ - N_3, AN_3, T_3, C_3, \ - N_4, AN_4, T_4, C_4, \ - N_5, AN_5, T_5, C_5, \ - N_6, AN_6, T_6, C_6, \ - N_7, AN_7, T_7, C_7, \ - N_8, AN_8, T_8, C_8, \ - N_9, AN_9, T_9, C_9, \ - N_10, AN_10, T_10, C_10, \ - N_11, AN_11, T_11, C_11, \ - N_12, AN_12, T_12, C_12, \ - N_13, AN_13, T_13, C_13, \ - N_14, AN_14, T_14, C_14, \ - N_15, AN_15, T_15, C_15, \ - N_16, AN_16, T_16, C_16, \ - N_17, AN_17, T_17, C_17) \ - public: \ - INTERFACE_COMMON(KIND) \ - DEFINE_ATTRIBUTE(N_0, T_0, C_0) \ - DEFINE_ATTRIBUTE(N_1, T_1, C_1) \ - DEFINE_ATTRIBUTE(N_2, T_2, C_2) \ - DEFINE_ATTRIBUTE(N_3, T_3, C_3) \ - DEFINE_ATTRIBUTE(N_4, T_4, C_4) \ - DEFINE_ATTRIBUTE(N_5, T_5, C_5) \ - DEFINE_ATTRIBUTE(N_6, T_6, C_6) \ - DEFINE_ATTRIBUTE(N_7, T_7, C_7) \ - DEFINE_ATTRIBUTE(N_8, T_8, C_8) \ - DEFINE_ATTRIBUTE(N_9, T_9, C_9) \ - DEFINE_ATTRIBUTE(N_10, T_10, C_10) \ - DEFINE_ATTRIBUTE(N_11, T_11, C_11) \ - DEFINE_ATTRIBUTE(N_12, T_12, C_12) \ - DEFINE_ATTRIBUTE(N_13, T_13, C_13) \ - DEFINE_ATTRIBUTE(N_14, T_14, C_14) \ - DEFINE_ATTRIBUTE(N_15, T_15, C_15) \ - DEFINE_ATTRIBUTE(N_16, T_16, C_16) \ - DEFINE_ATTRIBUTE(N_17, T_17, C_17) \ - protected: \ - START_INIT() \ - SET_ATTRIBUTE(N_0, T_0, AN_0) \ - SET_ATTRIBUTE(N_1, T_1, AN_1) \ - SET_ATTRIBUTE(N_2, T_2, AN_2) \ - SET_ATTRIBUTE(N_3, T_3, AN_3) \ - SET_ATTRIBUTE(N_4, T_4, AN_4) \ - SET_ATTRIBUTE(N_5, T_5, AN_5) \ - SET_ATTRIBUTE(N_6, T_6, AN_6) \ - SET_ATTRIBUTE(N_7, T_7, AN_7) \ - SET_ATTRIBUTE(N_8, T_8, AN_8) \ - SET_ATTRIBUTE(N_9, T_9, AN_9) \ - SET_ATTRIBUTE(N_10, T_10, AN_10) \ - SET_ATTRIBUTE(N_11, T_11, AN_11) \ - SET_ATTRIBUTE(N_12, T_12, AN_12) \ - SET_ATTRIBUTE(N_13, T_13, AN_13) \ - SET_ATTRIBUTE(N_14, T_14, AN_14) \ - SET_ATTRIBUTE(N_15, T_15, AN_15) \ - SET_ATTRIBUTE(N_16, T_16, AN_16) \ - SET_ATTRIBUTE(N_17, T_17, AN_17) \ - END_INIT() \ - public: - -//-------------------------------------------------------------------------------------- -#define INTERFACE_20(KIND, \ +#define INTERFACE_17(KIND, \ N_0, AN_0, T_0, C_0, \ N_1, AN_1, T_1, C_1, \ N_2, AN_2, T_2, C_2, \ @@ -727,10 +554,7 @@ N_13, AN_13, T_13, C_13, \ N_14, AN_14, T_14, C_14, \ N_15, AN_15, T_15, C_15, \ - N_16, AN_16, T_16, C_16, \ - N_17, AN_17, T_17, C_17, \ - N_18, AN_18, T_18, C_18, \ - N_19, AN_19, T_19, C_19) \ + N_16, AN_16, T_16, C_16) \ public: \ INTERFACE_COMMON(KIND) \ DEFINE_ATTRIBUTE(N_0, T_0, C_0) \ @@ -750,9 +574,6 @@ DEFINE_ATTRIBUTE(N_14, T_14, C_14) \ DEFINE_ATTRIBUTE(N_15, T_15, C_15) \ DEFINE_ATTRIBUTE(N_16, T_16, C_16) \ - DEFINE_ATTRIBUTE(N_17, T_17, C_17) \ - DEFINE_ATTRIBUTE(N_18, T_18, C_18) \ - DEFINE_ATTRIBUTE(N_19, T_19, C_19) \ protected: \ START_INIT() \ SET_ATTRIBUTE(N_0, T_0, AN_0) \ @@ -772,9 +593,6 @@ SET_ATTRIBUTE(N_14, T_14, AN_14) \ SET_ATTRIBUTE(N_15, T_15, AN_15) \ SET_ATTRIBUTE(N_16, T_16, AN_16) \ - SET_ATTRIBUTE(N_17, T_17, AN_17) \ - SET_ATTRIBUTE(N_18, T_18, AN_18) \ - SET_ATTRIBUTE(N_19, T_19, AN_19) \ END_INIT() \ public: @@ -850,87 +668,6 @@ END_INIT() \ public: -//-------------------------------------------------------------------------------------- -#define INTERFACE_24(KIND, \ - N_0, AN_0, T_0, C_0, \ - N_1, AN_1, T_1, C_1, \ - N_2, AN_2, T_2, C_2, \ - N_3, AN_3, T_3, C_3, \ - N_4, AN_4, T_4, C_4, \ - N_5, AN_5, T_5, C_5, \ - N_6, AN_6, T_6, C_6, \ - N_7, AN_7, T_7, C_7, \ - N_8, AN_8, T_8, C_8, \ - N_9, AN_9, T_9, C_9, \ - N_10, AN_10, T_10, C_10, \ - N_11, AN_11, T_11, C_11, \ - N_12, AN_12, T_12, C_12, \ - N_13, AN_13, T_13, C_13, \ - N_14, AN_14, T_14, C_14, \ - N_15, AN_15, T_15, C_15, \ - N_16, AN_16, T_16, C_16, \ - N_17, AN_17, T_17, C_17, \ - N_18, AN_18, T_18, C_18, \ - N_19, AN_19, T_19, C_19, \ - N_20, AN_20, T_20, C_20, \ - N_21, AN_21, T_21, C_21, \ - N_22, AN_22, T_22, C_22, \ - N_23, AN_23, T_23, C_23) \ - public: \ - INTERFACE_COMMON(KIND) \ - DEFINE_ATTRIBUTE(N_0, T_0, C_0) \ - DEFINE_ATTRIBUTE(N_1, T_1, C_1) \ - DEFINE_ATTRIBUTE(N_2, T_2, C_2) \ - DEFINE_ATTRIBUTE(N_3, T_3, C_3) \ - DEFINE_ATTRIBUTE(N_4, T_4, C_4) \ - DEFINE_ATTRIBUTE(N_5, T_5, C_5) \ - DEFINE_ATTRIBUTE(N_6, T_6, C_6) \ - DEFINE_ATTRIBUTE(N_7, T_7, C_7) \ - DEFINE_ATTRIBUTE(N_8, T_8, C_8) \ - DEFINE_ATTRIBUTE(N_9, T_9, C_9) \ - DEFINE_ATTRIBUTE(N_10, T_10, C_10) \ - DEFINE_ATTRIBUTE(N_11, T_11, C_11) \ - DEFINE_ATTRIBUTE(N_12, T_12, C_12) \ - DEFINE_ATTRIBUTE(N_13, T_13, C_13) \ - DEFINE_ATTRIBUTE(N_14, T_14, C_14) \ - DEFINE_ATTRIBUTE(N_15, T_15, C_15) \ - DEFINE_ATTRIBUTE(N_16, T_16, C_16) \ - DEFINE_ATTRIBUTE(N_17, T_17, C_17) \ - DEFINE_ATTRIBUTE(N_18, T_18, C_18) \ - DEFINE_ATTRIBUTE(N_19, T_19, C_19) \ - DEFINE_ATTRIBUTE(N_20, T_20, C_20) \ - DEFINE_ATTRIBUTE(N_21, T_21, C_21) \ - DEFINE_ATTRIBUTE(N_22, T_22, C_22) \ - DEFINE_ATTRIBUTE(N_23, T_23, C_23) \ - protected: \ - START_INIT() \ - SET_ATTRIBUTE(N_0, T_0, AN_0) \ - SET_ATTRIBUTE(N_1, T_1, AN_1) \ - SET_ATTRIBUTE(N_2, T_2, AN_2) \ - SET_ATTRIBUTE(N_3, T_3, AN_3) \ - SET_ATTRIBUTE(N_4, T_4, AN_4) \ - SET_ATTRIBUTE(N_5, T_5, AN_5) \ - SET_ATTRIBUTE(N_6, T_6, AN_6) \ - SET_ATTRIBUTE(N_7, T_7, AN_7) \ - SET_ATTRIBUTE(N_8, T_8, AN_8) \ - SET_ATTRIBUTE(N_9, T_9, AN_9) \ - SET_ATTRIBUTE(N_10, T_10, AN_10) \ - SET_ATTRIBUTE(N_11, T_11, AN_11) \ - SET_ATTRIBUTE(N_12, T_12, AN_12) \ - SET_ATTRIBUTE(N_13, T_13, AN_13) \ - SET_ATTRIBUTE(N_14, T_14, AN_14) \ - SET_ATTRIBUTE(N_15, T_15, AN_15) \ - SET_ATTRIBUTE(N_16, T_16, AN_16) \ - SET_ATTRIBUTE(N_17, T_17, AN_17) \ - SET_ATTRIBUTE(N_18, T_18, AN_18) \ - SET_ATTRIBUTE(N_19, T_19, AN_19) \ - SET_ATTRIBUTE(N_20, T_20, AN_20) \ - SET_ATTRIBUTE(N_21, T_21, AN_21) \ - SET_ATTRIBUTE(N_22, T_22, AN_22) \ - SET_ATTRIBUTE(N_23, T_23, AN_23) \ - END_INIT() \ - public: - //-------------------------------------------------------------------------------------- #define INTERFACE_25(KIND, \ N_0, AN_0, T_0, C_0, \ @@ -1015,96 +752,5 @@ END_INIT() \ public: - -//-------------------------------------------------------------------------------------- -#define INTERFACE_27(KIND, \ - N_0, AN_0, T_0, C_0, \ - N_1, AN_1, T_1, C_1, \ - N_2, AN_2, T_2, C_2, \ - N_3, AN_3, T_3, C_3, \ - N_4, AN_4, T_4, C_4, \ - N_5, AN_5, T_5, C_5, \ - N_6, AN_6, T_6, C_6, \ - N_7, AN_7, T_7, C_7, \ - N_8, AN_8, T_8, C_8, \ - N_9, AN_9, T_9, C_9, \ - N_10, AN_10, T_10, C_10, \ - N_11, AN_11, T_11, C_11, \ - N_12, AN_12, T_12, C_12, \ - N_13, AN_13, T_13, C_13, \ - N_14, AN_14, T_14, C_14, \ - N_15, AN_15, T_15, C_15, \ - N_16, AN_16, T_16, C_16, \ - N_17, AN_17, T_17, C_17, \ - N_18, AN_18, T_18, C_18, \ - N_19, AN_19, T_19, C_19, \ - N_20, AN_20, T_20, C_20, \ - N_21, AN_21, T_21, C_21, \ - N_22, AN_22, T_22, C_22, \ - N_23, AN_23, T_23, C_23, \ - N_24, AN_24, T_24, C_24, \ - N_25, AN_25, T_25, C_25, \ - N_26, AN_26, T_26, C_26) \ - public: \ - INTERFACE_COMMON(KIND) \ - DEFINE_ATTRIBUTE(N_0, T_0, C_0) \ - DEFINE_ATTRIBUTE(N_1, T_1, C_1) \ - DEFINE_ATTRIBUTE(N_2, T_2, C_2) \ - DEFINE_ATTRIBUTE(N_3, T_3, C_3) \ - DEFINE_ATTRIBUTE(N_4, T_4, C_4) \ - DEFINE_ATTRIBUTE(N_5, T_5, C_5) \ - DEFINE_ATTRIBUTE(N_6, T_6, C_6) \ - DEFINE_ATTRIBUTE(N_7, T_7, C_7) \ - DEFINE_ATTRIBUTE(N_8, T_8, C_8) \ - DEFINE_ATTRIBUTE(N_9, T_9, C_9) \ - DEFINE_ATTRIBUTE(N_10, T_10, C_10) \ - DEFINE_ATTRIBUTE(N_11, T_11, C_11) \ - DEFINE_ATTRIBUTE(N_12, T_12, C_12) \ - DEFINE_ATTRIBUTE(N_13, T_13, C_13) \ - DEFINE_ATTRIBUTE(N_14, T_14, C_14) \ - DEFINE_ATTRIBUTE(N_15, T_15, C_15) \ - DEFINE_ATTRIBUTE(N_16, T_16, C_16) \ - DEFINE_ATTRIBUTE(N_17, T_17, C_17) \ - DEFINE_ATTRIBUTE(N_18, T_18, C_18) \ - DEFINE_ATTRIBUTE(N_19, T_19, C_19) \ - DEFINE_ATTRIBUTE(N_20, T_20, C_20) \ - DEFINE_ATTRIBUTE(N_21, T_21, C_21) \ - DEFINE_ATTRIBUTE(N_22, T_22, C_22) \ - DEFINE_ATTRIBUTE(N_23, T_23, C_23) \ - DEFINE_ATTRIBUTE(N_24, T_24, C_24) \ - DEFINE_ATTRIBUTE(N_25, T_25, C_25) \ - DEFINE_ATTRIBUTE(N_26, T_26, C_26) \ - protected: \ - START_INIT() \ - SET_ATTRIBUTE(N_0, T_0, AN_0) \ - SET_ATTRIBUTE(N_1, T_1, AN_1) \ - SET_ATTRIBUTE(N_2, T_2, AN_2) \ - SET_ATTRIBUTE(N_3, T_3, AN_3) \ - SET_ATTRIBUTE(N_4, T_4, AN_4) \ - SET_ATTRIBUTE(N_5, T_5, AN_5) \ - SET_ATTRIBUTE(N_6, T_6, AN_6) \ - SET_ATTRIBUTE(N_7, T_7, AN_7) \ - SET_ATTRIBUTE(N_8, T_8, AN_8) \ - SET_ATTRIBUTE(N_9, T_9, AN_9) \ - SET_ATTRIBUTE(N_10, T_10, AN_10) \ - SET_ATTRIBUTE(N_11, T_11, AN_11) \ - SET_ATTRIBUTE(N_12, T_12, AN_12) \ - SET_ATTRIBUTE(N_13, T_13, AN_13) \ - SET_ATTRIBUTE(N_14, T_14, AN_14) \ - SET_ATTRIBUTE(N_15, T_15, AN_15) \ - SET_ATTRIBUTE(N_16, T_16, AN_16) \ - SET_ATTRIBUTE(N_17, T_17, AN_17) \ - SET_ATTRIBUTE(N_18, T_18, AN_18) \ - SET_ATTRIBUTE(N_19, T_19, AN_19) \ - SET_ATTRIBUTE(N_20, T_20, AN_20) \ - SET_ATTRIBUTE(N_21, T_21, AN_21) \ - SET_ATTRIBUTE(N_22, T_22, AN_22) \ - SET_ATTRIBUTE(N_23, T_23, AN_23) \ - SET_ATTRIBUTE(N_24, T_24, AN_24) \ - SET_ATTRIBUTE(N_25, T_25, AN_25) \ - SET_ATTRIBUTE(N_26, T_26, AN_26) \ - END_INIT() \ - public: - //-------------------------------------------------------------------------------------- #endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_MACRO_H_ */ -- 2.39.2