Skip to content

About

Chapulines — build focused Windows applications from Rhino and Grasshopper definitions.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chapulines

Download Chapulines for Windows

Install Chapulines: download the installer above, run it, and open Chapulines from the Start menu or desktop shortcut. The installer contains the compiled application, with no source code, and includes the .NET runtime. No development tools are needed to run the editor.

Requirements: 64-bit Windows 10 or later and an installed, licensed Rhino 9. Install any additional Grasshopper plug-ins required by your definitions separately. The installer is currently unsigned, so Windows may show a publisher warning.

The September 25, 2026 release packages the latest local source, including data elements, shared selection scaling, and canvas/resize improvements. See releases and checksums. GitHub's automatic Source code archives are for developers; use the download button above to install.

Developer instructions for the installer are in installer/README.md.

Chapulines is a Windows application for turning a Grasshopper definition into a focused, user-friendly application. Rhino and Grasshopper perform the geometry calculations in the background while Chapulines presents only the controls and viewport needed by the end user.

Status

The September 24 data-elements update adds Value display, Quick graph, Text input, and File / folder path to the toolbox and Element menu. They use the existing Grasshopper binding grip, preserve project settings, and work in Preview and compiled applications. The updated Chapulines Editor shortcut in Chapulines_Latest targets Editor-2026-09-24-DataElements. See data elements and connections.

The September 24 group-scaling update adds an overall multi-selection bounding box with eight handles. Corners scale free elements proportionally; sides resize selected widths or heights together, including adaptive stack rows. Escape cancels and one undo restores the complete gesture. Open the Chapulines Editor shortcut in Chapulines_Latest for Editor-2026-09-24-GroupScale. See shared selection scaling.

The September 24 resize repair is published in D:\Chapulines_NewProject\Chapulines_Latest\Editor-2026-09-24-Resize. Use the Chapulines Editor shortcut in Chapulines_Latest. Left/right handles now move the grabbed edge through nested sections while keeping the opposite edge fixed. See resize behavior and verification.

The dedicated published release is in D:\Chapulines_NewProject\Chapulines_Latest. Open Editor-2026-09-23-Canvas\Chapulines.App.exe (or the Chapulines Editor shortcut there). The September 23 canvas update adds a shared guide/selection layer, coalesced mouse movement, cached zoom feedback, and faster nested layout. See canvas motion results and remaining limits. It also includes rectangle selection, shared properties, centered arrows, and accurate drag grab points. Its Examples folder contains Hex Wall panel, Shape Studio, Twist Tower, and Wave Pavilion, each with editable files, a standalone app, and separate Edit/Run launchers. Standalone examples retain their previous builds; use their Edit launchers to try the updated designer.

The latest build is the September 22 Hex Wall panel update, based on the supplied newTest3.gh. Run run-hex-wall-panel.cmd for its editable interface with nine ruler rows, two attractors, a flat-panel comparison, layer switches, and relief/context views. See Hex Wall panel.

The latest repair clears old text and switch/button states before repainting and shows a floating image of the element during dragging. Restart the designer through the launcher to load these fixes.

The September 21 architectural examples remain available: run-architectural-examples.cmd for the designer, run-twist-tower.cmd for the tower study, and run-wave-pavilion.cmd for the ribbed canopy. Both examples have editable native Grasshopper graphs, aligned section cards, perspective and plan views, and standalone applications. See architectural examples.

The preceding interactive-controls build remains available through run-interactive-controls.cmd: Button and Toggle components, independent compact ruler rows, and the minimal gumball switch. Run run-shape-studio.cmd for the simpler introduction. See interactive controls and the example.

Run run-shared-controls.cmd for the shared-control update: additive gumball and slider connections, one switch for multiple gumball targets, compact controls, supplied toolbar icons, and Bake Application. See shared controls.

The latest designer refinement adds Photoshop-style ruler guides, direct text editing, smaller viewports, themed dropdowns and scrollbars, and graph mapper appearance options. Run run-designer-polish.cmd; see the interaction guide.

