To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 10434
10433  |  10435
Subject: 
MPD file loading search order
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 25 Jul 2006 16:04:44 GMT
Viewed: 
2151 times
  
Hello All,

I'm implementing a LDraw file loader and was wondering about some
details concerning mpd. I could not found enough info about this
elsewhere, or I may overlooked it.

[1]

When loading a MPD file should I keep checking the first level of
subparts when some nested part references a part with an name present in
the top level mpd.

Example a mpd contains, a.dat, b.dat, c.dat and d.dat.

a.dat references b.dat, c.dat, d.dat and hello.dat

Hello.dat is searched in the same directory as the mpd, if found it's
opened and is something like:


1 x x x x x......   b.dat
1 x x x x x......   foo.dat


Should b.dat be loaded from the parent mpd or should I check directories
as if it's the first opened dat file, so:

1: same dir as part
2: ldraw directories.
3: not found error


[2]

Second point I'm unclear of what to do with nested MPD's, is this
allowed at all?


[3]

Last point, Are all dat's potential MPD files or must they be named
.MPD. I read somewhere about two pass loading, but this is not needed if
only .MPD files are multi part.


[--------]

Hope someone can give me some pointers about these issues.

Greetings,

Roland



Message has 5 Replies:
  Re: MPD file loading search order
 
(...) --SNIP-- (...) Hi Roland, Try (URL) for the file specifications. Hopefully that should answer some queries. Tim (18 years ago, 25-Jul-06, to lugnet.cad.dev)
  Re: MPD file loading search order
 
(...) Tim pointed you at the actual MPD spec. You may notice that is is vague on a lot of points -- it basically leaves it up to the program authors. My comments below are what makes sense to me, thinking as someone who might create complex MPDs. (...) (18 years ago, 25-Jul-06, to lugnet.cad.dev)
  Re: MPD file loading search order
 
As you have pointed out, the spec is indeed ambiguous. Consequently, there's probably no correct answer as to how things should work. However, I can tell you what I do in LDView, so that you have an idea of how at least one MPD-compatible program (...) (18 years ago, 25-Jul-06, to lugnet.cad.dev, FTX)
  Re: MPD file loading search order
 
Thanks Tim and Steve, I think I will go with Steve's advise to let only the main part in the mpd see the other parts in the mpd. This will give a much cleaner recursive approach, in which I can easily support sub mpd's. Further more I think I will (...) (18 years ago, 25-Jul-06, to lugnet.cad.dev)
  Re: MPD file loading search order
 
(...) I mentioned in my other (long) post that I don't think that MPD files should be required to have a .mpd extension. However, I'd like to add more here in answer to your specific question. I could be wrong, but I'm almost positive that it is (...) (18 years ago, 25-Jul-06, to lugnet.cad.dev)

29 Messages in This Thread:








Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR