algorithmic modeling for Rhino
Long ago when Grasshopper was still called Explicit History it used a file format called WRM. This was a terrible format and support for it was slowly dropped over time. These days you can save your Grasshopper data in two ways; GH and GHX. Since Grasshopper 0.8.0050, the default format is GH.
GH obviously stands for 'GrassHopper' and GHX adds an X for Xml. There is no functional difference between GH and GHX files concerning information content, however they are obviously not the same.
Grasshopper data is stored in a hierarchical, type-safe database format which is defined and managed by the GH_IO.dll library. These databases can be read from and written to binary and text-based files.
GH is a binary format, meaning it stores its data as pure bytes. This makes the file unreadable by human eyes and also rather difficult to parse by programs. Data inside GH files is however stored quite efficiently -i.e. with little overhead- and it is even compressed using standard Deflate compression, reducing the file size even more.
GHX on the other hand is text based, meaning all data is stored as human-readable strings of characters. This means there is in fact a large amount of overhead needed and GHX files will be 10 to 100 times as big as GH files. When Grasshopper puts data in the clipboard, it is stored as GHX.
Why do we need both formats and when should you use one or the other?
Benefits of GH over GHX:
Benefits of GHX over GH:
Basically, you're almost always better off using GH. Only if you want to interact with the Grasshopper data without using the Grasshopper interface does it really make sense to use GHX.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Tags:
Very interesting. Thanks for the explanation :)
@David Is it possible to extract from ghx an adjacency matrix between grasshopper components in an excel format? It may be extremely useful the potential for meta-analysis of GH definitions using network science theoretical framework. For instance the study of modularity between equivalent definitions..
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by