The editor now includes a persistent Layers panel, fluid column/row/grid presets, stretching stacks and wrapping layouts, drag-and-drop between containers, and shared modern slider/switch styling in preview and compiled applications. Camera navigation avoids Grasshopper solutions when viewport outputs are unused, and batches consumed-output updates. See the UX review for behavior, findings, validation and the remaining feature roadmap. run-ux-preview.cmd builds a separate Release copy for review while an existing app instance remains open.

Chapulines has a native desktop designer and a complete compiled-application pipeline. Its toolbox targets an actual embedded Windows Form with invisible snapping and temporary alignment guides. Slider groups, point/plane-gumball switches, Rhino viewports, and layout containers can be selected, moved, and resized with design handles, while a WinForms property grid edits the selected control or form. Chapulines works with one Grasshopper definition at a time. Each Grasshopper-aware control has its own binding component. Build > Compile Application generates the designed form as a standalone Windows application. Versioned .chapulines projects now save and reopen the complete editable design, including its Grasshopper definition and bindings. The File, Edit, View, and Element menus include editing history, clipboard operations, configurable PDF export, and geometry baking; see menu and PDF settings.

Slider interaction playground

For the newer Pinterest-inspired spatial and direct-manipulation studies, run run-interaction-lab.cmd. It opens a lightweight native sandbox with a field pad, vector compass, response curve, shape mixer, selection brush, and moving ruler. Interaction instrument notes describe gestures, reference sources, and integration limits. These remain unapproved prototypes and do not change the production controls.

Run run-slider-playground.cmd to open four interactive proposals without starting Rhino, or choose View > Slider playground in the designer. These experimental controls are isolated from ModernSliderTrack; the production slider retains its earlier design until a proposal is approved. Compare Caliper (variable precision), Magnetic stations (preferred dimensions with Alt bypass), Ratio scale (positive logarithmic values), and Interval (two limits with band translation). Each has distinct typography, grip geometry, hover feedback, exact-value inputs, and live feedback. The font menus change the ruler numbers; the motion checkbox disables animated focus.

The equivalent application flag is --slider-playground; --capture-study <path.png> captures the comparison window. See the study notes for gestures, intended uses, tradeoffs, and integration implications.

Requirements

  • Windows x64
  • Rhino 9, including Rhino 9 WIP during development
  • .NET 10 SDK
  • Visual Studio with .NET desktop development support, or the dotnet CLI

Chapulines must display a clear error and stop when a compatible Rhino 9 installation cannot be found. Rhino is a runtime dependency and will not be redistributed with Chapulines.

Generated applications are intentionally framework-dependent to keep their output small. A computer running one needs Rhino 9 and the .NET 10 Windows Desktop Runtime. It does not need Chapulines, Visual Studio, or the .NET SDK.

Rhino discovery on published installations

No machine-specific Rhino path is compiled into Chapulines. The application calls RhinoInside.Resolver.Initialize() during startup and lets the official Rhino.Inside resolver locate a registered Rhino installation. The Rhino.Inside 9 resolver selects a matching major version by default, so Chapulines will not silently load Rhino 8 or a later incompatible major version.

If discovery or resolver initialization fails, Chapulines displays a Rhino 9 requirement error and stops. The published application includes the Rhino.Inside resolver, but it does not redistribute RhinoCommon, Grasshopper, or Rhino itself.

MVP

The first usable version will:

  • Find and start Rhino 9 through Rhino.Inside.
  • Load Grasshopper and a selected .gh or .ghx definition.
  • Provide a visual designer with slider and Rhino viewport controls.
  • Create a persistent Grasshopper binding component for each Chapulines slider control.
  • Create a gumball checkbox that edits persistent Grasshopper Point and Plane parameters in a Chapulines viewport.
  • Create a persistent Grasshopper geometry binding component for each Rhino viewport.
  • Synchronize Grasshopper Number Sliders and Chapulines controls in both directions.
  • Represent multiple connected Number Sliders as a dynamic slider group.
  • Synchronize binding-component and designer-control selection in both directions while the Grasshopper editor is open.
  • Save and reopen a versioned .chapulines project.

