Pancake 2.0 Release

I have been working on this for several days and put JSON capability into it without knowing jSwan. :sob: 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.

The plugin is here, and the full change list is here. I packed several more examples with the plugin as a detailed demonstration.

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.

Length Quantity

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 JSON or CSV. Besides you may convert the array into JSON, Python dict, Wolfram 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.

Geometric Metadata

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.

7 Likes

@gankeyu

Thanks for all the effort!
Recently I had to export many layers to separate DWG files and I spent a good couple of hours to ultimately answer my questions about export possibilities between different Grasshopper plugins.
I tested Pancake, Elefront, TT Toolbox (CAD Exporter) and Lunchbox. I was about to post it here as a kind of “review” :wink: but now when the new update is here I will repeat my process and check everything once again.
Your plugin seemed very well thought and I really appreciate that you took this important task of automating export (and many more cool features) on your shoulders.

1 Like

Thanks for using Pancake :face_with_hand_over_mouth: The DWG export feature isn’t touched in this major update, so I assume the result won’t be different.

P.S. Except I added several samples in the second last update to show how Export generally works

1 Like

Param access is how a component will use the parameters.

Nice feature, so many users overlook what kind of data is input / output. One that comes to mind is Pipe that always outputs as list.

And Offset :joy: I’ve been stuck on OffsetCrv for so many times.

1 Like

This is how it looks.
Output format is 3dm (TT Toolbox - CAD Exporter outputs dwg and dxf).

@gankeyu Let me paraphrase something from the LOTR.

You’ve been a chosen one to fulfill your destiny.

One Plugin to select them all, One Plugin to support them,
One Plugin to export them all and in the output format save them

3 Likes

Let me make some improvements

1 Like

How about full attributes support? :smile: - that would be lovely! I didn’t test that deeply yet, but you even mentioned: using at own risk in the notification. I will try to test it soon. I’m really looking for the proper automated way to export texture-mapped geometries from Rhino (of course other attributes are important too).

1 Like

How do you add the texture to the geometry? Is it already in Rhino?

By the way, there is a big difference between Export As and Export 3DM components. The Export 3DM supports a limited types of geometry but it doesn’t rely on Rhino’s Export command, therefore it is faster and more stable.

Export As uses Rhino’s command to do the export but it supports literally every type of geometry Rhino supports (there’s some issue with blocks, though).

Yes, I am aware that one command relies on Rhino’s Export command, and other doesn’t. Relaying on it makes some stuff easier to achieve but you are right that it is less stable (at least in other plugins).

Best would be if we could do as much as we can using Export 3DM…

Texturing in GH:
As far as I know, there is only one GH plugin that touched on a subject of texturing GH Geometry - it is a great all-rounder Human plugin. Unfortunately, the Texture Mapping section isn’t very sophisticated and is limited only to meshes. :frowning:

image

Blocks:
Blocks are the way to smuggle stuff that GH doesn’t like :wink: - for example properly, manually texture mapped polysurfaces. There are plugins that allow us to distribute Blocks through GH.

Blocks are great also because other programs can read them (in my case Unreal Engine 4).
If I want to export/update 1000 instances of the same (or scaled) geometry it is treated as 1 geometry inside UE4 and scatter around the scene. Therefore support for exporting Blocks would be a great thing to have.

Generally about my workflows:

Rhino -> UE4
I work on a different scale projects - urban scale, building and even furniture. I need a reliable way to select stuff I make in Rhino (through filters like Dynamic Geometry Pipeline) and precisely export it to separate files.
Those exported files I later on import & update (dozens of times) with the help of Datasmith plugin inside UE4.
Updating my files without any extra work is very important because I really want to set everything and rather focus on the design than struggle with manual exports in which I constantly make something wrong or forgot to include something. This is a very repetitive task which I want to be as smooth and reliable as possible.

