]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
removed unnecessary debugging code
authormbs <martin.bernhard@opencascade.com>
Mon, 29 Apr 2024 13:58:49 +0000 (14:58 +0100)
committermbs <martin.bernhard@opencascade.com>
Thu, 6 Jun 2024 15:01:00 +0000 (16:01 +0100)
src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp
src/GeomAlgoAPI/GeomAlgoAPI_STEPImportXCAF.cpp
src/Model/Model_ResultBody.cpp

index 4e70bd86eeb5506fcacdd443f5106e800721e532..8cf5ee8f9adfbd0fef9e280c4328fb2be293e15c 100644 (file)
@@ -238,10 +238,6 @@ void ExchangePlugin_ImportFeature::importFile(const std::string& theFileName)
 
   // Pass the results into the model
   loadNamingDS(aGeomShape, aResult);
-  if (aResult->shape().get())
-    std::cout << "5 YES\n";
-  else
-    std::cout << "5 NO\n";
 
   // create color group
   if (anColorGroupSelected)
@@ -257,7 +253,6 @@ void ExchangePlugin_ImportFeature::importFile(const std::string& theFileName)
   setResult(aResult);
 
   aResult->clearShapeNameAndColor();
-
 }
 
 void ExchangePlugin_ImportFeature::setColorGroups(
index b8b6021be3d88883721e9dfe5ccb0addd1ccb0a6..30f06dbf39171336240c5baf79e21c78db58fd36 100644 (file)
@@ -111,31 +111,6 @@ std::shared_ptr<GeomAPI_Shape> readAttributes(STEPCAFControl_Reader &theReader,
   Handle_XCAFDoc_ShapeTool shapeTool = XCAFDoc_DocumentTool::ShapeTool(mainLabel);
   Handle_XCAFDoc_ColorTool colorTool = XCAFDoc_DocumentTool::ColorTool(mainLabel);
   Handle(XCAFDoc_MaterialTool) materialTool = XCAFDoc_DocumentTool::MaterialTool(mainLabel);
-  TDF_LabelSequence aLabels, aLabelSS;
-  colorTool->GetColors(aLabels);
-  Standard_Integer i, nbc = aLabels.Length();
-  for (i = 1; i <= nbc; ++i)
-  {
-    Quantity_Color aColorQ;
-    TDF_Label aLabel = aLabels.Value(i);
-    colorTool->GetColor(aLabel, aColorQ);
-  }
-
-  shapeTool->GetShapes(aLabels);
-  Quantity_Color aColorR;
-  for (TDF_LabelSequence::Iterator aLabIt(aLabels); aLabIt.More(); aLabIt.Next())
-  {
-    const TDF_Label& aShapeLabel = aLabIt.Value();
-    TopoDS_Shape aSubShape = shapeTool->GetShape(aShapeLabel);
-    shapeTool->GetSubShapes(aShapeLabel, aLabelSS);
-    colorTool->GetColor(aShapeLabel, XCAFDoc_ColorGen, aColorR);
-    for (TDF_LabelSequence::Iterator aLabIt2(aLabelSS); aLabIt2.More(); aLabIt2.Next())
-    {
-      const TDF_Label& aSubShapeLab = aLabIt.Value();
-      TopoDS_Shape aSubShape = shapeTool->GetShape(aSubShapeLab);
-      colorTool->GetColor(aSubShapeLab, XCAFDoc_ColorSurf, aColorR);
-    }
-  }
 
   // traverse the labels recursively to set attributes on shapes
   setShapeAttributes(shapeTool, colorTool, materialTool, mainLabel,
@@ -250,6 +225,7 @@ std::shared_ptr<GeomAPI_Shape> setGeom(const Handle(XCAFDoc_ShapeTool) &theShape
     return aGeomShape;
   }
 }
+
 //=============================================================================
 void setShapeAttributes(const Handle(XCAFDoc_ShapeTool) &theShapeTool,
                         const Handle(XCAFDoc_ColorTool) &theColorTool,
index 9b1459445501695bf0139ab6fab709370f86c0ea..66fbe2c0913dfd33e26e20e8efbe14a0815f9ee6 100644 (file)
@@ -255,8 +255,8 @@ void Model_ResultBody::updateConcealment()
   }
 }
 
-void Model_ResultBody::addShapeColor( const std::wstring& theName,std::vector<int>& color) {
-
+void Model_ResultBody::addShapeColor( const std::wstring& theName,std::vector<int>& color)
+{
   if (myColorsShape.find(theName) == myColorsShape.end())
     myColorsShape[ theName ] =  color;
 }
@@ -419,7 +419,7 @@ void Model_ResultBody::updateSubs(const std::shared_ptr<GeomAPI_Shape>& theThisS
             break;
         }
         aSub = anObjects->createBody(this->data(), aSubIndex,thenameshape);
-        //finf color read
+        //find color read
         std::map< std::wstring, std::vector<int>>::iterator itColor =
                                                           myColorsShape.find(thenameshape);
         if (itColor != myColorsShape.end()){
@@ -470,9 +470,7 @@ void Model_ResultBody::updateSubs(const std::shared_ptr<GeomAPI_Shape>& theThisS
   }
   else if (!aThisShape.IsNull() && (aThisShape.ShapeType() == TopAbs_SOLID ||
            aThisShape.ShapeType() == TopAbs_SHELL)) {
-    //std::cout << ".....subshape is a SOLID or SHELL" << std::endl;
     // Iterate on all faces
-    //MBS:
     ResultBodyPtr anOwner = std::dynamic_pointer_cast<ModelAPI_ResultBody>(data()->owner());
     TopExp_Explorer aExp(aThisShape, TopAbs_FACE);
     for (; aExp.More(); aExp.Next()) {
@@ -500,13 +498,8 @@ void Model_ResultBody::updateSubs(const std::shared_ptr<GeomAPI_Shape>& theThisS
         ///
         if (!aName.empty()) {
           const std::vector<int>& aColor = findShapeColor(aName);
-          std::vector<int> aColor2 = {};
           if (!aColor.empty()) {
             ModelAPI_Tools::setColor(anOwner, aGeomFace, aColor);
-            ModelAPI_Tools::getColor(anOwner, aGeomFace, aColor2);
-            //std::cout << std::endl << aColor[0]  << " " << aColor[1]  << " " << aColor[2]  << std::endl;
-            //if (!aColor2.empty())
-            //  std::cout << aColor2[0] << " " << aColor2[1] << " " << aColor2[2] << std::endl;
           }
         }
       }