Production installer packaging and advanced viewport picking follow after the MVP runtime and designer are stable.

Solution structure

src/
  Chapulines.App/           WinForms designer and runner
  Chapulines.Core/          Project models and shared contracts
  Chapulines.Rhino/         Rhino.Inside and Grasshopper hosting
  Chapulines.Grasshopper/   Custom Grasshopper binding component
  Chapulines.Runtime/       Lean generated-application runtime
  Chapulines.Compiler/      Manifest, source generation, and Roslyn compilation
tests/
  Chapulines.Core.Tests/    Tests that do not require Rhino
  Chapulines.Compiler.Tests/ Generated application packaging and runtime isolation tests
  Chapulines.Designer.Tests/ Layout movement, adaptive sizing and control interaction tests

Rhino-dependent code stays outside Chapulines.Core so most behavior can be tested without starting Rhino.

Designer modes

  • Design mode uses resizable Toolbox, Layers and Properties panels, searchable controls and hierarchy, a compact command toolbar, temporary alignment guides, and selection handles. The designed form is fixed to the document area's top-left origin and resizes from its right and bottom edges. Drag control headers or Layers rows to rearrange or nest them. Drop on the surrounding workspace or the Layers root to move a control out of a layout.
  • Run Preview opens the designed Form as a separate top-level application window. Designer chrome is removed and the layout is locked so sliders and the Rhino viewport receive normal user input.

Press F5 to enter Run Preview and Shift+F5 to return to Design mode. Add as many slider, point/plane/Kangaroo/widget interaction, Rhino viewport, or layout controls as the interface needs. Select a control and press the keyboard Delete key to remove it. Removing a Grasshopper-aware control also removes its Chapulines binding component from the in-memory Grasshopper document.

Use File > Import Grasshopper Definition (or Ctrl+I) to open one .gh or .ghx definition. Opening another definition closes and replaces the current one.

Use View > Toolbox (Ctrl+Alt+X) and View > Properties Window (F4) to show or hide the designer tool windows. Use Grasshopper > Show Grasshopper Editor (Ctrl+G) to reopen the editor for the active definition. The command toolbar provides the same Open, Grasshopper, Run Preview, and Stop Preview actions and shows the active definition and designer mode.

Adding a slider creates a Chapulines Slider Binding with one unlabeled Galapagos-style grip. It accepts only Number Sliders and Gene Pools. Dragging replaces the association, Shift-drag adds another source, and Ctrl-drag removes one. Gene Pool entries appear as individual controls in Chapulines.

Adding a Point / Plane / Grab / Widget control creates a checkbox and a preview-capable Chapulines Gumball Binding with one Galapagos-style grip. Associate that grip with a floating Point or Plane parameter, a component's Point or Plane input, Kangaroo's primary Grab component, or Rhino WIP's Angular Widget or Curve Widget component. To make the interaction available in a Rhino viewport, connect that viewport's Chapulines Viewport Binding grip to the Gumball Binding just like any other preview-capable component. Several Viewport Bindings may target the same Gumball. An interaction that is not targeted by a View component is intentionally unavailable in every viewport. The Gumball Binding has an Enabled Boolean output: it returns true while its Chapulines checkbox is enabled and false while disabled, allowing the Grasshopper definition to react to the interaction state.

Point and Plane parameters must contain persistent data and have no incoming Grasshopper source. Turning on the checkbox displays one handle per persistent Point/Plane value only in the associated Chapulines viewports. Point markers follow Grasshopper's configured preview style, size, and selected-preview color; planes use Grasshopper's own plane-preview drawing. Drag the red, green, or blue arrow for axis translation, use the colored square grips for XY, YZ, or ZX translation, or drag the white center in the camera plane. Plane gumballs align to the plane axes and add red, green, and blue rotation arcs. Grips turn yellow when hovered. Movement updates persistent data and recomputes Grasshopper continuously.

