if (!anAIS)
anAIS = AISObjectPtr(new GeomAPI_AISObject);
anAIS->createShape(aShape);
- anAIS->setWidth(5);
+ std::shared_ptr<ModelAPI_AttributeBoolean> anAuxiliaryAttr =
+ aBaseFeature->data()->boolean(SketchPlugin_SketchEntity::AUXILIARY_ID());
+
+ bool isConstruction = anAuxiliaryAttr.get() != NULL && anAuxiliaryAttr->value();
+
std::vector<int> aColor;
- aColor = Config_PropManager::color("Visualization", "sketch_entity_color",
- SKETCH_ENTITY_COLOR);
- anAIS->setColor(aColor[0], aColor[1], aColor[2]);
+ double aWidth = SketchPlugin_SketchEntity::SKETCH_LINE_WIDTH();
+ int aLineStyle = SketchPlugin_SketchEntity::SKETCH_LINE_STYLE();
+ if (isConstruction) {
+ aColor = Config_PropManager::color("Visualization", "sketch_auxiliary_color",
+ SKETCH_AUXILIARY_COLOR);
+ aWidth = SketchPlugin_SketchEntity::SKETCH_LINE_WIDTH_AUXILIARY();
+ aLineStyle = SketchPlugin_SketchEntity::SKETCH_LINE_STYLE_AUXILIARY();
+ }
+ else {
+ aColor = Config_PropManager::color("Visualization", "sketch_entity_color",
+ SKETCH_ENTITY_COLOR);
+ }
+ anAIS->setColor(aColor[0], aColor[1], aColor[2]);
+ anAIS->setWidth(aWidth + 1);
+ anAIS->setLineStyle(aLineStyle);
}
return anAIS;
}