DWG -> Rhino -> DWG
Sometimes I need to work with somebody who uses my beloved Autocad. Last time I had to modify several dozens of layers of GIS data (move it closer to the file origin and export to separate DWG files because Autocad couldn’t handle that many layers and that far from the origin :expressionless:). Than, wait for another person to do thier job inside Autocad and later… I needed to reverse this process… - perfect task for Grasshopper.
DWG files very often contain things like texts, hatches, and blocks so support for them would be a nice thing to have.

DWG Import
Oh, and would it be also possible to do something about importing only selected (by name) DWG layers? Many times there is so much crap inside DWG files and there are only few layers that need to be imported & updated couple of times.

Rhino isn’t the most popular program in the world and we constantly need to deal with data from other programs. I’m surprised that Import & Export inside Grasshopper is not handled by McNeel by themselves because it is crucial, it is a vast topic and delicate thing - and it’s one of these mundane tasks that could be automated.

2 Likes

Texturing in GH

That’s also the only option I come up with. Naturally, GH’s geometry cannot store texture. So the practical way would be:

  1. Bake geometry from GH to Rhino
  2. Set texture
  3. Export in GH, using Guid

However, it may be complicated for Export 3DM to support materials, etc. Export 3DM operates on the 3dm file itself, which means any linked resource (material, annotation style, etc.) needs to be taken care of, and copied to the 3dm file. I am thinking of a good way to achieve that.

Blocks

Which plugin do you use to process blocks? Is it Elefront or Human? I need to take a look.

DWG Import

Import is planned in the next release of Pancake. However, DWG import can be only done by automating Import command, which involves less reliability.

Rhino 7’s SDK includes direct support for API-level import and export. But as of now, it doesn’t work if the plugin still requires command-window input (such as OBJ, although OBJ gets its own FileObj class). When used to export 3dm, the command is merely a more reliable version of Export.

There will be a preview Pancake extension utilizing the new APIs. You may give it a try.

Other updates

Guid will be fully supported in the next release by Export As, to some extent supported by Export 3DM. Human’s pipeline should have worked so let me take a look.

Pancake’s Export As is able to export any bakable geometry, including Elefront’s Block parameter. You may also give it a try. Although I do get reports of the component freezing grasshopper but I believe that’s a problem of vanilla button and I have never run into one

Thanks a lot for sharing.
I was trying to use the Export IGES function of Pancake to export my design from GH. But I am not sure about what the inputs for the ‘Layer’ and ‘ObjAttr’ should be and I was not successful. Can you please explain a bit about what the inputs should be for this ‘Export IGES’ function?
Thank you

If you don’t need objects to put on different layers nor with attributes (incl. colors, etc.), you may just leave them blank.

If you need to put objects on layers, for IGES specifically, you will need to use SetIgesLayerLevelMap command first to create a relationship between Rhino layer and IGES layer. Afterwards you can assign layer path like ParentLayer::SubLayer::SiblingLayer to the Layer input. It may be helpful to go through examples about exporting.

If you need attributes, such as color, you can use ObjectAttributes from Elefront or Human, as Pancake itself doesn’t create attributes. I’ll probably add a Pancake-attribute in later versions so that people don’t need to rely on anything else.

Btw, having both ObjAttr and Layer input is a historical issue, as ObjectAttributes contains Layer information.

Export IGES is a more specialized which utilizes IGES exporter plugin directly. If something goes wrong, you may try the more general version Export As, which is slower but have better compatibility.

Thank you very much, I will try these approaches and hopefully solve my problem.

I just wanted to say thankyou for Pancake. The autosave feature has saved me at least 30 hours of work in the past, and I’ve used the export fuction on one job and it was a great!
Keep up the great developing

I tried to apply your recommendations on my GH file but I still couldn’t export iges file. The final plug-in in my project is a dendro volume. I tried to use it as it is and also converted into mesh geometry but still it doesn’t help. Since the design is pretty simple I can upload it here and maybe you can help me. Thank you very much. Diamond In geometry.gh (66.0 KB)

It’s because IGES and STEP don’t support Mesh so you cannot export Mesh in that format.

edit: this would be warned in the latest release.