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 / 8698
8697  |  8699
Subject: 
Re: Embedded language support in LPub
Newsgroups: 
lugnet.cad.dev
Date: 
Thu, 10 Apr 2003 10:46:01 GMT
Viewed: 
779 times
  
In lugnet.cad.dev, Mike Walsh writes:

"Kevin L. Clague" <kevin_clague@yahoo.com> wrote in message
news:HD1BFD.1D64@lugnet.com...
Dan and Mike,

<snip>

Any feedback on what I outlined for scripting interface and such?

Kevin

It looks like you have all of the ones I can think of.  Being able to
control all of the settings that are available from the GUI is top of the
list.  It can actually eliminate the need for the LPub config file as these
settings could (and probably should) be saved in the same syntax as the
script is written in.

I disagree.


Would it also be possible to access the names of the generated files?

Yes.  I can see the need for the name of the generated file at each post
processing step.  Did you want a list of *all* the files generated for a
given entire model as well?


There was a recent discussion on controlling the background color for sub
models.  Knowing where a model is in the hierarchy could allow control over
the background color during image generation.

I might do something like this:

##  Get the list of models in the MPD file

set models [ lpubModelNames ]

##  Loop through the models, generating instruction images
##  with a different color background depending on the level
##  in the MPD hierarchy.

foreach model $models {

   ##  Determine the level in the model hierarchy and
   ##  set the background color accordingly.

   set hierarchyLevel [ lpubGetHierarchyLevel $model ]

   switch $hierarchyLevel {
       case 1 {
           set lpubBGColor "#A0A0A0"
       }
       case 2 {
           set lpubBGColor "#0A0A0A"
       }
       case 3 {
           setlpubBGColor "#FFAA00"
       }
       default {
           setlpubBGColor "#000000"
       }
   }

   ##  Generate instructions images

   lpubGeneateInstructionImages $model
}

Good.  This is the kind of stuff I envisioned people doing.  One minor
problem though, your above algorithm won't work too well.  A given FILE in
MPD can be used at more than one level of hierarchy at a time, so
lpubGetHierarchyLevel result can be ambiguous.

I think that instead this should be handled as a pre-processing step for the
L3P process, as well as a pre-processing step for the Part List Image
generation step.

The traversal of the hierarchy is inherently recursive, not iterative.



Hope this helps.

Yes. It does.


Mike


--
Mike Walsh - mike_walsh at mindspring.com
http://www.ncltc.cc - North Carolina LEGO Train Club
http://www.carolinatrainbuilders.com - Carolina Train Builders
http://www.bricklink.com/store.asp?p=mpw - CTB/Brick Depot



Message has 1 Reply:
  Re: Embedded language support in LPub
 
"Kevin L. Clague" <kevin_clague@yahoo.com> wrote in message news:HD4J8p.wEF@lugnet.com... [ ... snippped ... ] (...) From your discussion on how LPub operates, it generates a lot more files than I realized (I never thought about generating the .dat (...) (22 years ago, 10-Apr-03, to lugnet.cad.dev)

Message is in Reply To:
  Re: Embedded language support in LPub
 
"Kevin L. Clague" <kevin_clague@yahoo.com> wrote in message news:HD1BFD.1D64@lugnet.com... (...) It looks like you have all of the ones I can think of. Being able to control all of the settings that are available from the GUI is top of the list. It (...) (22 years ago, 8-Apr-03, to lugnet.cad.dev)

31 Messages in This Thread:









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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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