1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: ModelAPI_ResultConstruction.cpp
4 // Created: 07 Jul 2014
5 // Author: Mikhail PONIKAROV
7 #include <Model_ResultConstruction.h>
9 #include <ModelAPI_AttributeIntArray.h>
10 #include <Config_PropManager.h>
12 void Model_ResultConstruction::initAttributes()
14 // append the color attribute
15 DataPtr aData = data();
16 aData->addAttribute(COLOR_ID(), ModelAPI_AttributeIntArray::type());
17 AttributeIntArrayPtr aColorAttr = aData->intArray(COLOR_ID());
18 std::vector<int> aRGB;
19 aRGB = Config_PropManager::color("Visualization", "result_construction_color", DEFAULT_COLOR());
20 aColorAttr->setSize(3);
21 aColorAttr->setValue(0, aRGB[0]);
22 aColorAttr->setValue(1, aRGB[1]);
23 aColorAttr->setValue(2, aRGB[2]);
26 void Model_ResultConstruction::setShape(std::shared_ptr<GeomAPI_Shape> theShape)
31 std::shared_ptr<GeomAPI_Shape> Model_ResultConstruction::shape()
36 Model_ResultConstruction::Model_ResultConstruction()
39 setIsConcealed(false);
42 void Model_ResultConstruction::setIsInHistory(const bool isInHistory)
44 myIsInHistory = isInHistory;