|
Hello, everybody!
I am making a program that simulate a robot movement made with Lego (the
robot draw is already made in Ldraw format) on a computer screen. And I
pretend to use parts in .dat. I tried to learn it from ldglite but it is too
complex and I cannot find a good tutorial. The program will be made in C++
and OpenGL. If anyone can send me any information for this, I will be very
thankful!
Thanks and best regards,
Alex
|
|
|
In lugnet.cad.dev.lcd, Alexandre Soong writes:
> Hello, everybody!
>
> I am making a program that simulate a robot movement made with Lego (the
> robot draw is already made in Ldraw format) on a computer screen. And I
> pretend to use parts in .dat. I tried to learn it from ldglite but it is too
> complex and I cannot find a good tutorial. The program will be made in C++
> and OpenGL. If anyone can send me any information for this, I will be very
> thankful!
>
> Thanks and best regards,
>
> Alex
Hello Alex!
Ldraw files are made of text lines.
Typically, in model files (that contain parts), lines begin with numbers
lower than 2
0: comment
1: part (position and orientation)
Typically, in part files (that contain primitives), lines begin with numbers
from 2 to 5
2: line (2 points)
3: triangle (3 points)
4: quad (4 points)
Of course most parts also contain line(s) 1 as subpart(s) because of either
complexity or standardization.
Read http://www.ldraw.org/reference/specs/fileformat for more info about
line format.
Happy programming,
Damien
|
|
|