From: mpv Date: Wed, 29 Dec 2021 14:14:45 +0000 (+0300) Subject: Merge branch 'cadbld' X-Git-Tag: V9_9_0a1~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=766ce5d72bbae841d6c042befdf95e7d945039e1;p=modules%2Fshaper.git Merge branch 'cadbld' # Conflicts: # src/FeaturesPlugin/FeaturesPlugin_MultiRotation.cpp # src/FeaturesPlugin/FeaturesPlugin_MultiTranslation.cpp # src/FeaturesPlugin/FeaturesPlugin_Placement.cpp # src/FeaturesPlugin/FeaturesPlugin_Rotation.cpp # src/FeaturesPlugin/FeaturesPlugin_Scale.cpp # src/FeaturesPlugin/FeaturesPlugin_Symmetry.cpp # src/FeaturesPlugin/FeaturesPlugin_Translation.cpp --- 766ce5d72bbae841d6c042befdf95e7d945039e1 diff --cc src/FeaturesPlugin/FeaturesPlugin_MultiRotation.cpp index a3f08292a,adb0c81f0..4e3d05ba2 --- a/src/FeaturesPlugin/FeaturesPlugin_MultiRotation.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_MultiRotation.cpp @@@ -224,10 -224,9 +224,10 @@@ void FeaturesPlugin_MultiRotation::perf anObjects.topLevelObjects(aTopLevel); for (ListOfShape::iterator anIt = aTopLevel.begin(); anIt != aTopLevel.end(); ++anIt) { ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex); - FeaturesPlugin_Tools::loadModifiedShapes(aResultBody, anOriginalShapes, ListOfShape(), - aMakeShapeList, *anIt, "Rotated"); + ModelAPI_Tools::loadModifiedShapes(aResultBody, anOriginalShapes, ListOfShape(), + aMakeShapeList, *anIt, "Rotated"); - aResultBody->setTextureFile(theTextureFile); + // Copy image data, if any + ModelAPI_Tools::copyImageAttribute(aTextureSource, aResultBody); setResult(aResultBody, aResultIndex++); } diff --cc src/FeaturesPlugin/FeaturesPlugin_MultiTranslation.cpp index 5fafcb11a,637fcfa31..8ee89a08f --- a/src/FeaturesPlugin/FeaturesPlugin_MultiTranslation.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_MultiTranslation.cpp @@@ -170,10 -170,9 +170,10 @@@ void FeaturesPlugin_MultiTranslation::e anObjects.topLevelObjects(aTopLevel); for (ListOfShape::iterator anIt = aTopLevel.begin(); anIt != aTopLevel.end(); ++anIt) { ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex); - FeaturesPlugin_Tools::loadModifiedShapes(aResultBody, anOriginalShapes, ListOfShape(), - aMakeShapeList, *anIt, "Translated"); + ModelAPI_Tools::loadModifiedShapes(aResultBody, anOriginalShapes, ListOfShape(), + aMakeShapeList, *anIt, "Translated"); - aResultBody->setTextureFile(theTextureFile); + // Copy image data, if any + ModelAPI_Tools::copyImageAttribute(aTextureSource, aResultBody); setResult(aResultBody, aResultIndex++); } diff --cc src/FeaturesPlugin/FeaturesPlugin_Placement.cpp index 8b109aed1,7a21c667a..a357658f5 --- a/src/FeaturesPlugin/FeaturesPlugin_Placement.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Placement.cpp @@@ -179,10 -179,9 +179,10 @@@ void FeaturesPlugin_Placement::execute( for (ListOfShape::iterator anIt = aTopLevel.begin(); anIt != aTopLevel.end(); ++anIt) { //LoadNamingDS ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex); - FeaturesPlugin_Tools::loadModifiedShapes(aResultBody, anOriginalShapes, ListOfShape(), - aMakeShapeList, *anIt, "Placed"); + ModelAPI_Tools::loadModifiedShapes(aResultBody, anOriginalShapes, ListOfShape(), + aMakeShapeList, *anIt, "Placed"); - aResultBody->setTextureFile(theTextureFile); + // Copy image data, if any + ModelAPI_Tools::copyImageAttribute(aTextureSource, aResultBody); setResult(aResultBody, aResultIndex++); } diff --cc src/FeaturesPlugin/FeaturesPlugin_Rotation.cpp index 8627c4c64,144e57ef2..473d5964a --- a/src/FeaturesPlugin/FeaturesPlugin_Rotation.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Rotation.cpp @@@ -225,10 -225,9 +225,10 @@@ void FeaturesPlugin_Rotation::performRo anObjects.topLevelObjects(aTopLevel); for (ListOfShape::iterator anIt = aTopLevel.begin(); anIt != aTopLevel.end(); ++anIt) { ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex); - FeaturesPlugin_Tools::loadModifiedShapes(aResultBody, anOriginalShapes, ListOfShape(), - aMakeShapeList, *anIt, "Rotated"); + ModelAPI_Tools::loadModifiedShapes(aResultBody, anOriginalShapes, ListOfShape(), + aMakeShapeList, *anIt, "Rotated"); - aResultBody->setTextureFile(theTextureFile); + // Copy image data, if any + ModelAPI_Tools::copyImageAttribute(aTextureSource, aResultBody); setResult(aResultBody, aResultIndex++); } diff --cc src/FeaturesPlugin/FeaturesPlugin_Scale.cpp index 6766e10dc,6c92629c8..f53834fc5 --- a/src/FeaturesPlugin/FeaturesPlugin_Scale.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Scale.cpp @@@ -142,10 -142,9 +142,10 @@@ void FeaturesPlugin_Scale::performScale anObjects.topLevelObjects(aTopLevel); for (ListOfShape::iterator anIt = aTopLevel.begin(); anIt != aTopLevel.end(); ++anIt) { ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex); - FeaturesPlugin_Tools::loadModifiedShapes(aResultBody, anOriginalShapes, ListOfShape(), - aMakeShapeList, *anIt, "Scaled"); + ModelAPI_Tools::loadModifiedShapes(aResultBody, anOriginalShapes, ListOfShape(), + aMakeShapeList, *anIt, "Scaled"); - aResultBody->setTextureFile(theTextureFile); + // Copy image data, if any + ModelAPI_Tools::copyImageAttribute(aTextureSource, aResultBody); setResult(aResultBody, aResultIndex++); } @@@ -215,10 -214,9 +215,10 @@@ void FeaturesPlugin_Scale::performScale anObjects.topLevelObjects(aTopLevel); for (ListOfShape::iterator anIt = aTopLevel.begin(); anIt != aTopLevel.end(); ++anIt) { ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex); - FeaturesPlugin_Tools::loadModifiedShapes(aResultBody, anOriginalShapes, ListOfShape(), - aMakeShapeList, *anIt, "Scaled"); + ModelAPI_Tools::loadModifiedShapes(aResultBody, anOriginalShapes, ListOfShape(), + aMakeShapeList, *anIt, "Scaled"); - aResultBody->setTextureFile(theTextureFile); + // Copy image data, if any + ModelAPI_Tools::copyImageAttribute(aTextureSource, aResultBody); setResult(aResultBody, aResultIndex++); } diff --cc src/FeaturesPlugin/FeaturesPlugin_Symmetry.cpp index 9a5830bcf,d007306fc..5ad5d61a2 --- a/src/FeaturesPlugin/FeaturesPlugin_Symmetry.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Symmetry.cpp @@@ -209,10 -209,9 +209,10 @@@ void FeaturesPlugin_Symmetry::buildResu { // Store and name the result. ResultBodyPtr aResultBody = document()->createBody(data(), theResultIndex); - FeaturesPlugin_Tools::loadModifiedShapes(aResultBody, theOriginalShapes, ListOfShape(), - theAlgo, theTargetShape, "Symmetried"); + ModelAPI_Tools::loadModifiedShapes(aResultBody, theOriginalShapes, ListOfShape(), + theAlgo, theTargetShape, "Symmetried"); - aResultBody->setTextureFile(theTextureFile); + // Copy image data, if any + ModelAPI_Tools::copyImageAttribute(theTextureSource, aResultBody); setResult(aResultBody, theResultIndex++); } diff --cc src/FeaturesPlugin/FeaturesPlugin_Translation.cpp index 9586fea92,ca8039765..93aa595ed --- a/src/FeaturesPlugin/FeaturesPlugin_Translation.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Translation.cpp @@@ -240,10 -240,9 +240,10 @@@ void FeaturesPlugin_Translation::perfor for (ListOfShape::iterator anIt = aTopLevel.begin(); anIt != aTopLevel.end(); ++anIt) { //LoadNamingDS ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex); - FeaturesPlugin_Tools::loadModifiedShapes(aResultBody, anOriginalShapes, ListOfShape(), - aMakeShapeList, *anIt, "Translated"); + ModelAPI_Tools::loadModifiedShapes(aResultBody, anOriginalShapes, ListOfShape(), + aMakeShapeList, *anIt, "Translated"); - aResultBody->setTextureFile(theTextureFile); + // Copy image data, if any + ModelAPI_Tools::copyImageAttribute(aTextureSource, aResultBody); setResult(aResultBody, aResultIndex++); } diff --cc src/ModelAPI/ModelAPI_Tools.cpp index 9554d1e10,5db4588bb..282a40de4 --- a/src/ModelAPI/ModelAPI_Tools.cpp +++ b/src/ModelAPI/ModelAPI_Tools.cpp @@@ -40,9 -39,9 +40,10 @@@ #include #include + #include #include #include +#include #include #include