Summary
Provide a way to render multiple element/node groups at once, each with its own outline colour that reads through occluding geometry. Today the only style that shows through the part — the selection outline (SelectionHighlightMode.OutlineOnly) — uses a single global colour, so it can convey only one group at a time.
Use case / motivation
In a CAM application we render machined parts that contain several distinct feature groups — for example hole groups distinguished by type or by machining operation. We want to display multiple groups simultaneously, each in a distinct colour, with the styling readable even where the solid body occludes the geometry, so the user can see grouped/occluded features without having to hide, ghost, or make the part transparent.
The selection-highlight outline post-process is the only mechanism that gives a crisp “shows through the part” cue. Because its colour is a single global value, we can only ever represent one group at a time this way. There is currently no way to render N differently-coloured outlines that all show through the part at once.
Current limitations (Web Viewer, as of 2026.x)
- Selection outline colour is global.
setNodeElementSelectionOutlineColor/setNodeSelectionOutlineColorset one colour; aSelectionItemcarries no per-item colour, and aWebViewerhas a singleSelectionManager. So one selection set = one outline colour. - Silhouette edges (
View.setSilhouetteEnabled/ silhouette colour) are view-global and single-colour. - X-Ray buckets geometry only into
XRayGroup.Selected/.Unselected(two groups), sosetXRayColorcannot express N per-group colours. - Highlight (
setNodesHighlighted,setNodeLineHighlighted) uses one global highlight colour. - Direct colouring (
setNodesColors/setNodesLineColor/setNodeFaceColor) — the documented multi-colour workaround — gives arbitrary per-node/face colours but is depth-occluded: no outline, no through-part rendering. - Custom shaders (
setNodesShader) are per-node and yield a see-through fill/glow, not a screen-space outline.
Net: multi-colour is available only without through-part rendering; through-part rendering is available only in a single colour.
Proposed capability (options — not prescriptive)
Any one of the following would solve this; listed roughly in increasing generality:
- Per-node / per-selection-set outline colour. Allow the outline post-process to take a colour per node (or per
SelectionItem, or per highlight group) instead of one global colour. - Multiple named highlight/outline groups, each with its own outline colour (ideally width and opacity too), all rendered simultaneously and all retaining the current “shows through occluding geometry” property.
- A per-node “see-through” render style with a colour parameter that produces a crisp screen-space outline (not only a fill/glow), so application code can assign N colours to N node groups.
Nice-to-have alongside any of the above: per-outline width and opacity/alpha control (related to the existing outline-width and outline-alpha feature requests).
Acceptance criterion
From the Web Viewer API, an application can assign two or more node/face groups to distinct outline colours and have all of them render at the same time, each visible through occluding geometry — as the current OutlineOnly selection highlight is — without hiding, ghosting, or making the part transparent, and without collapsing to a single global colour.