3dxml2dat - Printable Version +- LDraw.org Discussion Forums (https://forums.ldraw.org) +-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html) +--- Forum: Parts Author Tools (https://forums.ldraw.org/forum-24.html) +--- Thread: 3dxml2dat (/thread-1145.html) |
3dxml2dat - Rolf Osterthun - 2011-10-26 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> Rolf Re: 3dxml2dat - Stan Isachenko - 2011-10-27 I like this tool) But one question. If I delete some triangles, how automatically delete edges and condlines? Re: 3dxml2dat - Michael Heidemann - 2012-09-21 Is this tool maybe also worth to be supported by LETGui for easier handling? Just let me know your thoughts about this. If it is useful I would happily add it to LETGui. Re: 3dxml2dat - Rolf Osterthun - 2012-11-30 Well, I think it is no longer appropriate, to search for special lines in a text file and copy them into another text file only to send them through a converter. The burden is disproportionate. I have implemented a new version of the 3dxml2dat application. It is still a console application but this time it can handle the 3dxml files themselves, packed as well as unpacked. The application has been designed to work with 3D screen prints (3dxml files) that were taken from the LDD using the program Dassault Systems 3DVIA Screenprint. It translates all the 3D data that it finds inside the 3dxml file into LDraw compatible data. On the one hand this means that there may be several parts in the source that will be transferred all, but on the other hand that the plane for the base grid will be transferred as well. This new version of the application is also able to extract the images from the 3dxml files. They are stored in Truevisions TGA file format. There are still some options you can experiment with: Code: Usage: 3dxml2dat.exe [Options] <inputFileName> You can download the application at http://www.digital-bricks.de/download/3dxml2datV1.0.634.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. Rolf |