Salome HOME
[bos #40620] [CEA] XAO export for SHAPER: Allow export of brep in a separate file
authorjfa <jfa@opencascade.com>
Mon, 19 Feb 2024 17:06:02 +0000 (17:06 +0000)
committerjfa <jfa@opencascade.com>
Mon, 4 Mar 2024 14:50:24 +0000 (14:50 +0000)
16 files changed:
src/ExchangeAPI/ExchangeAPI_Export.cpp
src/ExchangeAPI/ExchangeAPI_Export.h
src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp
src/ExchangePlugin/ExchangePlugin_ExportFeature.h
src/ExchangePlugin/ExchangePlugin_msg_fr.ts
src/ExchangePlugin/Test/TestExportToXAO_SeparateShapeFile.py [new file with mode: 0644]
src/ExchangePlugin/Test/tests.set
src/ExchangePlugin/doc/TUI_exportFeature.rst
src/ExchangePlugin/doc/examples/export.py
src/ExchangePlugin/doc/examples/exportXAO.py [new file with mode: 0644]
src/ExchangePlugin/doc/exportFeature.rst
src/ExchangePlugin/doc/images/ExportXAO.png [new file with mode: 0755]
src/ExchangePlugin/export_widget.xml
src/GeomAlgoAPI/GeomAlgoAPI_XAOExport.cpp
src/GeomAlgoAPI/GeomAlgoAPI_XAOExport.h
src/ModelHighAPI/ModelHighAPI_Macro.h

index 6d9193235abda17f75b2e8e2fb46fe810f0e2d0f..cda585a2d7ead5f4db7aadf1572f719d37ca10e7 100644 (file)
@@ -41,14 +41,17 @@ ExchangeAPI_Export::ExchangeAPI_Export(const std::shared_ptr<ModelAPI_Feature>&
 
 /// Constructor with values for XAO export.
 ExchangeAPI_Export::ExchangeAPI_Export(const std::shared_ptr<ModelAPI_Feature>& 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<ModelAPI_Feature>&
                                        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<ModelHighAPI_Selection> 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<ModelAPI_Document> & thePart,
 }
 
 ExportPtr exportToXAO(const std::shared_ptr<ModelAPI_Document> & 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<ModelAPI_Feature> 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<ModelAPI_Document> & thePart,
@@ -336,13 +343,14 @@ ExportPtr exportToXAO(const std::shared_ptr<ModelAPI_Document> & 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<ModelAPI_Feature> 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<ModelAPI_Document> & thePart,
index 4fc9be6026a3484824919e18f06852ad20b2f774..4500c95dbf9e7aa10defc96cfa21e8e1bfab4635 100644 (file)
@@ -54,7 +54,8 @@ public:
   explicit ExchangeAPI_Export(const std::shared_ptr<ModelAPI_Feature>& 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<ModelAPI_Document> & thePart,
  */
 EXCHANGEAPI_EXPORT
 ExportPtr exportToXAO(const std::shared_ptr<ModelAPI_Document> & 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<ModelAPI_Document> & 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.
index 3924fb73376db6af1bb9c53a4f193fc5a8c5b807..b536f54efffda46310111d1a82a450112e701059 100644 (file)
@@ -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()) {
index a3f6fb6518c9b66ef30e5b7b778a487d4237cabb..295aa7618f4a5e3fed26c73c4c395c629319fb97 100644 (file)
@@ -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()
   {
index cd29c1b85c5f421965a3c0e998dc752951743e6b..45b2343bff2376156593f2ee19564522a909a19a 100644 (file)
       <translation>Veuillez saisir le nom de la géométrie</translation>
     </message>
   </context>
+  <context>
+    <name>Export:xao_shape_file_separate</name>
+    <message>
+      <source>Export shape in a separate file</source>
+      <translation>Exporter la forme dans un fichier séparé</translation>
+    </message>
+  </context>
   <context>
     <name>Export:stl_absolute</name>
     <message>
diff --git a/src/ExchangePlugin/Test/TestExportToXAO_SeparateShapeFile.py b/src/ExchangePlugin/Test/TestExportToXAO_SeparateShapeFile.py
new file mode 100644 (file)
index 0000000..34a3f42
--- /dev/null
@@ -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()
index aae491066e96a683dd89cb142ffb5612708b15a4..2366564149d035571d8914f6ef914a414dcca89c 100755 (executable)
@@ -23,6 +23,7 @@ SET(TEST_NAMES
   Test2290.py
   Test2459.py
   Test18710.py
+  TestExportToXAO_SeparateShapeFile.py
   TestExportToXAOWithFields.py
   TestExportToXAOWithGroupNotUpdated.py
   TestExport_FiniteValidator.py
index 4ef25d686a06749ec653fc48cdbb1498739bdbda..6a76f3cadf39a56001edca505de00f701f4895a8 100644 (file)
@@ -10,6 +10,19 @@ Export File
 
 :download:`Download this script <examples/export.py>` 
 
+
+  .. _tui_export_file_XAO:
+
+Export XAO File
+===============
+
+.. literalinclude:: examples/exportXAO.py
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/exportXAO.py>` 
+
+
   .. _tui_export_file_STL:
 
 Export STL File
@@ -20,5 +33,3 @@ Export STL File
     :language: python
 
 :download:`Download this script <examples/exportSTL.py>` 
-   
-
index 2a807f26331339a59f3bc0dcc1abebc0e3ef35f6..1f9b7c2b5e125854519004e7cb67e49a3c5f198e 100644 (file)
@@ -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 (file)
index 0000000..757956c
--- /dev/null
@@ -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()
index 072c9495a5d719d167299cc956d2e013e1eea8a8..e8f88c2d371401beee40f5afc615aa952af1cf42 100644 (file)
@@ -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 = <XAO file name> + ".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 (executable)
index 0000000..3958442
Binary files /dev/null and b/src/ExchangePlugin/doc/images/ExportXAO.png differ
index 9eff85040c008dc8ac8d89b2b552d6298d60dac1..10f81286768eb8ce50804bc19db61244994a9bbe 100644 (file)
       </export_file_selector>
       <stringvalue id="xao_author"
                    label="Author"
-                   placeholder="Please input the author">
-      </stringvalue>
+                   placeholder="Please input the author"/>
       <stringvalue id="xao_geometry_name"
                    label="Geometry name"
-                   placeholder="Please input the geometry name">
-      </stringvalue>
+                   placeholder="Please input the geometry name"/>
+      <boolvalue id="xao_shape_file_separate"
+                 label="Export shape in a separate file"
+                 default="false"/>
     </case>
     <case id="XAOMem" title="XAOMem" internal="1">
       <stringvalue id="xao_author"
index af8da2b2d853e94aa782a9cb31dd78322fdb660c..73e17a19a341d8fd7b6d48fde4e9c5f5ded6c604 100644 (file)
@@ -55,7 +55,8 @@ bool SetShapeToXAO(const std::shared_ptr<GeomAPI_Shape>& 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) {
index d4ec4430b94385411f77a83c5d1096ad1ddfb2e4..ed135020fb7b9920202d0d6fd91dca942bd49b16 100644 (file)
@@ -40,7 +40,8 @@ bool SetShapeToXAO(const std::shared_ptr<GeomAPI_Shape>& 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
index 14f187163fec79e4b877996de6f3edae0e72e61f..3d6f716bbed07074a2177fa646d365766268c2f7 100644 (file)
       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, \
                      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) \
     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) \
       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:
 
     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, \
     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_ */