For a Kangaroo Grab association, leave the Grab component's On input enabled, turn on the Chapulines checkbox, and left-drag particles in one of its associated Rhino viewports. Chapulines sends that embedded viewport's world-space mouse ray through Kangaroo's own Grab goal, including its Strength and Range settings; it does not duplicate the solver or require a compile-time Kangaroo reference. Releasing the mouse clears Kangaroo's selected particle. Right- and middle-button viewport navigation remains available. Compiled applications preserve both the Grab target and its selected viewport relationships by object GUID and use the same interaction path; Kangaroo must be installed with Rhino on the destination computer.

For Angular and Curve Widget associations, Chapulines invokes Rhino's native widget-grip renderer only in the associated embedded viewports. The path, major and minor ticks, labels, angular annotation, colors, hover feedback, DPI scaling, and grip glyph therefore match Rhino and Grasshopper rather than being approximated by Chapulines. Dragging follows the widget's arc or curve, respects its floating/integer/even/odd accuracy, updates the widget through its own public parameter API, and recomputes Grasshopper continuously. Chapulines recognizes these Rhino WIP components by stable component GUID and does not take a binary dependency on XformComponents.gha. Generated applications preserve the same relationship, rendering, and interaction behavior; the destination Rhino 9 installation must include these widget components.

Adding a Rhino viewport creates a Chapulines Viewport Binding with one unlabeled Galapagos-style grip. Associate that grip with a preview-capable component body, a Chapulines Gumball Binding, or a geometric/preview-capable output parameter. Numeric, text, boolean, and other non-preview outputs are rejected. Component associations invoke the component's preview behavior; output associations draw the preview-capable geometry contained in that output. Targeting a Gumball Binding both previews its associated Point/Plane/Grab object and enables that interaction in the viewport. This includes Grasshopper's Custom Preview component, so display colors and materials are retained. In binding-only modes, other Grasshopper preview geometry is intentionally excluded from the Chapulines viewport. Double-click the viewport control to open and select its binding in Grasshopper.

While the Grasshopper editor is visible in Design mode, embedded viewports use Grasshopper's normal full-document preview. Closing the editor switches them to binding-only preview. Run Preview always disables the normal Grasshopper preview. Each viewport has a Preview Entire Definition Boolean property: when false, it displays only geometry associated with its View binding; when true, it displays every preview-enabled object in the Grasshopper definition and the View component may remain unconnected. A View binding also follows its Grasshopper Preview toggle: its viewport geometry is visible while Preview is on and hidden while Preview is off. Closing the Grasshopper document preserves a headless in-memory replacement so sliders continue to solve and viewports continue to update.

The Properties window configures each viewport independently. A newly added viewport starts from Rhino's native default Perspective viewport, including its camera, target, lens, display mode, construction plane, background, grid, axes, colors, and visibility. It does not automatically fit Grasshopper geometry, just as a normal Rhino viewport does not change its camera when geometry is recalculated. The Properties window exposes every installed Rhino display mode, display-mode or solid-color backgrounds, Perspective/Parallel/Two-Point Perspective projection, lens length and horizontal field of view, expandable XYZ camera location/target/up-vector editors, camera distance and direction, projection locking, navigation and orbit behavior, grid/axis visibility, independent grid and snap spacing, line counts, and optional automatic geometry fitting. Orbiting, panning, or zooming in the designer updates the stored camera rather than reverting when Run Preview starts. These settings are applied immediately in Design mode, copied to Run Preview, and hardcoded into the generated application.

To synchronize two viewports, select either viewport and choose the other control from Viewport Camera > Synchronized With in the Properties window. The link is bidirectional: orbit, pan, zoom, projection, lens length, camera location, target, and up-vector changes are copied to its partner. Display mode, background, grid, and Grasshopper geometry bindings remain independent. Choose (None) from either viewport to disconnect the pair. The link uses an internal identifier, so renaming a viewport does not break it, and it is preserved in Run Preview and compiled applications.

