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 / 734
733  |  735
Subject: 
Re: MPD format
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 16 Mar 1999 09:50:47 GMT
Viewed: 
1516 times
  
Paul Gyugyi wrote:
> I think valid drawing lines before the first "0 FILE" of an MPD file
> should not be allowed (comments and garbage lines are OK).  Either
> it is an MPD file, or it is not.

Yes, I agree.
But MPD is not very parser-friendly. You read the file and half-way
down it says: "Oh, by the way, I'm an MPD!"

How are you supposed to avoid complaining about garbage lines before
the first "0 FILE" without parsing each file twice?

> Lars, What gets rendered from "L3P MPD1.DAT"?

Since there are errors in the MPD files, I think that the result
should be undefined :-)

> I think MPD file can be useful when included in Type 1 lines.
> If the files were instead defined as:
> MPD3.DAT:
> 1 3 0 0 0 1 0 0 0 1 0 0 0 1 3001.dat
> 1 16 0 -24 0 1 0 0 0 1 0 0 0 1 mpd4.dat
> 
> MPD4.DAT:
> 0 FILE four.dat
> 1 4 0 0 0 1 0 0 0 1 0 0 0 1 3001.dat
> 1 16 0 -24 0 1 0 0 0 1 0 0 0 1 five.dat
> 0 FILE five.dat
> 1 5 0 -24 0 1 0 0 0 1 0 0 0 1 3001.dat
> 
> Then I think LDLite should:
> Draw a 3001 in color 3 at offset 0
> Draw a 3001 in color 4 at offset -24
> Draw a 3001 in color 5 at offset -48

Yes.

> To further clarify, a Type-1 include of an MPD file (with no valid
> drawing lines before the "0 FILE") should be translated into a
> Type-1 include of the first subfile of the MPD file.  This would
> avoid the need for a sub-parts directory, since sub-parts could be
> included in the MPD file.

Yes, this is a very good thing. It keeps all related files of a part
in a single file.

> If things work that way, we would also need your meta command
> "0 LOADCACHE parts.dat" to load part libraries in without drawing the
> first subfile.

Go ahead, if you feel the need for loading part libraries. In my L3
project I just retain parts in memory once loaded. I wouldn't waste
time on preloading parts no-one needs.
/Lars

> -gyug
> 
> "Lars C. Hassing" wrote:
> > 
> > Paul Gyugyi wrote:
> > > By convention, tools like L3P and LDLite, when given an mpd
> > > file, will render the first subfile.  The subfiles can reference
> > > each other.
> > > 
> > > If you use an MPD file in a Type 1 line, your results will vary.
> > > LDLite will (I think) finish drawing the top-level file, and then
> > > start over drawing the first subfile of the last MPD file
> > > encountered.
> > 
> > L3P will treat an MPD file in a Type 1 line exactly as it treats
> > an MPD file as the main file (top-level file). L3P's nature is
> > recursive.
> > An MPD file is just another way of storing sub-files.
> > In stead of loading sub-files from the usual directories, some
> > sub-files are simply taken from the MPD file.
> > 
> > > I will be changing this.  In version 1.7, having a type-1 • line that
> > > specifies an MPD file will not draw anything, but just • load all the
> > > parts into memory so they can be used later in the file.  This
> > > would allow you to convert the PARTS directory to a • single MPD file,
> > > and then specify "1 16 0 0 0 1 0 0 0 1 0 0 0 1 parts.dat" in your
> > > start-up file.
> > 
> > In stead of changing the well-known semantics of
> > "1 16 0 0 0 1 0 0 0 1 0 0 0 1 parts.dat"
> > to depend on the contents of parts.dat, wouldn't it be better to
> > use a META command? Like "0 LOADCACHE parts.dat"
> > /Lars
> 



Message has 1 Reply:
  Re: MPD format
 
(...) I'm thinking of the case where foo.dat only appears in the MPD file fooarchive.dat, such as would happen if someone replaced the whole P directory with a single MPD file to save disk space, or if I chose to distribute my unofficial Throwbot (...) (28 years ago, 17-Mar-99, to lugnet.cad.dev)

2 Messages in This Thread:

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

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