Grasshopper

algorithmic modeling for Rhino

hello david, hello all.
I examine the ghx fixhier and to understand the structure I wonder if the file structure is explained such as xml format.

http://www.w3.org/XML/1998/06/xmlspec-report-v21.htm

http://www.w3schools.com/dtd/default.asp

http://www.w3.org/XML/Schema

here or you can see the file format.


I need to know how organized a ghx file. Normally all meta languages ​​xml have a "dtd".
For example, the DTD or schema said if any element is allowed and another count limit (eg a max items and max chunks in a chunk).

Thanks for All .

Views: 383

Replies to This Discussion

Hi Remy,

there is no top-down schema. Here's how it works:

  1. GH_IO is the assembly which takes care of all file reading/writing.
  2. GH_IO exposes a type-safe, hierarchical database runtime structure which can be used to store pretty much anything you want. It has support for a lot of basic data-types and if all else fails you can always revert to byte-arrays.
  3. This database can be written to two types of files, *.gh and *.ghx. GH is a binary format which is compressed and therefore quite small, GHX is an xml format which is not compressed and therefore quite large. Grasshopper itself never deals with Xml, it's only GH_IO which can write and read it's database structure to and from an Xml document.
  4. GH_IO places no constraints on what data is stored inside of it and how it is stored. That is up to the caller. In effect, each class in Grasshopper determines how it saves its data.

You can use GH_IO.dll to open, create, modify and save GH and GHX files. But whether or not Grasshopper 0.9.0052 will be able to read a file you write depends wholly on whether you're supplying the exact right data in the exact right form. Not only is there no single document that outlines what this data should look like, I frequently modify the way data is stored so it's a moving target.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

thank you for these explanations I would to you if I have problems understanding.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2025   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service