]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Documentation, refactoring and translation
authorJérôme <jerome.lucas@cesgenslab.fr>
Fri, 23 Oct 2020 15:20:32 +0000 (17:20 +0200)
committerJérôme <jerome.lucas@cesgenslab.fr>
Fri, 23 Oct 2020 15:20:32 +0000 (17:20 +0200)
15 files changed:
src/ExchangeAPI/ExchangeAPI_Import.cpp
src/ExchangePlugin/ExchangePlugin_Import.h
src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp
src/ExchangePlugin/ExchangePlugin_ImportFeature.h
src/ExchangePlugin/ExchangePlugin_msg_fr.ts
src/ExchangePlugin/doc/TUI_importFeature.rst
src/ExchangePlugin/doc/examples/importStep.py [new file with mode: 0644]
src/ExchangePlugin/doc/images/FileImportedSTEP.png [new file with mode: 0644]
src/ExchangePlugin/doc/images/ImportSTEP.png [new file with mode: 0644]
src/ExchangePlugin/doc/images/Import_panel.png
src/ExchangePlugin/doc/importFeature.rst
src/ExchangePlugin/plugin-Exchange.xml
src/GeomAlgoAPI/GeomAlgoAPI_STEPImport.cpp
src/GeomAlgoAPI/GeomAlgoAPI_STEPImportXCAF.cpp
src/GeomAlgoAPI/GeomAlgoAPI_STEPImportXCAF.h

index 70761000bb31071dc3e32765f9f442692ffb0898..13af1b262f118feb08aed62e05bb939e9d2dbd38 100644 (file)
@@ -29,7 +29,6 @@
 #include <ModelAPI_Session.h>
 #include <ModelAPI_Tools.h>
 #include <GeomAlgoAPI_Tools.h>
-
 //--------------------------------------------------------------------------------------
 #include <algorithm>
 
