Skip to content

grasshopperWebUI 0.2

Pre-release
Pre-release
Compare
Choose a tag to compare
@grazianoEnzoMarchesani grazianoEnzoMarchesani released this 02 Jan 16:49
· 1 commit to main since this release

Version 0.2.0 Changelog

Architecture Changes

  • Decoupled server functionality into separate components:
    • Server creation component
    • HTML update component
    • Web page opening component
  • Implemented volatile web page serving (no physical file storage)
  • Introduced dual JSON system for component state management:
    • Write JSON: Controls state updates from Grasshopper
    • Read JSON: Handles user input from web interface

New Custom Input Components

Introduced a suite of customizable input controls with the following features:

  • Configurable CSS styling
  • Label support
  • Minimum and maximum value constraints
  • Unique ID system

New components include:

  1. Slider Control
    • Single value slider with continuous input
  2. Range Slider Control
    • Dual-handle slider for range selection
  3. Number Input Control
    • Direct numerical input field
  4. Stepper Control
    • Increment/decrement controls for precise value adjustment

Component Properties

Each input component supports:

  • Custom labeling
  • Value constraints (min/max)
  • Unique identifier
  • Custom styling through CSS
  • Real-time value updates

Technical Details

  • Compatible with Rhino 8
  • Built with Python 3
  • Uses native Python libraries for server functionality
  • Real-time bidirectional communication between Grasshopper and web interface

Requirements

  • Rhino 8
  • Python 3.x
  • Web browser with JavaScript enabled

These packages are essential for:

  • Flask: Web server functionality and API endpoints
  • NumPy: Numerical operations and array handling
  • json5: Enhanced JSON processing

Usage

  1. Add server component to your Grasshopper definition
  2. Connect desired input components
  3. Configure component parameters
  4. Access the interface through your web browser

Notes

  • Web interface runs in memory without creating physical files
  • Component states are managed through JSON data exchange
  • All components support real-time updates