Each Chapulines Viewport Binding uses a native-style variable-parameter model similar to Rhino's Model Object components. It has no fixed input or output. Right-click Parameters to see every option once; checking an option adds its input and effective-value output as a pair. Show all parameters and Hide unconnected parameters manage those pairs together. Available controls include native Model Display Mode, solid background and color, projection, lens length, camera location/target/up, projection lock, grid/axis visibility, grid and snap spacing, line counts, auto zoom, navigation, orbit behavior, and full-definition preview.

Each selected input overrides only its corresponding Properties value. Disconnecting or hiding a parameter pair restores that Properties value. Dedicated camera parameters provide stable, distortion-free camera control without exposing raw frustum X/Y/Z extents. The parameter relationships and effective V output are preserved in Run Preview and the compiled application even though the design-time Viewport Binding component is removed from the embedded definition.

Selecting a Chapulines slider or viewport highlights its binding and associated objects only while the Grasshopper editor is visible. Selecting a Chapulines binding component in Grasshopper selects the corresponding designer control and displays its properties. Closing the editor clears Grasshopper highlighting.

Compiling an application

Open and solve the Grasshopper definition and finish its slider and viewport associations. Use Build > Export Compiled Definition to save the sanitized definition as a normal .gh file that can be opened directly in Grasshopper. The exported copy is generated in memory, leaves the open source definition unchanged, and contains the same cleaned Grasshopper document that Chapulines embeds during compilation: Chapulines binding components are removed while their GUID-based relationships remain in the generated application's manifest.

Use Build > Compile Application (Ctrl+Shift+B) or the Compile toolbar button to choose the final .exe location. Chapulines then:

  1. Captures the form, nested layouts, control properties, and stable Grasshopper object identifiers.
  2. Clones the Grasshopper document entirely in memory, leaving the open source definition unchanged.
  3. Removes every Chapulines Slider/Point/View binding component from the clone.
  4. Solves, serializes, reloads, GUID-validates, and solves the sanitized definition again.
  5. Embeds the resulting .gh bytes and SHA-256 fingerprint in generated code/resources.
  6. Uses Roslyn to compile an optimized x64 Windows application and packages its managed code and metadata into a single-file .exe.

The generated folder contains only ApplicationName.exe and Rhino.Inside.dll. ApplicationName.dll, ApplicationName.deps.json, ApplicationName.runtimeconfig.json, Chapulines.Core.dll, and Chapulines.Runtime.dll are bundled inside the executable. System.Runtime.Serialization.Formatters.dll is not required or included.

The generated runtime resolves Number Sliders, Gene Pool entries, Point and Plane parameters, Kangaroo Grab components, Angular/Curve Widget components, and viewport targets once by GUID and then accesses them directly. The output deliberately excludes the design-time assemblies Chapulines.App, Chapulines.Compiler, Chapulines.Rhino, and Chapulines.Grasshopper; the binding relationships are immutable generated code, and the design-time helper components are not present in the embedded definition. Rhino.Inside.dll remains beside the executable so its official installation resolver can locate Rhino reliably on each computer. Third-party Grasshopper plug-ins used by the definition must still be installed for Rhino 9 on the destination computer.

Roadmap

  • Initialize the repository and .NET 10 solution.
  • Establish application, core, Rhino host, Grasshopper plugin, and test projects.
  • Use Rhino.Inside's installation resolver and report actionable errors.
  • Prove Rhino.Inside startup and shutdown in the WinForms host.
  • Load and solve a Grasshopper definition.
  • Embed an interactive Rhino viewport and verify its lifecycle.
  • Display Grasshopper preview geometry in an embedded Rhino viewport.
  • Implement the Grasshopper slider binding component.
  • Implement two-way slider synchronization.
  • Implement persistent Point and Plane editing with viewport translation and rotation handles.
  • Support dynamic slider groups and Grasshopper highlighting.
  • Build the first visual designer.
  • Save, validate, and reopen .chapulines projects.
  • Harden and package an MVP alpha.
  • Sanitize and embed the Grasshopper definition for a fixed application.
  • Generate specialized applications with Roslyn.
  • Run generated applications through a fresh-process Rhino/Grasshopper smoke test.

