HoopsCuttingSectionToolbarElement
-
class
wvc.HoopsCuttingSectionToolbarElement() A comprehensive toolbar component for managing cutting section operations.
This component provides a complete interface for cutting section management, including:
- Dropdown menu for creating cutting planes with various orientation presets
- Support for axis-aligned planes (X, Y, Z axes)
- Face-based plane creation using selected geometry
- Custom plane creation with arbitrary orientation
- Section-wide operations (visibility toggle, clear, activate/deactivate)
- Visual feedback for section state and capacity limits
The toolbar automatically updates when cutting sections change and provides intuitive controls for both novice and advanced users.
Constructors
-
wvc.HoopsCuttingSectionToolbarElement.constructor() - HoopsCuttingSectionToolbarElement():
HoopsCuttingSectionToolbarElementConstructs a new HoopsCuttingSectionToolbarElement.
Initializes the component with default property values and binds the invalidateToolbar method for proper event handling context.
Returns:
HoopsCuttingSectionToolbarElement
Properties
-
wvc.HoopsCuttingSectionToolbarElement.styles static
styles: CSSResult[]Array of styles to apply to the element. The styles should be defined using the ? tag function, via constructible stylesheets, or imported from native CSS module scripts.
Note on Content Security Policy:
Element styles are implemented with
<style>tags when the browser doesn’t support adopted StyleSheets. To use such<style>tags with the style-src CSP directive, the style-src value must either include ‘unsafe-inline’ ornonce-<base64-value>with<base64-value>replaced be a server-generated nonce.To provide a nonce to use on generated
<style>elements, setwindow.litNonceto a server-generated nonce in your page’s HTML, before loading application code:<script> // Generated and unique per request: window.litNonce = 'a1b2c3d4'; </script>
-
wvc.HoopsCuttingSectionToolbarElement.sectionIndex - sectionIndex: number
The index of the cutting section to manage with this toolbar. Used to identify which section’s operations this toolbar controls.
-
wvc.HoopsCuttingSectionToolbarElement.service optional
service:ICuttingServiceThe cutting service instance that provides cutting section operations. All toolbar operations are performed through this service interface. When undefined, the toolbar renders nothing.
Methods
-
wvc.HoopsCuttingSectionToolbarElement.render() - render(): (TemplateResult | Unhandled type TypeOf)
Renders the cutting section toolbar component.
Creates a comprehensive toolbar with:
- Dropdown menu for plane creation with 5 preset options:
- X-axis aligned plane
- Y-axis aligned plane
- Z-axis aligned plane
- Face-based plane (using selected geometry)
- Custom plane with arbitrary orientation
- Reference geometry visibility toggle button
- Clear section button to remove all planes
- Active/inactive state switch for the entire section
The toolbar provides visual feedback for:
- Section capacity limits (max 3 planes)
- Face selection availability
- Section active/inactive state
- Reference geometry visibility state
Returns: (TemplateResult | Unhandled type TypeOf)
TemplateResult containing the toolbar interface, or nothing if no service exists