#include <Config_PropManager.h>
-#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. This is an abstract class to give
+ * \brief Sketch Entity for creation of the new feature in PartSet.
+ * This is an abstract class to give
* an interface to create the entity features such as line, circle, arc and point.
*/
class SketchPlugin_SketchEntity : public SketchPlugin_Feature, public GeomAPI_ICustomPrs
std::string aSection, aName, aDefault;
theResult->colorConfigInfo(aSection, aName, aDefault);
std::vector<int> aColor;
- aColor = Config_PropManager::color(aSection, aName, aDefault);
+ aColor = Config_PropManager::color(aSection, aName);
thePrs->setColor(aColor[0], aColor[1], aColor[2]);
}
bool isCustomized = theDefaultPrs.get() != NULL &&
theDefaultPrs->customisePresentation(theResult, thePrs, theDefaultPrs);
int aShapeType = thePrs->getShapeType();
- // a compound is processed like the edge because the arc feature uses the compound for presentable AIS
+ // a compound is processed like the edge because the
+ // arc feature uses the compound for presentable AIS
if (aShapeType != 6/*an edge*/ && aShapeType != 7/*a vertex*/ && aShapeType != 0/*compound*/)
return false;
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]);
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;
}