Build and test

For the menu and PDF settings build, run run-menu-features.cmd. Its separate output is artifacts/menu-features/bin/Chapulines.App/release; the earlier insertion-fix build is preserved.

For everyday development, double-click run.cmd or run it from a terminal:

.\run.cmd

The script uses dotnet run, so changed source files are rebuilt automatically before Chapulines starts.

dotnet restore Chapulines.sln
dotnet build Chapulines.sln --no-restore
dotnet test Chapulines.sln --no-build

To run only the Rhino installation preflight:

dotnet run --project src/Chapulines.App -- --check-rhino

To start Rhino.Inside, verify its runtime version, and shut it down automatically:

dotnet run --project src/Chapulines.App -- --smoke-test-rhino

To create the embedded Rhino viewport and verify its startup and cleanup:

dotnet run --project src/Chapulines.App -- --smoke-test-viewport

To open the full Grasshopper editor and verify its startup and cleanup:

dotnet run --project src/Chapulines.App -- --smoke-test-grasshopper-editor

To verify switching from Design mode to Run Preview and back:

dotnet run --project src/Chapulines.App -- --smoke-test-preview-mode

To start Rhino and Grasshopper, load and solve a definition, and shut down automatically:

dotnet run --project src/Chapulines.App -- --smoke-test-grasshopper "C:\path\to\definition.gh"

To create a Chapulines binding component and connect the first Number Slider in a definition:

dotnet run --project src/Chapulines.App -- --smoke-test-slider-binding "C:\path\to\definition.gh"

To create a viewport binding, connect solved geometry, and verify that the binding survives save/reload:

dotnet run --project src/Chapulines.App -- --smoke-test-viewport-binding "C:\path\to\definition.gh"

To create Point and Plane Gumball bindings, connect one of two test Viewport Bindings to them, confirm the unassociated viewport receives no handles, transform persistent values, reload the definition, and validate the compiled viewport relationships:

dotnet run --project src/Chapulines.App -- --smoke-test-point-binding "C:\path\to\definition.gh"

To verify the in-memory sanitizer and compiled manifest:

dotnet run --project src/Chapulines.App -- --smoke-test-compiled-export "C:\path\to\definition.gh"

To compile a specialized EXE, launch it in a fresh process, change its compiled slider, and verify that no design-time component assembly was shipped:

dotnet run --project src/Chapulines.App -- --smoke-test-generated-application "C:\path\to\definition.gh"

The smoke test uses the normal Rhino and Grasshopper plug-in environment because a definition may depend on installed third-party components. An incompatible third-party component can therefore interrupt or fail startup and should be reported as a dependency problem rather than bypassed silently.

To create a framework-dependent Windows x64 publish directory:

dotnet publish src/Chapulines.App -c Release -r win-x64 --self-contained false -o artifacts/publish/Chapulines

The command-line smoke tests provide the Rhino integration coverage and require Rhino 9 and an interactive Windows session.

Moving ruler, point slider, and Graph Mapper

Use Toolbox → Inputs to add independent instruments to an open Grasshopper definition. Each has matching Grasshopper outputs, live Run Preview and exported-app support, and per-instance appearance and behavior settings. Run run-instruments.cmd for the quick interactive comparison, or use View → Final instruments.

See the instrument guide for editing gestures, output semantics, settings and verification. package-grasshopper-instruments.ps1 builds the standalone Rhino 9 Grasshopper package.

About

Chapulines — build focused Windows applications from Rhino and Grasshopper definitions.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages