Freshly updated Ldraw.xml


Re: Freshly updated Ldraw.xml
#21
Hey Mattia,

Mattia Zamboni Wrote:Does your converted uses the exact same ldraw.xml file for the translation?
yes, the converter uses the ldraw.xml.

Mattia Zamboni Wrote:And let me ask you, this implies that multi bones part will be able to be converted as well?
In theory yes. But I never had a look on that. In the past I started to create an extended ldraw.xml. But since I did not want to
add tags or attributes to a xml file that is used by other programms (and where I have no xsd file for), I created a second xml file: l2l.xml. There I started to define decoration mappings for example.
Code:
<!-- Tile 2 x 2 Round --> <!-- Tile 2 x 2 Round with SW Millennium Falcon Vent Pattern --> <Decoration ldraw="4150ps4.dat" lego="4150" decorationID="55729" />
In the current ldraw.xml from Mike Gallagher there are tags (
Code:
<Assembly>
) and attributes (
Code:
itemNos
) where I do not know if the LDD is using them (?).

In the meantime I wrote a small tool, that created a ldraw.xml insted of the ToDo list. Input is a existing ldraw.xml and output is a new ldraw.xml. The attached file was created by the following pseudo code:

Code:
foreach color available in LDD { print localized name as comment if mapping definition in ldraw.xml available { if entry in LDConfig.ldr { print ldraw name as comment } else { print "ToDo: Undefined LDraw color" as comment } print <Material> tag } else { print "ToDo: Missing color mapping" as comment } } foreach designId in LDDParts { print designName as comment if file designId+".dat" available { print LDraw name as comment } else { print "ToDo: LDraw file (designId+".dat") does not exist!" as comment } if <Transformation> tag for designId+".dat" in ldraw.xml available { print <Transformation> tag } if <Brick> tag for designId available { if <Transformation> tag for <Brick>.ldraw in ldraw.xml available { print <Brick> tag if file <Brick>.ldraw available { print LDraw name as comment } else { print "ToDo: LDraw file (<Brick>.ldraw) does not exist!" as comment } print <Transformation> tag } } if no <Transformation> tag for designId+".dat" in ldraw.xml and no <Transformation> tag for <Brick>.ldraw in ldraw.xml { print "ToDo: Missing Transformation" } }

At the end of the file I added the 'from my point of view' obsolet entries from the input ldraw.xml. Btw, the tool does not look for LDD aliases. Currently I do not know how the LDD saves them in the .lxf-files.

When there will be a new LDD brickset one day or if there are new LDraw parts available, it will be very easy to generate a new ldraw.xml with updated ToDo's.

The question is: which file should I use as input file? In Mike Gallagher's file there seems to be special areas: 'below working 4.40', 'Problematic part numbers', 'Needs work or LDR dat file created', ... If I use it, the result will contain entries that are wrong. And they will be even harder to detect, because my tool sorts the entries by designId.

So there is still a lot of work to do.

Rolf


Attached Files
.zip   ldrawAutoGen.zip (Size: 105.36 KB / Downloads: 0)
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Re: Freshly updated Ldraw.xml - by Jarema - 2015-09-30, 20:21
Re: Freshly updated Ldraw.xml - by Rolf Osterthun - 2015-10-12, 11:38
Re: Freshly updated Ldraw.xml - by Jarema - 2015-10-01, 18:36
Re: Freshly updated Ldraw.xml - by Jarema - 2015-09-30, 21:29
put ldraw.xml to github? - by Steffen - 2015-10-03, 11:31

Forum Jump:


Users browsing this thread: 1 Guest(s)