subfiles in MPD files


Re: subfiles in MPD files
#38
It might be, but I would be very wary about any change to the 'document structure'.

LDraw files are a flat-format, which causes some problems when trying to impose a structure on them. The closest we have in the official standards is the 'STEP' meta-command; as Allen suggested a couple of weeks ago, you could look at an LDraw document as being a collection of 'steps', each of which contains other elements - quads, references, other meta-commands and so on. I quite like this approach :-)

MLCad has an implementation of 'groups', albeit a rather idiosyncratic one - it indicates group-membership by putting a meta-command in front of each element which is a member of that group. This prevents groups from being nested, which is sometimes rather limiting, although it does allow you to group together elements from different steps.

Texmap is somewhat structural in that the elements between !TEXMAP START and !TEXMAP END could be seen as being members of a sub-collection. Unlike MLCad's groups, the members of a texmap must all be from the same step.

MPDs add an extra layer: you have a document, which contains multiple 'pages'. Each 'page' is simply a regular LDraw file; in fact, you can look at a simple LDraw file as being an MPD with a single 'page'; the only functional difference is that the file does not have an explicit '0 FILE' meta-command at the start.

So you end up with a possible document-tree like this:

Code:
Document.mpd
  |
  +--- Page1.ldr
  |        |
  |        +--- Step
  |        |      |
  |        |      +--- 1 16 0 0 0 1 0 0 0 1 0 0 0 1 3001.dat
  |        |      +--- 2 24 0 0 0 1 1 1
  |        |
  |        +--- Step
  |               |
  |               +--- 3 16 0 0 0 1 1 1 2 2 2
  |  
  +--- Page2.ldr
           |
           +--- Step
                  |
                  +--- 4 16 0 0 0 1 1 1 2 2 2 3 3 3
                  +--- Texmap
                           |
                           +--- 1 16 0 0 0 1 0 0 0 1 0 0 0 1 s\12345s01.dat

I'm not quite sure where your proposed syntax would fit into such a tree.
Reply
« Next Oldest | Next Newest »



Messages In This Thread
subfiles in MPD files - by Michael Heidemann - 2012-11-10, 18:40
Re: subfiles in MPD files - by Alex Taylor - 2012-11-10, 19:12
Re: subfiles in MPD files - by Alex Taylor - 2012-11-10, 19:42
Re: subfiles in MPD files - by Alex Taylor - 2012-11-10, 19:40
Re: subfiles in MPD files - by Alex Taylor - 2012-11-10, 19:54
Re: subfiles in MPD files - by Alex Taylor - 2012-11-10, 20:24
Re: subfiles in MPD files - by Roland Melkert - 2012-11-10, 20:35
Re: subfiles in MPD files - by Roland Melkert - 2012-11-10, 21:08
Re: subfiles in MPD files - by Roland Melkert - 2012-11-11, 18:14
Re: subfiles in MPD files - by Alex Taylor - 2012-11-11, 18:31
Re: subfiles in MPD files - by Roland Melkert - 2012-11-11, 19:10
Re: subfiles in MPD files - by Alex Taylor - 2012-11-11, 19:21
Re: subfiles in MPD files - by Roland Melkert - 2012-11-11, 21:21
Re: subfiles in MPD files - by Roland Melkert - 2012-11-10, 20:22
Re: subfiles in MPD files - by Alex Taylor - 2012-11-10, 20:29
Re: subfiles in MPD files - by Alex Taylor - 2012-11-10, 21:02
Re: subfiles in MPD files - by Roland Melkert - 2012-11-10, 20:25
Re: subfiles in MPD files - by Roland Melkert - 2012-11-10, 20:55
Re: subfiles in MPD files - by Alex Taylor - 2012-11-10, 21:04
Re: subfiles in MPD files - by Roland Melkert - 2012-11-10, 21:19
Re: subfiles in MPD files - by Alex Taylor - 2012-11-10, 21:56
Re: subfiles in MPD files - by Roland Melkert - 2012-11-10, 22:16
Re: subfiles in MPD files - by Alex Taylor - 2012-11-10, 23:07
Re: subfiles in MPD files - by Roland Melkert - 2012-11-11, 18:17
Re: subfiles in MPD files - by Alex Taylor - 2012-11-11, 18:49
Re: subfiles in MPD files - by Roland Melkert - 2012-11-11, 19:07
Re: subfiles in MPD files - by Roland Melkert - 2012-11-11, 18:21
Re: subfiles in MPD files - by Alex Taylor - 2012-11-11, 18:34
Re: subfiles in MPD files - by Alex Taylor - 2012-11-11, 21:22

Forum Jump:


Users browsing this thread: 3 Guest(s)