3dxml2dat


3dxml2dat
#1
Hey,

some time ago Philo described a method to convert LDD parts into LDraw parts (http://news.lugnet.com/cad/?n=17697). In the <VertexBuffer> section, Philo referred to, there is next to the <Positions> tag also a <Normals> tag. With these normals there is a calculable way to differ between normal lines (linetype 2) and optional lines (linetype 5).

I wrote a small console application based on .NET 3.5 that can make these calculations. The application is kind of simple and silly; but if you play it right it might help you a lot: you have to add the desired part in the LDD without rotating the view. Than take the 3D screenshot and extract the 3dxml file out of the 3dxml archive. Open the 3dxml file and search for the <VertexBuffer> section. Copy the <Positions> and <Normals> line into a new textfile and save it (e.g. file.txt). Call the new console application with the new file as argument and you will get an LDraw part with lines and optional lines.

Please remember: "Getting the shape is only the tip of the iceberg!". This tool is ment to help part authors to create parts. Please make them LDraw parts first before you add them to the parts tracker.

You can download the tool at http://digital-bricks.de/download/3dxml2dat.zip
The application can be downloaded as it is. I do not take charge for errors or any kind of damage to your system that is caused by this tool.

There are a few options you can play with:
Code:
Usage: 3dxml2dat.exe [Options] <inputFileName>

Options:
  [-scale <value>]: scale the mesh with factor <value> (default is 25)
  [-out <outputFileName>]: write the result in <outputFileName> (default is <inputFileName>.dat)
  [-optionalLines <true|false>]: draw optional lines (default is <true> )
  [-normals <true|false>]: draw normals (default is <false> )
  [-ymin <value>]: the lowest y will be at <value>

Rolf
Reply
« Next Oldest | Next Newest »



Messages In This Thread
3dxml2dat - by Rolf Osterthun - 2011-10-26, 21:53
Re: 3dxml2dat - by Stan Isachenko - 2011-10-27, 7:23
Re: 3dxml2dat - by Michael Heidemann - 2012-09-21, 19:09
Re: 3dxml2dat - by Rolf Osterthun - 2012-11-30, 14:12

Forum Jump:


Users browsing this thread: 1 Guest(s)