Starting from Eyeshot 2022.2 it is possible to draw semi-transparent dynamically selected entities with outlines.
All the relevant settings are grouped under the property Workspace.Selection. The new SelectionSettings class contains all the properties related to the appearance of dynamic selection.
To enable semi-transparent dynamic selection the property Workspace.Selection.ColorDynamic must be set to a transparent color (ColorDynamic.A < 255).
Halo Color
Dynamically selected entities are drawn with a halo surrounding them. This halo could be single colored or multi colored. The following properties determine the halo color:
- Workspace.Selection.HaloInnerColor
- Workspace.Selection.HaloOuterColor
Halo Width
The width of the halo effect is determined by the following properties:
- Workspace.Selection.HaloWidthPolygons
- Workspace.Selection.HaloWidthWires.
The first determines the halo width for polygonal entities while the second is the values used for wireframe entities and Brep.Edges.
It is also possible for derived classes that inherit from Entity to override the property Entity.DynamicSelectionHaloMode to specify the halo thickness for the custom entity if the default implementation is not suitable.
Examples
Smooth
design1.Selection.ColorDynamic = Color.FromArgb(80, Color.OrangeRed);
design1.Selection.HaloInnerColor = Color.FromArgb(255, Color.OrangeRed);
design1.Selection.HaloOuterColor = Color.FromArgb(64, Color.OrangeRed);
design1.Selection.HaloWidthPolygons = 4;
design1.Selection.HaloWidthWires = 2;
Multicolor
design1.Selection.ColorDynamic = Color.FromArgb(80, Color.DodgerBlue);
design1.Selection.HaloInnerColor = Color.FromArgb(200, Color.Cyan);
design1.Selection.HaloOuterColor = Color.FromArgb(60, Color.DodgerBlue);
design1.Selection.HaloWidthPolygons = 4;
design1.Selection.HaloWidthWires = 2;
Multicolor No Fill
design1.Selection.ColorDynamic = Color.Empty;
design1.Selection.HaloInnerColor = Color.FromArgb(255, Color.White);
design1.Selection.HaloOuterColor = Color.FromArgb(64, Color.Gold);
design1.Selection.HaloWidthPolygons = 4;
design1.Selection.HaloWidthWires = 2;
Comments
ActionMode = actionType.SelectVisibleByPickDynamic;
haloColor is SelectVisibleByPickDynamic Only ?
Yes, the semi-transparent highlight and the halo effect are available only for Dynamic Selection in version 2022.2.
However, we are already working on implementing the same effect for static selection too.
Please sign in to leave a comment.