+
+void PartSet_ResultSketchPrs::setAuxiliaryPresentationStyle(const bool isAuxiliary)
+{
+ std::vector<int> aColor;
+ Standard_Real aWidth;
+ Standard_Integer aLineStyle;
+
+ if (!isAuxiliary) {
+ aColor = Config_PropManager::color("Visualization", "result_construction_color",
+ ModelAPI_ResultConstruction::DEFAULT_COLOR());
+ aWidth = PartSet_Tools::getAISDefaultWidth();// default width value
+ aLineStyle = SketchPlugin_SketchEntity::SKETCH_LINE_STYLE();
+ }
+ else {
+ 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();
+ }
+
+ Handle(Prs3d_Drawer) aDrawer = Attributes();
+ setColor(aDrawer, Quantity_Color(aColor[0] / 255., aColor[1] / 255., aColor[2] / 255.,
+ Quantity_TOC_RGB));
+
+ setWidth(aDrawer, aWidth);
+ // set line style
+ Handle(Prs3d_LineAspect) aLineAspect;
+
+ Aspect_TypeOfLine aType = (Aspect_TypeOfLine)aLineStyle;
+ if (aDrawer->HasOwnLineAspect()) {
+ aLineAspect = aDrawer->LineAspect();
+ }
+ if (aDrawer->HasOwnWireAspect()) {
+ aLineAspect = aDrawer->WireAspect();
+ }
+ Quantity_Color aCurrentColor;
+ Aspect_TypeOfLine aPrevLineType;
+ Standard_Real aCurrentWidth;
+ aLineAspect->Aspect()->Values(aCurrentColor, aPrevLineType, aCurrentWidth);
+ bool isChangedLineType = aType != aPrevLineType;
+ if (isChangedLineType) {
+ aLineAspect->SetTypeOfLine(aType);
+ }
+}