Skip to content

PillScript 0.4.0

Choose a tag to compare

@mateuszzwierzycki mateuszzwierzycki released this 15 Sep 00:50
· 7 commits to master since this release

PillScript is a C# script component for Grasshopper in Rhino 8.

Download the .yak below, put it in a folder of its own, and install it from there:

"C:\Program Files\Rhino 8\System\Yak.exe" install --source C:\path\to\the\folder pillscript

Restart Rhino afterwards. The package is not on the Rhino package server, so the Package
Manager will not find it by name. Adding the same folder to
Rhino.Options.PackageManager.Sources under Options > Advanced lists it there beside the
public packages.

Windows, Rhino 8.30 or newer. The editor runs in the WebView2 runtime that Rhino 8 installs
for its own interface.

Drawing in the viewport

A script can override DrawWires and DrawMeshes to draw into the Rhino viewport, and DrawBounds
to say what the drawing covers so that Zoom Extents and the clipping planes account for it. Output
geometry is still previewed as before; these run after it.

Grasshopper decides whether to run the viewport passes from the outputs, so a script that draws
without producing geometry would never have been asked. Overriding either method now counts as being
preview capable.

An exception thrown while drawing cannot be allowed back into the display pipeline. It is caught,
reported once on the Rhino command line, and the script is left out of the passes until the next
compile.

Verified on an installed package: a component whose only outputs are a number and the print text
draws a ring of points and the polygon through them, Zoom Extents frames the drawing with nothing
else in the Rhino document, a deliberate throw inside DrawWires leaves Rhino running and prints
one line naming the file and the line, and the next compile brings the drawing back.