I have been working on this for several days and put JSON capability into it without knowing jSwan. But I would still like to share with you this new version, as it includes a lot of new features, some of which I saw someone had been asking for.
Besides, I hope someone could help me test Pancake on MacV5/V6 since I don’t have a Mac and I want to make the plugin as useful as possible on both platforms.
Features worth noting:
Param Access Overlay
Param access is how a component will use its parameters. It can be one of Item access, List access, or Tree access. Incorrect access usually leads to a hard-to-debug definition. With this feature enabled, you can see clearly that blue boxes are for Tree-access params and red boxes are for List-access params.
Non-UI Export of IGES, DAE, KMZ, TXT & Definition Path
Definition Path allows a simpler way to reference external resources or determine resources’ location. The four formats don’t rely on Rhino interface anymore, therefore the export is more reliable.
Export TXT may be also used for any other text content, e.g. JSON.
Quantity is an amount with a unit. Pancake now supports bidirectional parsing between text and quantity, conversion and arithmetic operation. Pancake also supports both decimal length
2.1234m and feet-inch length
5'-4 3/8", and they can be used in a mixed manner. For Rhino 6 users, you may also use the built-in few arithmetic operators to manipulate them. When a quantity is provided to a component that accepts number but not quantity, it is automatically converted into the corresponding value in the current document’s unit system.
Associative Array & JSON Support
Associative Array is like
dict in Python. It provides a container of Key-Value pairs. You may put much information into one single object so that it would be treated as one single item by other components. It also enables “Object-Oriented Grasshopper”.
The Associative Array has a “Principle” feature. When it is used by another vanilla component, the array will behave like its principal value. As a result, you may use it seamlessly with other components.
Associative Array can be constructed manually, or by importing
CSV. Besides you may convert the array into
Association, Http Querystring, or even DataTable used by LunchBox and Human UI.
There are differences between the JSON capability between Pancake and jSwan:
- Pancake’s Associative Array is purely a container, it is serialized into JSON only when asked to. So Pancake is faster if you are storing geometry but won’t export it to JSON.
- Pancake doesn’t serialize/deserialize Grasshopper/Rhino objects.
This feature is used to append an Associative Array, acting as metadata, to certain types of geometry. The metadata will be preserved during many injective transformations.