X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_SketchEntity.h;h=1af4d28bbc9541abccb51ad2672cbaded7bc3f6b;hb=b5893b0a30fac08134c24de4565cb513a43affa6;hp=dd7c0d36e805552e1c98da47747de8096d396545;hpb=423c10234142d14d0d5de89383f2f96a4ec5930f;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_SketchEntity.h b/src/SketchPlugin/SketchPlugin_SketchEntity.h index dd7c0d36e..1af4d28bb 100644 --- a/src/SketchPlugin/SketchPlugin_SketchEntity.h +++ b/src/SketchPlugin/SketchPlugin_SketchEntity.h @@ -20,11 +20,6 @@ #include -#define SKETCH_ENTITY_COLOR "225,0,0" -#define SKETCH_EXTERNAL_COLOR "170,0,225" -#define SKETCH_AUXILIARY_COLOR "0,85,0" -#define SKETCH_OVERCONSTRAINT_COLOR "0,0,0" - /**\class SketchPlugin_SketchEntity * \ingroup Plugins * \brief Sketch Entity for creation of the new feature in PartSet. @@ -115,7 +110,7 @@ class SketchPlugin_SketchEntity : public SketchPlugin_Feature, public GeomAPI_IC std::string aSection, aName, aDefault; theResult->colorConfigInfo(aSection, aName, aDefault); std::vector aColor; - aColor = Config_PropManager::color(aSection, aName, aDefault); + aColor = Config_PropManager::color(aSection, aName); thePrs->setColor(aColor[0], aColor[1], aColor[2]); } @@ -133,16 +128,13 @@ class SketchPlugin_SketchEntity : public SketchPlugin_Feature, public GeomAPI_IC data()->boolean(SketchPlugin_SketchEntity::AUXILIARY_ID()); bool isConstruction = anAuxiliaryAttr.get() != NULL && anAuxiliaryAttr->value(); if (isConstruction) { - aColor = Config_PropManager::color("Visualization", "sketch_auxiliary_color", - SKETCH_AUXILIARY_COLOR); + aColor = Config_PropManager::color("Visualization", "sketch_auxiliary_color"); } else if (isExternal()) { - aColor = Config_PropManager::color("Visualization", "sketch_external_color", - SKETCH_EXTERNAL_COLOR); + aColor = Config_PropManager::color("Visualization", "sketch_external_color"); } else { - aColor = Config_PropManager::color("Visualization", "sketch_entity_color", - SKETCH_ENTITY_COLOR); + aColor = Config_PropManager::color("Visualization", "sketch_entity_color"); } if (!aColor.empty()) { thePrs->setColor(aColor[0], aColor[1], aColor[2]); @@ -170,6 +162,11 @@ class SketchPlugin_SketchEntity : public SketchPlugin_Feature, public GeomAPI_IC double aWidth = thePrs->width(); isCustomized = thePrs->setWidth(aWidth / 2.5) || isCustomized; } + + if (!theResult.get()) { + double aDeflection = Config_PropManager::real("Visualization", "construction_deflection"); + thePrs->setDeflection(aDeflection); + } return isCustomized; }