]> SALOME platform Git repositories - modules/shaper.git/blob - src/Model/Model_ResultConstruction.cpp
Salome HOME
Change color for construction/body/group.
[modules/shaper.git] / src / Model / Model_ResultConstruction.cpp
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        ModelAPI_ResultConstruction.cpp
4 // Created:     07 Jul 2014
5 // Author:      Mikhail PONIKAROV
6
7 #include <Model_ResultConstruction.h>
8
9 #include <ModelAPI_AttributeIntArray.h>
10 #include <Config_PropManager.h>
11
12 void Model_ResultConstruction::initAttributes()
13 {
14   // append the color attribute. It is empty, the attribute will be filled by a request
15   DataPtr aData = data();
16   aData->addAttribute(COLOR_ID(), ModelAPI_AttributeIntArray::type());
17 }
18
19 void Model_ResultConstruction::colorConfigInfo(std::string& theSection, std::string& theName,
20                                        std::string& theDefault)
21 {
22   theSection = "Visualization";
23   theName = "result_construction_color";
24   theDefault = DEFAULT_COLOR();
25 }
26
27 void Model_ResultConstruction::setShape(std::shared_ptr<GeomAPI_Shape> theShape)
28 {
29   myShape = theShape;
30 }
31
32 std::shared_ptr<GeomAPI_Shape> Model_ResultConstruction::shape()
33 {
34   return myShape;
35 }
36
37 Model_ResultConstruction::Model_ResultConstruction()
38 {
39   myIsInHistory = true;
40   setIsConcealed(false);
41 }
42
43 void Model_ResultConstruction::setIsInHistory(const bool isInHistory)
44 {
45   myIsInHistory = isInHistory;
46 }