@@ -68,17 +67,17 @@ ExchangeAPI_Import::~ExchangeAPI_Import()
 
 //--------------------------------------------------------------------------------------
 void ExchangeAPI_Import::setParameters(const std::string & theFilePath,
-                                       const bool  anScalInterUnits,
-                                       const bool  anMaterials,
-                                       const bool  anColor)
+                                       const bool  theScalInterUnits,
+                                       const bool  theMaterials,
+                                       const bool  theColor)
 {
   fillAttribute(theFilePath, mystepfilePath);
   fillAttribute("STEP", feature()->string(ExchangePlugin_ImportFeature::IMPORT_TYPE_ID()));
-  fillAttribute(anScalInterUnits,
+  fillAttribute(theScalInterUnits,
                 feature()->boolean(ExchangePlugin_ImportFeature::STEP_SCALE_INTER_UNITS_ID()));
-  fillAttribute(anMaterials,
+  fillAttribute(theMaterials,
                 feature()->boolean(ExchangePlugin_ImportFeature::STEP_MATERIALS_ID()));
-  fillAttribute(anColor,
+  fillAttribute(theColor,
                 feature()->boolean(ExchangePlugin_ImportFeature::STEP_COLORS_ID()));
   execute();
 }
@@ -88,12 +87,8 @@ void ExchangeAPI_Import::setFilePath(const std::string & theFilePath)
 {
   fillAttribute(theFilePath, myfilePath);
   std::string anExtension = GeomAlgoAPI_Tools::File_Tools::extension(theFilePath);
-  if (anExtension == "STEP" || anExtension == "STP") {
-    setParameters(theFilePath,true,false,false);
-  }else{
-    fillAttribute(anExtension, feature()->string(ExchangePlugin_ImportFeature::IMPORT_TYPE_ID()));
-    execute();
-  }
+  fillAttribute(anExtension, feature()->string(ExchangePlugin_ImportFeature::IMPORT_TYPE_ID()));
+  execute();
 }
 
 //--------------------------------------------------------------------------------------
@@ -161,13 +156,13 @@ ImportPtr addImport(
 ImportPtr addImportStep(
     const std::shared_ptr<ModelAPI_Document> & thePart,
     const std::string & theFilePath,
-    const bool  anScalInterUnits,
-    const bool  anMaterials,
-    const bool  anColor )
+    const bool  theScalInterUnits,
+    const bool  theMaterials,
+    const bool  theColor )
 {
   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(ExchangeAPI_Import::ID());
   return ImportPtr(new ExchangeAPI_Import(aFeature, theFilePath,
-                                          anScalInterUnits, anMaterials, anColor));
+                                          theScalInterUnits, theMaterials, theColor));
 }
 
 void importPart(const std::shared_ptr<ModelAPI_Document> & thePart,
index 38d3e05e7b2e2dc48a87b9047c58f44c4decacb1..2babe4fbe827774178e3762d0c970a00709753fe 100644 (file)
@@ -102,7 +102,7 @@ class ExchangePlugin_Import : public ModelAPI_Feature
   /// attribute name of step colors
   inline static const std::string& STEP_COLORS_ID()
   {
-    static const std::string MY_STEP_COLORS_ID("step_colours");
+    static const std::string MY_STEP_COLORS_ID("step_colors");
     return MY_STEP_COLORS_ID;
   }
   /// Default constructor
index 5419e5ec8422aec69623f1d04816ab7d7d8ff130..0535c3888e406650a87cfc0525b3fe6d4c71a03a 100644 (file)
@@ -106,7 +106,6 @@ void ExchangePlugin_ImportFeature::initAttributes()
       getKind(), ExchangePlugin_ImportFeature::STEP_FILE_PATH_ID());
   ModelAPI_Session::get()->validators()->registerNotObligatory(
       getKind(), ExchangePlugin_ImportFeature::FILE_PATH_ID());
-      
 }
 
 /*
@@ -133,11 +132,11 @@ void ExchangePlugin_ImportFeature::execute()
 }
 
 std::shared_ptr<ModelAPI_ResultBody> ExchangePlugin_ImportFeature::createResultBody(
-                        std::shared_ptr<GeomAPI_Shape> aGeomShape)
+                        std::shared_ptr<GeomAPI_Shape> theGeomShape)
 {
   std::shared_ptr<ModelAPI_ResultBody> aResultBody = document()->createBody(data());
   //LoadNamingDS of the imported shape
-  loadNamingDS(aGeomShape, aResultBody);
+  loadNamingDS(theGeomShape, aResultBody);
   return aResultBody;
 }
 
@@ -160,7 +159,7 @@ void ExchangePlugin_ImportFeature::importFile(const std::string& theFileName)
   std::string anObjectName = GeomAlgoAPI_Tools::File_Tools::name(theFileName);
   data()->setName(Locale::Convert::toWString(anObjectName));
 
-  ResultBodyPtr result = document()->createBody(data());
+  ResultBodyPtr aResult = document()->createBody(data());
 
   bool anColorGroupSelected = boolean(ExchangePlugin_ImportFeature::STEP_COLORS_ID())->value();
   bool anMaterialsGroupSelected =
@@ -174,7 +173,7 @@ void ExchangePlugin_ImportFeature::importFile(const std::string& theFileName)
 
     try{
 
-      result->clearShapeNameAndColor();
+      aResult->clearShapeNameAndColor();
       // Process groups/fields
       std::shared_ptr<ModelAPI_AttributeRefList> aRefListOfGroups =
       std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(data()->attribute(FEATURES_ID()));
@@ -188,14 +187,14 @@ void ExchangePlugin_ImportFeature::importFile(const std::string& theFileName)
         document()->removeFeature(aFeature);
       }
 
-      aGeomShape = STEPImportAttributs(theFileName, result, anScalInterUnits,
+      aGeomShape = STEPImportAttributs(theFileName, aResult, anScalInterUnits,
                                        anMaterialsGroupSelected, anColorGroupSelected,
                                        theMaterialShape,anError);
 
     }
     catch (OSD_Exception& e) {
-        //Try to load STEP file without colors...
-        aGeomShape = STEPImport(theFileName, anExtension,anScalInterUnits,anError);
+      //Try to load STEP file without colors...
+      aGeomShape = STEPImport(theFileName, anExtension,anScalInterUnits,anError);
     }
   } else if (anExtension == "IGES" || anExtension == "IGS") {
     aGeomShape = IGESImport(theFileName, anExtension, anError);
@@ -211,20 +210,20 @@ void ExchangePlugin_ImportFeature::importFile(const std::string& theFileName)
 
   // Pass the results into the model
 
-  loadNamingDS(aGeomShape, result);
+  loadNamingDS(aGeomShape, aResult);
 
   // create color group
   if (anColorGroupSelected)
   {
-    setColorGroups(result);
+    setColorGroups(aResult);
   }
 
   // create Materiel group
   if (anMaterialsGroupSelected){
-    setMaterielGroup(result,theMaterialShape);
+    setMaterielGroup(aResult,theMaterialShape);
   }
 
-  setResult(result);
+  setResult(aResult);
 
 }
 
@@ -232,16 +231,15 @@ void ExchangePlugin_ImportFeature::setColorGroups(
                                     std::shared_ptr<ModelAPI_ResultBody> theResultBody)
 {
   std::vector<int> aColor;
-  int indice = 1;
+  int anIndice = 1;
   std::list< std::vector<int> > aColorsRead;
 
-
   ModelAPI_Tools::getColor(theResultBody, aColor);
   if (!aColor.empty() ){
-    std::wstringstream colorName;
-    colorName<<L"Color_"<<indice;
-    setColorGroup( theResultBody, aColor, colorName.str());
-    indice++;
+    std::wstringstream aColorName;
+    aColorName <<L"Color_"<< anIndice;
+    setColorGroup( theResultBody, aColor, aColorName.str());
+    anIndice++;
     aColorsRead.push_back(aColor);
   }
 
@@ -252,19 +250,20 @@ void ExchangePlugin_ImportFeature::setColorGroups(
     if (!aColor.empty() ){
         auto it = std::find(aColorsRead.begin(), aColorsRead.end(), aColor);
         if ( it == aColorsRead.end() ){
-             std::wstringstream colorName;
-            colorName<<L"Color_"<<indice;
-            setColorGroup(theResultBody, aColor, colorName.str());
-            indice++;
+             std::wstringstream aColorName;
+            aColorName<<L"Color_"<< anIndice;
+            setColorGroup(theResultBody, aColor, aColorName.str());
+            anIndice++;
             aColorsRead.push_back(aColor);
         }
     }
   }
 }
 
-void ExchangePlugin_ImportFeature::setColorGroup(std::shared_ptr<ModelAPI_ResultBody> theResultBody,
-                                                 std::vector<int> &theColor,
-                                                 const std::wstring& theName )
+void ExchangePlugin_ImportFeature::setColorGroup(
+                                        std::shared_ptr<ModelAPI_ResultBody> theResultBody,
+                                        std::vector<int> &theColor,
+                                        const std::wstring& theName )
 {
   std::vector<int> aColor;
   std::shared_ptr<ModelAPI_Feature> aGroupFeature = addFeature("Group");
@@ -311,17 +310,15 @@ void ExchangePlugin_ImportFeature::setColorGroup(std::shared_ptr<ModelAPI_Result
 }
 
 void ExchangePlugin_ImportFeature::setMaterielGroup(
-                                      std::shared_ptr<ModelAPI_ResultBody> theResultBody,
-                                      std::map< std::wstring,
-                                      std::list<std::wstring>> &theMaterialShape)
+                                std::shared_ptr<ModelAPI_ResultBody> theResultBody,
+                                std::map< std::wstring,std::list<std::wstring>> &theMaterialShape)
 {
-  int indice = 1;
-  std::map< std::wstring, std::list<std::wstring>>::iterator it;
-  for( it = theMaterialShape.begin(); it != theMaterialShape.end(); ++it) {
+  std::map< std::wstring, std::list<std::wstring>>::iterator anIt;
+  for( anIt = theMaterialShape.begin(); anIt != theMaterialShape.end(); ++anIt) {
 
     std::shared_ptr<ModelAPI_Feature> aGroupFeature = addFeature("Group");
     // group name
-    aGroupFeature->data()->setName((*it).first);
+    aGroupFeature->data()->setName((*anIt).first);
 
     // fill selection
     AttributeSelectionListPtr aSelectionList = aGroupFeature->selectionList("group_list");
@@ -332,8 +329,8 @@ void ExchangePlugin_ImportFeature::setMaterielGroup(
     for(std::list<ResultPtr>::iterator aRes = allRes.begin(); aRes != allRes.end(); ++aRes) {
 
       GeomShapePtr aShape = (*aRes)->shape();
-      for(std::list<std::wstring>::iterator aResMat = it->second.begin();
-                                 aResMat != it->second.end(); ++aResMat) {
+      for(std::list<std::wstring>::iterator aResMat = anIt->second.begin();
+                                 aResMat != anIt->second.end(); ++aResMat) {
         if( aRes->get() && ((*aRes)->data()->name() == (*aResMat)))
         {
           aSelectionList->append(theResultBody,aShape);
index e37ef83ec74b5e47cd0da0ad03b285fb52b6492f..93d551bf57aaf70705e81ac0f9dbf55132308d82 100644 (file)
@@ -83,7 +83,7 @@ class ExchangePlugin_ImportFeature : public ModelAPI_CompositeFeature
   /// attribute name of step colors
   inline static const std::string& STEP_COLORS_ID()
   {
-    static const std::string MY_STEP_COLORS_ID("step_colours");
+    static const std::string MY_STEP_COLORS_ID("step_colors");
     return MY_STEP_COLORS_ID;
   }
   /// Default constructor
index 110053a1d346ca8ad671f596bbdff6134f0b117b..72f1663eca902f45f7b1f6acea0d9e5f8067fec5 100644 (file)
       <translation>Importer</translation>
     </message>
     <message>
-      <source>Import a file</source>
-      <translation>Importer un fichier</translation>
+      <source>Create groups from</source>
+      <translation>créer des groupes à partir</translation>
     </message>
+    <message>
+    <source>Materials</source>
+    <translation>Matériels</translation>
+  </message>
   </context>
   <context>
     <name>Import:file_path</name>
       <translation>Importer un fichier</translation>
     </message>
   </context>
-
+  <context>
+    <name>Import:step_file_path</name>
+    <message>
+      <source>Import file</source>
+      <translation>Importer un fichier</translation>
+    </message>
+  </context>
+  <context>
+  <name>Import:step_scale_inter_units</name>
+  <message>
+    <source>Scale to International System of Units</source>
+    <translation>Mettre àl'échelle du système international d'unités</translation>
+  </message>
+  </context>
+  <name>Import:step_materials</name>
+  <message>
+    <source>Materials</source>
+    <translation>Matériels</translation>
+  </message>
+  </context>
+  <context>
+  <name>Import:step_materials</name>
+  <message>
+    <source>Colors</source>
+    <translation>Couleurs</translation>
+  </message>
+  </context>
   <context>
     <name>ImportMacro</name>
     <message>
       <translation>Importer un fichier</translation>
     </message>
   </context>
+  <message>
+      <source>Create groups from</source>
+      <translation>créer des groupes à partir</translation>
+    </message>
   <context>
     <name>ImportMacro:target_part</name>
     <message>
       <translation>Importer vers</translation>
     </message>
   </context>
+  <context>
+    <name>ImportMacro:step_target_part</name>
+    <message>
+      <source>Import to</source>
+      <translation>Importer vers</translation>
+    </message>
+  </context>
+  <context>
+    <name>ImportMacro:step_scale_inter_units</name>
+    <message>
+      <source>Scale to International System of Units</source>
+      <translation>Mettre àl'échelle du système international d'unités</translation>
+    </message>
+  </context>
+  <name>Import:step_materials</name>
+  <message>
+    <source>Materials</source>
+    <translation>Matériels</translation>
+  </message>
+  </context>
+  <context>
+  <name>Import:step_materials</name>
+  <message>
+    <source>Colors</source>
+    <translation>Couleurs</translation>
+  </message>
+  </context>
   <context>
     <name>ImportMacro:file_path</name>
     <message>
       <translation>Fichier à importer</translation>
     </message>
   </context>
+  <context>
+  <name>ImportMacro:step_file_path</name>
+  <message>
+    <source>Import file</source>
+    <translation>Importer un fichier</translation>
+  </message>
+</context>
+<context>
   <context>
     <name>ImportMacro:file_path:ExchangePlugin_ImportFormat</name>
     <message>
index 69ed88ab609d8f83c9ea667ac5d6eb41b9957ce4..af78d3d83abe95c1dbaa97a8a5dbba261fb337ad 100644 (file)
@@ -10,3 +10,13 @@ Import File
 
 :download:`Download this script <examples/import.py>` 
    
+  .. _tui_import_file_step:
+
+Import STEP File
+================
+
+.. literalinclude:: examples/importStep.py
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/importStep.py>` 
\ No newline at end of file
diff --git a/src/ExchangePlugin/doc/examples/importStep.py b/src/ExchangePlugin/doc/examples/importStep.py
new file mode 100644 (file)
index 0000000..f6a8128
--- /dev/null
@@ -0,0 +1,10 @@
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Import_1 = model.addImportStep(Part_1_doc,
+              "/SOURCES/SAMPLES/Shapes/Step/black_and_white.step", True, True, True)
+model.do()
+model.end()
diff --git a/src/ExchangePlugin/doc/images/FileImportedSTEP.png b/src/ExchangePlugin/doc/images/FileImportedSTEP.png
new file mode 100644 (file)
index 0000000..d4f171d
Binary files /dev/null and b/src/ExchangePlugin/doc/images/FileImportedSTEP.png differ
diff --git a/src/ExchangePlugin/doc/images/ImportSTEP.png b/src/ExchangePlugin/doc/images/ImportSTEP.png
new file mode 100644 (file)
index 0000000..457d02d
Binary files /dev/null and b/src/ExchangePlugin/doc/images/ImportSTEP.png differ
index c22176e77e563cfcbf33db7c5d208c19e9076206..4d610af44702c482d7fd467e66b1cb2d14779524 100644 (file)
Binary files a/src/ExchangePlugin/doc/images/Import_panel.png and b/src/ExchangePlugin/doc/images/Import_panel.png differ
index 4692ec6690d7e14f34ec1133dd4559b28a62f482..a133b2f842f5e6adf34ece41b378318c436f61f8 100644 (file)
@@ -67,6 +67,8 @@ The following property panel will be opened:
 
    **Import property panel**
 
+The first combobox provides the list of formats avalables (BREP, XAO, IGES or STEP).
+
 The **Import to** combobox provides the list of destinations (one of existing Parts or a new Part).
 
 In this panel it is possible to enter a file name directly or press **'...'** button and browse it with help of import file dialog box:
@@ -75,7 +77,11 @@ In this panel it is possible to enter a file name directly or press **'...'** bu
    :align: center
 
    **Dialog box to import CAD-neutral format**
-  
+
+Import BREP, XAO, IGES
+"""""""""""""""""""""" 
+In case of first choice the format of imported file will be defined according to file extension.
+
 **Apply** button imports the file.
   
 **Cancel** button cancels the operation.
@@ -98,3 +104,45 @@ The Result of the operation depends on the imported file content.
    Import of BREP file.
 
 **See Also** a sample TUI Script of :ref:`tui_import_file` operation.
+
+
+Import STEP
+""""""""""" 
+
+In this case, the following property panel will be opened:
+
+.. figure:: images/ImportSTEP.png
+   :align: center
+
+   **Dialog box to import file in STEP format**
+
+
+The file name and path can be defined in **Import file** field by direct input or browsing with ‘…’ button, which opens **Import file** dialog box.
+The **Import to** combobox provides the list of destinations (one of existing Parts or a new Part).
+**STEP options** provide the possibility to **Scale to International System Units** as well as to create groups from **Materials** and/or **Colours** if defined in assemblies of the file to import.
+
+**Apply** button imports the file.
+  
+**Cancel** button cancels the operation.
+
+**TUI Command**:
+
+.. py:function:: model.addImportStep(Part_doc, FileNameString,scalInterUnits,materials,colors)
+
+    :param part: The current part object
+    :param string: A file name string.
+    :param scalInterUnits: True if scale to UIS
+    :param materials: True to create groups from materials
+    :param colors: True to create groups from colors
+
+Result
+""""""
+
+The Result of the operation depends on the imported file content.
+
+.. figure:: images/FileImportedSTEP.png
+   :align: center
+
+   Import of STEP file.
+
+**See Also** a sample TUI Script of :ref:`tui_import_file_step` operation.
index 275ceb69b6bd113c6fe5d631875189d48d51eadf..7ebebc84491dbb909efb6f37e37919e623d5ac8c 100644 (file)
@@ -30,8 +30,8 @@
                 <boolvalue id="step_materials"
                           label="Materials"
                           default="false"/>
-                <boolvalue id="step_colours"
-                          label="Colours"
+                <boolvalue id="step_colors"
+                          label="Colors"
                           default="false"/>
               </groupbox>
             </groupbox>
index 38a1929a5d8503242a525fabe1e8a6a31977bd96..5fdb7f68799d5b0f20111ab2a8709d085ab87c4e 100644 (file)
@@ -76,7 +76,7 @@
 
 std::shared_ptr<GeomAPI_Shape> STEPImport(const std::string& theFileName,
                                           const std::string& theFormatName,
-                                          const bool  anScalInterUnits,
+                                          const bool theScalInterUnits,
                                           std::string& theError)
 {
 
@@ -104,7 +104,7 @@ std::shared_ptr<GeomAPI_Shape> STEPImport(const std::string& theFileName,
     if (status == IFSelect_RetDone) {
 
       // Regard or not the model units
-      if (!anScalInterUnits) {
+      if (!theScalInterUnits) {
         // set UnitFlag to units from file
         TColStd_SequenceOfAsciiString anUnitLengthNames;
         TColStd_SequenceOfAsciiString anUnitAngleNames;
@@ -213,9 +213,9 @@ std::shared_ptr<GeomAPI_Shape> STEPImport(const std::string& theFileName,
 
 std::shared_ptr<GeomAPI_Shape>  STEPImportAttributs(const std::string& theFileName,
                                               std::shared_ptr<ModelAPI_ResultBody> theResultBody,
-                                              const bool  anScalInterUnits,
-                                              const bool  anMaterials,
-                                              const bool  anColor,
+                                              const bool  theScalInterUnits,
+                                              const bool  theMaterials,
+                                              const bool  theColor,
                                               std::map< std::wstring,
                                               std::list<std::wstring>> &theMaterialShape,
                                               std::string& theError)
@@ -236,7 +236,7 @@ std::shared_ptr<GeomAPI_Shape>  STEPImportAttributs(const std::string& theFileNa
     if (status == IFSelect_RetDone) {
 
       // Regard or not the model units
-      if (!anScalInterUnits) {
+      if (!theScalInterUnits) {
         // set UnitFlag to units from file
         TColStd_SequenceOfAsciiString anUnitLengthNames;
         TColStd_SequenceOfAsciiString anUnitAngleNames;
@@ -275,23 +275,22 @@ std::shared_ptr<GeomAPI_Shape>  STEPImportAttributs(const std::string& theFileNa
     return aGeomShape;
   }
 
-  STEPCAFControl_Reader cafreader;
-  cafreader.SetColorMode(true);
-  cafreader.SetNameMode(true);
-  cafreader.SetMatMode(true);
+  STEPCAFControl_Reader aCafreader;
+  aCafreader.SetColorMode(true);
+  aCafreader.SetNameMode(true);
+  aCafreader.SetMatMode(true);
 
-  if(cafreader.ReadFile(theFileName.c_str()) != IFSelect_RetDone) {
+  if(aCafreader.ReadFile(theFileName.c_str()) != IFSelect_RetDone) {
     theError = "Wrong format of the imported file. Can't import file.";
     std::shared_ptr<GeomAPI_Shape> aGeomShape(new GeomAPI_Shape);
     aGeomShape->setImpl(new TopoDS_Shape());
     return aGeomShape;
   }
 
-  return readAttributes(cafreader,
+  return readAttributes(aCafreader,
                         theResultBody,
-                        anMaterials,
+                        theMaterials,
                         theMaterialShape,
-                        "STEP-XCAF",
                         theError);
-  }
+}
 
index f2b1307758bd237da0a674b1548b1a9ae4f20f63..8a465911d5ab3a4742b78448f1087cc8560378b2 100644 (file)
  */
 //=============================================================================
 
