Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please notice the bug about coordinate system diff between OCC and THREEJS #164

Open
Richard20230331 opened this issue Sep 5, 2024 · 0 comments

Comments

@Richard20230331
Copy link

Hi author of this demo, I have recently been using your project as a learing demo for OCC.
Yet I have noticed a bug about the coordinate system difference between OCC and THREEJS.
I set a rayCaster binding to mousedown like this:

// This is under THREEJS Coordinate System?
...
let intersects = _this.raycaster.intersectObjects(_this.mainObject.children);

Where intersects give the result of the intersect point(px, py, pz).
Then I use:

// This is under OCC Coordinate System?
Translate([px, py, pz], Sphere(20));

I found that the sphere is not at the intersect point calculated by THREEJS!
Because it appeared elsewhere in the scene.

It Seems that both system use right handed coordinate system but:
THREEJS X = OCC X;
THREEJS Y = OCC Z;
THREEJS Z = OCC -Y;

Please check it out and inform me if you have any clue on this situation.

bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant