On Mon, Apr 7, 2014 at 3:47 AM, Sylvain L. Sauvage <
[email protected]> wrote:
> > Unfortunately the LDraw format isn't very good for adding
> > extra information, it would require a lot of custom comments
> > and the file wouldn't be readable.
>
> Yes. But for steps, LDR-scripts are easy because one line is
> one piece.
That's a big problem too, I think everyone is used to having pieces
grouped by step while in a generic CAD program I'd expect things to be in
an object hierarchy.
Group1
- Children
- ChildGroup
- Children
As opposed to:
Step1
- Children
Step2
- Children
IMO the step where an object appears should just be an attribute but I
tend to think like a programmer organizing data.
That's why I said "no XML" ;o)
> I encourage you to look toward YAML. It's a superset of JSON
> and less verbose (less quotes and delimiters) and it can handle
> references (same object used several times). Your example could
> be:
>
I've never looked at YAML before, I'm reading about it now. I think the
most important thing is for it to be readable and for people to understand
and be able to edit a file in a text editor without worrying too much about
syntax errors.
An easily parsable text file format would be a great enough
> leap for me. And with a generic format, one can pick one's
> favorite language ;o)
That's why I thought json, there are plenty of libraries around to read
it (probably also true for yaml). People can read the data, edit with
whatever they want and save it back.
My idea for an scripting language at the time was to enable small edits
so you could type something like "rotate 0 0 90" in a window. I also
thought about doing something like Maya and having the save file be just a
big script but there's no reason to go that way.
_______________________________________________
Leocad mailing list
[email protected]
https://list.gerf.org/listinfo/leocad