-TopoDS_Shape GetShape(const Handle(Standard_Transient)        &theEnti,
-                        const Handle(Transfer_TransientProcess) &theTP)
+TopoDS_Shape getShape(const Handle(Standard_Transient) &theEnti,
+                      const Handle(Transfer_TransientProcess) &theTP)
 {
-  TopoDS_Shape            aResult;
+  TopoDS_Shape aResult;
   Handle(Transfer_Binder) aBinder = theTP->Find(theEnti);
 
   if (aBinder.IsNull()) {
@@ -101,13 +101,12 @@ TopoDS_Shape GetShape(const Handle(Standard_Transient)        &theEnti,
 
 // ----------------------------------------------------------------------------
 
-std::shared_ptr<GeomAPI_Shape> readAttributes( STEPCAFControl_Reader &reader,
-                                               std::shared_ptr<ModelAPI_ResultBody> theResultBody,
-                                               const bool  anMaterials,
-                                               std::map< std::wstring,
-                                               std::list<std::wstring>> &theMaterialShape,
-                                               const std::string &format,
-                                               std::string& theError)
+std::shared_ptr<GeomAPI_Shape> readAttributes(
+                              STEPCAFControl_Reader &theReader,
+                              std::shared_ptr<ModelAPI_ResultBody> theResultBody,
+                              const bool  theIsMaterials,
+                              std::map< std::wstring,std::list<std::wstring>> &theMaterialShape,
+                              std::string& theError)
 {
   // dummy XCAF Application to handle the STEP XCAF Document
   Handle(XCAFApp_Application) dummy_app = XCAFApp_Application::GetApplication();
@@ -116,7 +115,7 @@ std::shared_ptr<GeomAPI_Shape> readAttributes( STEPCAFControl_Reader &reader,
 
   dummy_app->NewDocument( TCollection_ExtendedString("MDTV-CAF"), doc);
   // transfer STEP/IGES into the document, and get the main label
-  reader.Transfer(doc);
+  theReader.Transfer(doc);
   TDF_Label mainLabel = doc->Main();
   Handle_XCAFDoc_ShapeTool shapeTool = XCAFDoc_DocumentTool::ShapeTool(mainLabel);
   Handle_XCAFDoc_ColorTool colorTool = XCAFDoc_DocumentTool::ColorTool(mainLabel);
@@ -127,10 +126,10 @@ std::shared_ptr<GeomAPI_Shape> readAttributes( STEPCAFControl_Reader &reader,
 
   std::shared_ptr<GeomAPI_Shape> ageom =  setgeom(shapeTool,mainLabel,theError);
 
-  STEPControl_Reader aReader = reader.ChangeReader();
+  STEPControl_Reader aReader = theReader.ChangeReader();
 
   // BEGIN: reading materials of sub-shapes from file
-  if ( anMaterials )
+  if ( theIsMaterials )
   {
     TopTools_IndexedMapOfShape anIndices;
     TopExp::MapShapes(ageom->impl<TopoDS_Shape>(), anIndices);
@@ -146,58 +145,58 @@ std::shared_ptr<GeomAPI_Shape> readAttributes( STEPCAFControl_Reader &reader,
         Handle(Standard_Transient) enti = Model->Value(ie);
 
         // Store materials.
-        StoreMaterial(theResultBody,enti, anIndices, TP, mainLabel,theMaterialShape);
+        storeMaterial(theResultBody,enti, anIndices, TP, mainLabel,theMaterialShape);
       }
     }
   }
   return ageom;
 }
 
-std::shared_ptr<GeomAPI_Shape> setgeom(const Handle(XCAFDoc_ShapeTool) &shapeTool,
-                                       const TDF_Label &label,
+std::shared_ptr<GeomAPI_Shape> setgeom(const Handle(XCAFDoc_ShapeTool) &theShapeTool,
+                                       const TDF_Label &theLabel,
                                        std::string& theError)
 {
-  BRep_Builder B;
-  TopoDS_Compound compound;
-  B.MakeCompound(compound);
+  BRep_Builder aB;
+  TopoDS_Compound aCompound;
+  aB.MakeCompound(aCompound);
 
-  TDF_LabelSequence frshapes;
-  shapeTool->GetShapes(frshapes);
+  TDF_LabelSequence aFrshapes;
+  theShapeTool->GetShapes(aFrshapes);
 
   std::shared_ptr<GeomAPI_Shape> aGeomShape(new GeomAPI_Shape);
 
-  if (frshapes.Length() == 0) {
+  if (aFrshapes.Length() == 0) {
       aGeomShape->setImpl(new TopoDS_Shape());
       return aGeomShape;
-  } else if (frshapes.Length() == 1) {
-    TopoDS_Shape shape = shapeTool->GetShape(frshapes.Value(1));
+  } else if (aFrshapes.Length() == 1) {
+    TopoDS_Shape shape = theShapeTool->GetShape(aFrshapes.Value(1));
     aGeomShape->setImpl(new TopoDS_Shape(shape));
     return aGeomShape;
   } else {
-    for (Standard_Integer i=1; i<frshapes.Length(); i++) {
-      TopoDS_Shape S = shapeTool->GetShape(frshapes.Value(i));
-      TDF_Label aLabel = shapeTool->FindShape(S, Standard_False);
-      if ( (!aLabel.IsNull()) && (shapeTool->IsShape(aLabel)) ) {
-        if (shapeTool->IsFree(aLabel) ) {
-          if (S.IsNull()) {
+    for (Standard_Integer i=1; i<aFrshapes.Length(); i++) {
+      TopoDS_Shape aS = theShapeTool->GetShape(aFrshapes.Value(i));
+      TDF_Label aLabel = theShapeTool->FindShape(aS, Standard_False);
+      if ( (!aLabel.IsNull()) && (theShapeTool->IsShape(aLabel)) ) {
+        if (theShapeTool->IsFree(aLabel) ) {
+          if (aS.IsNull()) {
             continue;
           }
           else {
-            if (!shapeTool->IsReference(aLabel) ){
-              for(TDF_ChildIterator it(aLabel); it.More(); it.Next()) {
-                B.Add(compound, shapeTool->GetShape(it.Value()) );
+            if (!theShapeTool->IsReference(aLabel) ){
+              for(TDF_ChildIterator anIt(aLabel); anIt.More(); anIt.Next()) {
+                aB.Add(aCompound, theShapeTool->GetShape(anIt.Value()) );
               }
             }else{
-              B.Add(compound, S);
+              aB.Add(aCompound, aS);
             }
           }
         }
       }
     }
 
-    TopoDS_Shape shape = compound;
+    TopoDS_Shape aShape = aCompound;
     // Check if any BRep entity has been read, there must be at least a vertex
-    if ( !TopExp_Explorer( shape, TopAbs_VERTEX ).More() )
+    if ( !TopExp_Explorer( aShape, TopAbs_VERTEX ).More() )
     {
       theError = "No geometrical data in the imported file.";
       std::shared_ptr<GeomAPI_Shape> aGeomShape(new GeomAPI_Shape);
@@ -205,154 +204,150 @@ std::shared_ptr<GeomAPI_Shape> setgeom(const Handle(XCAFDoc_ShapeTool) &shapeToo
       return aGeomShape;
     }
 
-    aGeomShape->setImpl(new TopoDS_Shape(shape));
+    aGeomShape->setImpl(new TopoDS_Shape(aShape));
     return aGeomShape;
   }
 }
 
-void setShapeAttributes(const Handle(XCAFDoc_ShapeTool) &shapeTool,
-                                    const Handle(XCAFDoc_ColorTool) &colorTool,
-                                    const Handle(XCAFDoc_MaterialTool) &materialTool,
-                                    const TDF_Label &label,
-                                    const TopLoc_Location &loc,
-                                    std::shared_ptr<ModelAPI_ResultBody> theResultBody,
-                                    std::map< std::wstring,
-                                    std::list<std::wstring>> &theMaterialShape,
-                                    bool isRef)
+void setShapeAttributes(const Handle(XCAFDoc_ShapeTool) &theShapeTool,
+                        const Handle(XCAFDoc_ColorTool) &theColorTool,
+                        const Handle(XCAFDoc_MaterialTool) &theMaterialTool,
+                        const TDF_Label &theLabel,
+                        const TopLoc_Location &theLoc,
+                        std::shared_ptr<ModelAPI_ResultBody> theResultBody,
+                        std::map< std::wstring,std::list<std::wstring>> &theMaterialShape,
+                        bool theIsRef)
 {
-  std::wstring shapeName;
-  Handle(TDataStd_Name) n;
+  std::wstring aShapeName;
+  Handle(TDataStd_Name) aN;
 
-  if(label.FindAttribute(TDataStd_Name::GetID(), n)) {
-    TCollection_ExtendedString name = n->Get();
+  if(theLabel.FindAttribute(TDataStd_Name::GetID(), aN)) {
+    TCollection_ExtendedString aName = aN->Get();
 
-    shapeName =  Locale::Convert::toWString(TCollection_AsciiString(name).ToCString()) ;
+    aShapeName =  Locale::Convert::toWString(TCollection_AsciiString(aName).ToCString()) ;
   }
 
-  TopLoc_Location partLoc = loc;
-  Handle(XCAFDoc_Location) l;
-  if(label.FindAttribute(XCAFDoc_Location::GetID(), l)) {
-    if(isRef)
-      partLoc = partLoc * l->Get();
+  TopLoc_Location aPartLoc = theLoc;
+  Handle(XCAFDoc_Location) al;
+  if(theLabel.FindAttribute(XCAFDoc_Location::GetID(), al)) {
+    if(theIsRef)
+      aPartLoc = aPartLoc * al->Get();
     else
-      partLoc = l->Get();
+      aPartLoc = al->Get();
   }
 
-  TDF_Label ref;
-  if(shapeTool->IsReference(label) && shapeTool->GetReferredShape(label, ref)) {
+  TDF_Label aRef;
+  if(theShapeTool->IsReference(theLabel) && theShapeTool->GetReferredShape(theLabel, aRef)) {
 
-    setShapeAttributes( shapeTool, colorTool, materialTool, ref,
-                        partLoc,theResultBody,theMaterialShape,true);
+    setShapeAttributes( theShapeTool, theColorTool, theMaterialTool, aRef,
+                        aPartLoc,theResultBody,theMaterialShape,true);
   }
 
-  if( shapeTool->IsSimpleShape(label) && (isRef || shapeTool->IsFree(label))) {
+  if( theShapeTool->IsSimpleShape(theLabel) && (theIsRef || theShapeTool->IsFree(theLabel))) {
 
-    TopoDS_Shape shape = shapeTool->GetShape(label);
+    TopoDS_Shape aShape = theShapeTool->GetShape(theLabel);
 
     std::shared_ptr<GeomAPI_Shape> aShapeGeom(new GeomAPI_Shape);
-    if (!loc.IsIdentity()){
-        shape.Move(loc);
+    if (!theLoc.IsIdentity()){
+        aShape.Move(theLoc);
     }
-    aShapeGeom->setImpl(new TopoDS_Shape(shape));
-    shapeName = theResultBody->addShapeName(aShapeGeom, shapeName);
+    aShapeGeom->setImpl(new TopoDS_Shape(aShape));
+    aShapeName = theResultBody->addShapeName(aShapeGeom, aShapeName);
 
 
-    shape.Location(isRef ? loc : partLoc);
-    int dim =
-      (shape.ShapeType() == TopAbs_VERTEX) ?
+    aShape.Location(theIsRef ? theLoc : aPartLoc);
+    int aDim =
+      (aShape.ShapeType() == TopAbs_VERTEX) ?
         0 :
-        (shape.ShapeType() == TopAbs_EDGE || shape.ShapeType() == TopAbs_WIRE) ?
+        (aShape.ShapeType() == TopAbs_EDGE || aShape.ShapeType() == TopAbs_WIRE) ?
         1 :
-        (shape.ShapeType() == TopAbs_FACE ||
-         shape.ShapeType() == TopAbs_SHELL) ? 2 :3;
+        (aShape.ShapeType() == TopAbs_FACE ||
+         aShape.ShapeType() == TopAbs_SHELL) ? 2 :3;
 
-    Handle(TCollection_HAsciiString) matName;
-    Handle(TCollection_HAsciiString) matDescription;
-    Standard_Real matDensity;
-    Handle(TCollection_HAsciiString) matDensName;
-    Handle(TCollection_HAsciiString) matDensValType;
+    Handle(TCollection_HAsciiString) aMatName;
+    Handle(TCollection_HAsciiString) aMatDescription;
+    Standard_Real aMatDensity;
+    Handle(TCollection_HAsciiString) aMatDensName;
+    Handle(TCollection_HAsciiString) aMatDensValType;
 
-    if(materialTool->GetMaterial(label, matName, matDescription, matDensity,
-                                 matDensName, matDensValType)) {
-      std::wstring nameMaterial = Locale::Convert::toWString(matName->ToCString());
+    if(theMaterialTool->GetMaterial(theLabel, aMatName, aMatDescription, aMatDensity,
+                                 aMatDensName, aMatDensValType)) {
+      std::wstring aNameMaterial = Locale::Convert::toWString(aMatName->ToCString());
 
-      theMaterialShape[nameMaterial].push_back(shapeName);
+      theMaterialShape[aNameMaterial].push_back(aShapeName);
     }
 
-    Quantity_Color col;
-    if(colorTool->GetColor(label, XCAFDoc_ColorGen, col)) {
-      double r = col.Red(), g = col.Green(), b = col.Blue();
+    Quantity_Color aCol;
+    if(theColorTool->GetColor(theLabel, XCAFDoc_ColorGen, aCol)) {
+      double r = aCol.Red(), g = aCol.Green(), b = aCol.Blue();
       std::vector<int> ColRGB = {int(r*255),int(g*255),int(b*255)};
-      theResultBody->addShapeColor(shapeName, ColRGB);
+      theResultBody->addShapeColor(aShapeName, ColRGB);
     }
-    else if(colorTool->GetColor(label, XCAFDoc_ColorSurf, col)) {
-      double r = col.Red(), g = col.Green(), b = col.Blue();
-      std::vector<int> ColRGB = {int(r*255),int(g*255),int(b*255)};
-      theResultBody->addShapeColor(shapeName, ColRGB);
+    else if(theColorTool->GetColor(theLabel, XCAFDoc_ColorSurf, aCol)) {
+      double r = aCol.Red(), g = aCol.Green(), b = aCol.Blue();
+      std::vector<int> aColRGB = {int(r*255),int(g*255),int(b*255)};
+      theResultBody->addShapeColor(aShapeName, aColRGB);
     }
-    else if(colorTool->GetColor(label, XCAFDoc_ColorCurv, col)) {
-     double r = col.Red(), g = col.Green(), b = col.Blue();
-     std::vector<int> ColRGB = {int(r*255),int(g*255),int(b*255)};
-      theResultBody->addShapeColor(shapeName, ColRGB);
+    else if(theColorTool->GetColor(theLabel, XCAFDoc_ColorCurv, aCol)) {
+     double aR = aCol.Red(), aG = aCol.Green(), aB = aCol.Blue();
+     std::vector<int> aColRGB = {int(aR*255),int(aG*255),int(aB*255)};
+      theResultBody->addShapeColor(aShapeName, aColRGB);
     }
     // check explicit coloring of boundary entities
-    if(dim == 3) {
-      TopExp_Explorer xp2(shape, TopAbs_FACE);
-      while(xp2.More()) {
-        if(colorTool->GetColor(xp2.Current(), XCAFDoc_ColorGen, col) ||
-           colorTool->GetColor(xp2.Current(), XCAFDoc_ColorSurf, col) ||
-           colorTool->GetColor(xp2.Current(), XCAFDoc_ColorCurv, col)) {
-          double r = col.Red(), g = col.Green(), b = col.Blue();
-          TopoDS_Face face = TopoDS::Face(xp2.Current());
-          std::vector<int> ColRGB = {int(r*255),int(g*255),int(b*255)};
+    if(aDim == 3) {
+      TopExp_Explorer aXp2(aShape, TopAbs_FACE);
+      while(aXp2.More()) {
+        if(theColorTool->GetColor(aXp2.Current(), XCAFDoc_ColorGen, aCol) ||
+           theColorTool->GetColor(aXp2.Current(), XCAFDoc_ColorSurf, aCol) ||
+           theColorTool->GetColor(aXp2.Current(), XCAFDoc_ColorCurv, aCol)) {
+          double aR = aCol.Red(), aG = aCol.Green(), aB = aCol.Blue();
+          TopoDS_Face aFace = TopoDS::Face(aXp2.Current());
+          std::vector<int> aColRGB = {int(aR*255),int(aG*255),int(aB*255)};
           std::wstringstream aNameFace;
-          TopoDS_Shape shapeface = xp2.Current();
-          if (!loc.IsIdentity()){
-                  shapeface.Move(loc);
+          TopoDS_Shape aShapeface = aXp2.Current();
+          if (!theLoc.IsIdentity()){
+                  aShapeface.Move(theLoc);
           }
-          aShapeGeom->setImpl(new TopoDS_Shape(shapeface));
+          aShapeGeom->setImpl(new TopoDS_Shape(aShapeface));
           theResultBody->addShapeColor(
-          theResultBody->addShapeName(aShapeGeom , aNameFace.str()), ColRGB);
+          theResultBody->addShapeName(aShapeGeom , aNameFace.str()), aColRGB);
         }
-        xp2.Next();
+        aXp2.Next();
       }
     }
-    if(dim == 2) {
-      TopExp_Explorer xp1(shape, TopAbs_EDGE);
-      while(xp1.More()) {
-        if(colorTool->GetColor(xp1.Current(), XCAFDoc_ColorGen, col) ||
-           colorTool->GetColor(xp1.Current(), XCAFDoc_ColorSurf, col) ||
-           colorTool->GetColor(xp1.Current(), XCAFDoc_ColorCurv, col)) {
-           double r = col.Red(), g = col.Green(), b = col.Blue();
-           std::vector<int> ColRGB = {int(r*255),int(g*255),int(b*255)};
+    if(aDim == 2) {
+      TopExp_Explorer aXp1(aShape, TopAbs_EDGE);
+      while(aXp1.More()) {
+        if(theColorTool->GetColor(aXp1.Current(), XCAFDoc_ColorGen, aCol) ||
+           theColorTool->GetColor(aXp1.Current(), XCAFDoc_ColorSurf, aCol) ||
+           theColorTool->GetColor(aXp1.Current(), XCAFDoc_ColorCurv, aCol)) {
+           double aR = aCol.Red(), aG = aCol.Green(), aB = aCol.Blue();
+           std::vector<int> aColRGB = {int(aR*255),int(aG*255),int(aB*255)};
            std::wstringstream aNameEdge;
-           aNameEdge << L"Edge_"<< shapeName;
-           aShapeGeom->setImpl(new TopoDS_Shape(xp1.Current() ));
+           aNameEdge << L"Edge_"<< aShapeName;
+           aShapeGeom->setImpl(new TopoDS_Shape(aXp1.Current() ));
            theResultBody->addShapeColor(
-           theResultBody->addShapeName(aShapeGeom , aNameEdge.str()), ColRGB);
+           theResultBody->addShapeName(aShapeGeom , aNameEdge.str()), aColRGB);
         }
-        xp1.Next();
+        aXp1.Next();
       }
     }
   }
   else {
-    int indiceChild = 1;
-
-    if (!shapeTool->IsReference(label) ){
-      TopoDS_Shape shape = shapeTool->GetShape(label);
+    if (!theShapeTool->IsReference(theLabel) ){
+      TopoDS_Shape aShape = theShapeTool->GetShape(theLabel);
 
       std::shared_ptr<GeomAPI_Shape> aShapeGeom(new GeomAPI_Shape);
-      if (!loc.IsIdentity()){
-          shape.Move(loc);
+      if (!theLoc.IsIdentity()){
+          aShape.Move(theLoc);
       }
-      aShapeGeom->setImpl(new TopoDS_Shape(shape));
-      shapeName = theResultBody->addShapeName(aShapeGeom, shapeName);
+      aShapeGeom->setImpl(new TopoDS_Shape(aShape));
+      aShapeName = theResultBody->addShapeName(aShapeGeom, aShapeName);
     }
-    for(TDF_ChildIterator it(label); it.More(); it.Next()) {
+    for(TDF_ChildIterator anIt(theLabel); anIt.More(); anIt.Next()) {
 
-      setShapeAttributes( shapeTool, colorTool, materialTool,
-                         it.Value(), partLoc,theResultBody,theMaterialShape, isRef);
-      indiceChild++;
+      setShapeAttributes( theShapeTool, theColorTool, theMaterialTool,
+                         anIt.Value(), aPartLoc,theResultBody,theMaterialShape, theIsRef);
     }
   }
 }
@@ -364,7 +359,7 @@ void setShapeAttributes(const Handle(XCAFDoc_ShapeTool) &shapeTool,
    */
   //=============================================================================
 
-  void StoreMaterial( std::shared_ptr<ModelAPI_ResultBody>    theResultBody,
+  void storeMaterial( std::shared_ptr<ModelAPI_ResultBody>    theResultBody,
                       const Handle(Standard_Transient)        &theEnti,
                       const TopTools_IndexedMapOfShape        &theIndices,
                       const Handle(Transfer_TransientProcess) &theTP,
@@ -405,10 +400,10 @@ void setShapeAttributes(const Handle(XCAFDoc_ShapeTool) &shapeTool,
               Handle(StepRepr_Representation) aRepr = aPDR->UsedRepresentation();
 
               if(aRepr.IsNull() == Standard_False) {
-                Standard_Integer ir;
+                Standard_Integer anIr;
 
-                for(ir = 1; ir <= aRepr->NbItems(); ir++) {
-                  Handle(StepRepr_RepresentationItem) aRI = aRepr->ItemsValue(ir);
+                for(anIr = 1; anIr <= aRepr->NbItems(); anIr++) {
+                  Handle(StepRepr_RepresentationItem) aRI = aRepr->ItemsValue(anIr);
                   Handle(StepRepr_DescriptiveRepresentationItem) aDRI =
                     Handle(StepRepr_DescriptiveRepresentationItem)::DownCast(aRI);
 
@@ -421,7 +416,7 @@ void setShapeAttributes(const Handle(XCAFDoc_ShapeTool) &shapeTool,
 
                       if (aShape.IsNull()) {
                         //Get the shape.
-                        aShape = GetShape(aProdDef, theTP);
+                        aShape = getShape(aProdDef, theTP);
                         if (aShape.IsNull()) {
                           return;
                         }
@@ -429,17 +424,17 @@ void setShapeAttributes(const Handle(XCAFDoc_ShapeTool) &shapeTool,
 
                       // as PRODUCT can be included in the main shape
                       // several times, we look here for all iclusions.
-                      Standard_Integer isub, nbSubs = theIndices.Extent();
+                      Standard_Integer anISub, aNbSubs = theIndices.Extent();
 
-                      for (isub = 1; isub <= nbSubs; isub++) {
-                        TopoDS_Shape aSub = theIndices.FindKey(isub);
+                      for (anISub = 1; anISub <= aNbSubs; anISub++) {
+                        TopoDS_Shape aSub = theIndices.FindKey(anISub);
 
                         if (aSub.IsPartner(aShape)) {
                           std::shared_ptr<GeomAPI_Shape> aShapeGeom(new GeomAPI_Shape);
                           aShapeGeom->setImpl(new TopoDS_Shape(aSub));
-                          std::wstring nom = theResultBody->findShapeName(aShapeGeom);
-                          std::wstring matName= Locale::Convert::toWString(aMatName->ToCString());
-                          theMaterialShape[matName].push_back(nom);
+                          std::wstring aNom = theResultBody->findShapeName(aShapeGeom);
+                          std::wstring aMName= Locale::Convert::toWString(aMatName->ToCString());
+                          theMaterialShape[aMName].push_back(aNom);
 
                         }
                       }
index 4e2720c40750724b7abaa1cf47715955b9a3b8cd..04d4cb7219d8db0b33304eda4e91a06b47599394 100644 (file)
 
  // read Attributs of step file
  GEOMALGOAPI_EXPORT
- std::shared_ptr<GeomAPI_Shape>  readAttributes( STEPCAFControl_Reader &reader,
-                                                 std::shared_ptr<ModelAPI_ResultBody> theResultBody,
-                                                 const bool  anMaterials,
-                                                 std::map< std::wstring,
-                                                 std::list<std::wstring>> &theMaterialShape,
-                                                 const std::string &format,
-                                                 std::string& theError);
- // read attributs for  label
+ std::shared_ptr<GeomAPI_Shape>  readAttributes(
+                                STEPCAFControl_Reader &theReader,
+                                std::shared_ptr<ModelAPI_ResultBody> theResultBody,
+                                const bool  theMaterials,
+                                std::map< std::wstring,std::list<std::wstring>> &theMaterialShape,
+                                std::string& theError);
+// read attributs for  label
  GEOMALGOAPI_EXPORT
- void setShapeAttributes(const Handle(XCAFDoc_ShapeTool) &shapeTool,
-                               const Handle(XCAFDoc_ColorTool) &colorTool,
-                               const Handle(XCAFDoc_MaterialTool) &materialTool,
-                               const TDF_Label &label,
-                               const TopLoc_Location &loc,
+ void setShapeAttributes(const Handle(XCAFDoc_ShapeTool) &theShapeTool,
+                               const Handle(XCAFDoc_ColorTool) &theColorTool,
+                               const Handle(XCAFDoc_MaterialTool) &TheMaterialTool,
+                               const TDF_Label &theLabel,
+                               const TopLoc_Location &theLoc,
                                std::shared_ptr<ModelAPI_ResultBody> theResultBody,
                                std::map< std::wstring, std::list<std::wstring>> &theMaterialShape,
-                               bool isRef);
+                               bool theIsRef);
 
 // read geometry
 GEOMALGOAPI_EXPORT
 std::shared_ptr<GeomAPI_Shape> setgeom(const Handle(XCAFDoc_ShapeTool) &shapeTool,
-                                    const TDF_Label &label,
-                                    std::string& theError);
+                                       const TDF_Label &theLabel,
+                                       std::string& theError);
 
 // store Materiel for theShapeLabel in the map theMaterialShape
 GEOMALGOAPI_EXPORT
-void StoreMaterial(  std::shared_ptr<ModelAPI_ResultBody> theResultBody,
-                     const Handle(Standard_Transient)        &theEnti,
-                      const TopTools_IndexedMapOfShape        &theIndices,
-                      const Handle(Transfer_TransientProcess) &theTP,
-                      const TDF_Label                         &theShapeLabel,
+void storeMaterial(  std::shared_ptr<ModelAPI_ResultBody> theResultBody,
+                     const Handle(Standard_Transient) &theEnti,
+                     const TopTools_IndexedMapOfShape &theIndices,
+                     const Handle(Transfer_TransientProcess) &theTP,
+                     const TDF_Label &theShapeLabel,
                       std::map< std::wstring, std::list<std::wstring>> &theMaterialShape );
 
 #endif /* GEOMALGOAPI_STEPIMPORTXCAF_H_ */