| | | | | Hello all,
I'm having difficulties with the ldraw coordinate system. As fas I
understood it it's Right handed, just like OpenGL. So
X positive is right
X negative is left
Y Positive is top
Y Negative is bottom
z Positive is front
z negative is back
Y
/\
|
|
----> X
/
|/_
Z
Please confirm this, I have been reading contradictions.
But let's assume this is correct, then why are all parts drawn upside
down while rendering in OpenGL?
It seems even MlCad is correcting for this by rotating 180 degrees
around the x axis, up becomes -Y and back Z
But why is this? It doesn't fix anything you still got one 'weird' axis
(in non professional people eye's) cuz you got the Y axis in the 'wrong'
way now instead of the Z-Axis.
Just wondering about this, while trying to determine how to orientate
stuff in my new animation software.
Greetings,
Roland
| | | | | | | | | | | | | In lugnet.cad.dev, Roland Melkert wrote:
> X positive is right
> X negative is left
> Y Positive is top
> Y Negative is bottom
> z Positive is front
> z negative is back
I've always understood it is:
X positive is right
X negative is left
Y Positive is bottom
Y Negative is top
z Positive is back
z negative is front
In fact you can show this by adding a brick in MLCad and moving it around,
watching how the X, Y and Z values change.
ROSCO
| | | | | | | | | | | | | | | | | | As I understand it, LDraw has negative y in the up direction, which is neither
right nor left handed, but something else entirely. I don't know that it has a
name.
James
| | | | | | | | | | | | | | | | | | | | In lugnet.cad.dev, James Reynolds wrote:
> As I understand it, LDraw has negative y in the up direction, which is neither
> right nor left handed, but something else entirely. I don't know that it has a
> name.
>
> James
It is still a right-handed system. The handedness is unchanged by rotation (in
ldraws case 180*x from standard).
Tim
| | | | | | | | | | | | | | | | | | | | Tim Gould wrote:
> It is still a right-handed system. The handedness is unchanged by
rotation (in
> ldraws case 180*x from standard).
>
> Tim
So the original designer of the LDraw program just decided to use this
orientation of the right handed system. if so then it starts making more
sense to me, I just need to redefine 'front, left, right etc' to fit in
this orientation for editing.
I'll make it an option (LDraw orientation 'standard' orientation).
Because personally I find a upward negative Y very confusing, but I
suspect that the LDraw die hards are custom to it.
But in essence no changes are made to the coordinates (only the camera
position), so it doesn't really matter how you label the sides :)
Roland
| | | | | | | | | | | | | | | |
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 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
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | | | | | | | | | | | | | | | | | | | | | | | | 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
| | | | | | | | | | | | | | | | | | | A sincere thanks to all of you. Your comments made me go back over (again) my
export code, and I found an error. Now it works as expected. I was getting funny
rotations because I mis-ordered the elements of the transformation matrix, duh.
Seems obvious in hindsight.
Yea! Now I can draw right-side-up. (Helmet done in SketchUp.)
| | | | | | |