-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix wrapping of double & output arguments #684
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, great work. I'm not fluent in swig so I trust it's very well written :-). However, I speak a bit of cmake and it is meaning less to use configure_file
here as there is nothing to configure (cmake variables with @, see other .in
files)... Can you rename ConvexShape.i.in
to ConvexShape.i
and replace ${CMAKE_CURRENT_BINARY_DIR}/ConvexShape.i
by ${CMAKE_CURRENT_SOURCE_DIR}/ConvexShape.i
please?
d4b85c8
to
bb19883
Compare
Thanks for the comment. As we discussed, we can also implement the same fix for all the relevant |
I used the following search
|
Please also rebase on master to fix the CI. |
bb19883
to
3007c9e
Compare
I haven't completely tested it, maybe I first try to make sure that it works properly before merging it. |
The problem is that in the method
rtkConvexShape::IsIntersectedByRay(const PointType &, const VectorType &, double &, double &)
, the last two parameters are meant to be output values, and thus cannot be used in Python, since there is no way to define adouble &
in Python.The solution, crafted thanks to the pointers given by @SimonRit and this comment from @LucasGandel, removes the last two parameters from the method in Python and replaces them with output values (see example below). There might be a better way of achieving the same result, but I am far from fluent in SWIG, so any suggestion of improvement is welcome!
Test script:
Output with the fix: