From: mbs Date: Mon, 29 Apr 2024 13:58:49 +0000 (+0100) Subject: removed unnecessary debugging code X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f3da93839222eb605a409224d4b3e75482b8ed0d;p=modules%2Fshaper.git removed unnecessary debugging code --- diff --git a/src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp b/src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp index 4e70bd86e..8cf5ee8f9 100644 --- a/src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp +++ b/src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp @@ -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( diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_STEPImportXCAF.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_STEPImportXCAF.cpp index b8b6021be..30f06dbf3 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_STEPImportXCAF.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_STEPImportXCAF.cpp @@ -111,31 +111,6 @@ std::shared_ptr 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 setGeom(const Handle(XCAFDoc_ShapeTool) &theShape return aGeomShape; } } + //============================================================================= void setShapeAttributes(const Handle(XCAFDoc_ShapeTool) &theShapeTool, const Handle(XCAFDoc_ColorTool) &theColorTool, diff --git a/src/Model/Model_ResultBody.cpp b/src/Model/Model_ResultBody.cpp index 9b1459445..66fbe2c09 100644 --- a/src/Model/Model_ResultBody.cpp +++ b/src/Model/Model_ResultBody.cpp @@ -255,8 +255,8 @@ void Model_ResultBody::updateConcealment() } } -void Model_ResultBody::addShapeColor( const std::wstring& theName,std::vector& color) { - +void Model_ResultBody::addShapeColor( const std::wstring& theName,std::vector& color) +{ if (myColorsShape.find(theName) == myColorsShape.end()) myColorsShape[ theName ] = color; } @@ -419,7 +419,7 @@ void Model_ResultBody::updateSubs(const std::shared_ptr& theThisS break; } aSub = anObjects->createBody(this->data(), aSubIndex,thenameshape); - //finf color read + //find color read std::map< std::wstring, std::vector>::iterator itColor = myColorsShape.find(thenameshape); if (itColor != myColorsShape.end()){ @@ -470,9 +470,7 @@ void Model_ResultBody::updateSubs(const std::shared_ptr& 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(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& theThisS /// if (!aName.empty()) { const std::vector& aColor = findShapeColor(aName); - std::vector 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; } } }