Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyembree/trianges.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def run_triangles():

cdef unsigned int addCube(rtcs.RTCScene scene_i):
cdef unsigned int mesh = rtcg.rtcNewTriangleMesh(scene_i,
rtcg.RTCGEOMETRY_STATIC, 12, 8, 1)
rtcg.RTC_GEOMETRY_STATIC, 12, 8, 1)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. I think you can rename the file trianges.pyx in triangles.pyx.

BTW, the example attenaute.py also creates an error

>python attenuate.py
Ran region 1 in 0.075 s
Ran region 2 in 0.039 s
Ran region 3 in 0.005 s
Traceback (most recent call last):
  File "attenuate.py", line 60, in <module>
    maxdist[exists] = triangles[intersects[gi],:,0]  # get x coord
ValueError: shape mismatch: value array of shape (1565,3) could not be broadcast to indexing result of shape (1565,)

cdef Vertex* vertices = <Vertex*> rtcg.rtcMapBuffer(scene_i, mesh, rtcg.RTC_VERTEX_BUFFER)
vertices[0].x = -1
vertices[0].y = -1
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
include_path = [np.get_include()]

ext_modules = cythonize('pyembree/*.pyx', language='c++',
include_dirs=include_path)
include_path=include_path)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems as though include_path has been broken in some very recent (0.24) versions of Cython. I would rather we stay away from it. Was this line causing you problems for some reason?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I did not have Cython. I installed it with pip, which gave me the lastest version( 0.27.3). With this version, I had the following error : ValueError: got unknown compilation option, please remove: include_dirs

With CI, we have the same error, as you can see: 57199d9

IMHO, I think you can accept it.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh yeah, I see the below now.

for ext in ext_modules:
ext.include_dirs = include_path
ext.libraries = ["embree"]
Expand Down