|
In lugnet.cad.dev, Jim Foltz wrote:
|
In lugnet.cad.dev, Roland Melkert wrote:
|
Hello all,
Im having difficulties with the ldraw coordinate system. As fas I
understood it its Right handed, just like OpenGL. So
|
Ive been having difficulty with importing/exporting .dat files from
SketchUp. In SketchUp, if you stand at the Origin;
X is right, Y is forward, and Z is up.
The LDraw Primitives Reference (http://www.ldraw.org/library/primref/) says
the LDraw axes are:
X is right, Y is down, and Z is forward. Heres the image from the reference
page.
So it first seems like a simple 90 degree rotation around the X axis is all
you need to convert between SketchUp and LDraw system, but it doesnt work in
practice. I cant get the 2 systems to agree on an axes system.
|
In LDraw +z is backwards, not forwards or more strictly +Z points away from the
camera when X is right and -Y is up.
Tim
|
|
|
Hi,
Heres my box test model in SketchUp. (The above model is the same model
unfolded.)
When I export this model to a .dat and open it in LDView, the green side is the
top-view, blue is the front view (as expected), and I would expect the
right-view to be orange. But I get the red side as the right side.
Here is the right-view in LDView
Any idea how I can translate this on export?
|
|
|
In lugnet.cad.dev, Jim Foltz wrote:
|
Hi,
Heres my box test model in SketchUp. (The above model is the same model
unfolded.)
When I export this model to a .dat and open it in LDView, the green side is
the top-view, blue is the front view (as expected), and I would expect the
right-view to be orange. But I get the red side as the right side.
Here is the right-view in LDView
Any idea how I can translate this on export?
|
That looks like a correct mapping to me. Unless Im mistaken the red and orange
are on the same sides in both pictures. The unwrapped boxes are definitely
identical and unless youve moved them in one or the other the whole thing is
right.
Tim
|
|
|
Jim Foltz wrote:
> Any idea how I can translate this on export?
Google uses the right handed system but indeed rotated by 90 degrees,
LDraw also uses the right handed system but 180 degrees rotated.
It should not matter how you show the model, the coordinates are
interchangeable, but if you want to use sketchup for drawing LDraw stuff
you should indeed rotate 90 degrees around the x-axis to get the
standard orientation of parts people expect.
I don't get why LDview switches left and right because the only side's
that change are front/back and top/bottom.
Have you tested in mlcad, there you can see the axis.
Roland
|
|
|
In lugnet.cad.dev, Timothy Gould wrote:
|
In lugnet.cad.dev, Jim Foltz wrote:
|
Here is the right-view in LDView
Any idea how I can translate this on export?
|
That looks like a correct mapping to me. Unless Im mistaken the red and
orange are on the same sides in both pictures. The unwrapped boxes are
definitely identical and unless youve moved them in one or the other the
whole thing is right.
|
I agree with Tim. It looks fine to me. If there were any mirroring going on,
then either the orange and red would be swapped on the unwrapped box, or the
green and grey would be swapped.
The picture in LDView has a rotated camera angle relative to the one in
Sketchup, but the geometry remains unchanged.
--Travis
|
|
|