#include "ConstructionPlugin_Plane.h"
+#include <Config_PropManager.h>
+
#include <ModelAPI_AttributeSelection.h>
#include <ModelAPI_AttributeDouble.h>
#include <ModelAPI_ResultConstruction.h>
void ConstructionPlugin_Plane::initAttributes()
{
- data()->addAttribute(FACE_ATTR, ModelAPI_AttributeSelection::type());
- data()->addAttribute(DISTANCE_ATTR, ModelAPI_AttributeDouble::type());
+ data()->addAttribute(ConstructionPlugin_Plane::FACE(), ModelAPI_AttributeSelection::type());
+ data()->addAttribute(ConstructionPlugin_Plane::DISTANCE(), ModelAPI_AttributeDouble::type());
}
void ConstructionPlugin_Plane::execute()
{
- AttributeSelectionPtr aFaceAttr = data()->selection(FACE_ATTR);
- AttributeDoublePtr aDistAttr = data()->real(DISTANCE_ATTR);
+ AttributeSelectionPtr aFaceAttr = data()->selection(ConstructionPlugin_Plane::FACE());
+ AttributeDoublePtr aDistAttr = data()->real(ConstructionPlugin_Plane::DISTANCE());
if ((aFaceAttr.get() != NULL) && (aDistAttr.get() != NULL) &&
aFaceAttr->isInitialized() && aDistAttr->isInitialized()) {
void ConstructionPlugin_Plane::customisePresentation(AISObjectPtr thePrs)
{
- thePrs->setColor(50, 255, 50);
+ std::vector<int> aRGB = Config_PropManager::color("Visualization", "construction_plane_color",
+ ConstructionPlugin_Plane::DEFAULT_COLOR());
+ thePrs->setColor(aRGB[0], aRGB[1], aRGB[2]);
thePrs->setTransparensy(0.6);
-}
\ No newline at end of file
+}