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++);
}
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++);
}
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++);
}
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++);
}
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++);
}
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++);
}
{
// 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++);
}
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++);
}
#include <Events_Loop.h>
#include <Locale_Convert.h>
+ #include <GeomAlgoAPI_MakeShape.h>
#include <GeomAPI_ShapeHierarchy.h>
#include <GeomAPI_ShapeIterator.h>
+#include <GeomAPI_ShapeExplorer.h>
#include <algorithm>
#include <iostream>