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

Oriented ray-mesh intersection #23

Open
asml opened this issue Mar 13, 2018 · 2 comments
Open

Oriented ray-mesh intersection #23

asml opened this issue Mar 13, 2018 · 2 comments

Comments

@asml
Copy link

asml commented Mar 13, 2018

Hi Michael,

one more question: If I have a list of outward facing normals for each triangle, can I use pyoctree to calculate not just the ray-mesh intersection point but also from which side the ray hit the triangle? I could do that myself if I were able to get the index of the triangle the ray intersects with instead of the exact intersection point.

Thanks,
Andreas

Edit: I think this should be possible using "getListOfPolysToCheck". Unfortunately, the call does not return to Python for certain inputs (infinite loop in the C-implementation?).

@mhogg
Copy link
Owner

mhogg commented Mar 14, 2018

Hi Andreas,
I just created a new version that exposes the label of the intersected tris. See https://github.com/mhogg/pyoctree/releases/tag/v0.2.5_rc1. Note that this includes a Python 3.6 wheel (not sure what you are using) and a Jupyter notebook that demos how the new change can be used. Let me know if this solves your issue.
Cheers,
Michael

@asml
Copy link
Author

asml commented Mar 15, 2018

Great, thanks a lot! That's exactly what I need :)
I'm on MacOS High Sierra and had to make a few changes. Might be useful to others:

  1. Compile with gcc [clang resulted in "Expected in: flat namespace" during import]:
    export CC=gcc-7
    export CXX=g++-7

  2. Update cython to 0.28 [0.26 resulted in "no attribute reduce_cython" during import]:
    pip install -upgrade cython

  3. Change LINK_ARGS in setup.py [original version resulted in "Symbol not found: _GOMP_parallel)"]:
    LINK_ARGS['unix'] = ['-lgomp','-Wl,-rpath,/usr/local/Cellar/gcc/7.3.0/lib/gcc/7/']

"/usr/local/Cellar/gcc/7.3.0/lib/gcc/7/" is where my "libgomp.1.dylib" is located.

Cheers,
Andreas

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

2 participants