closest_point_on_mesh ignores Rotation of the object #45244

Closed
opened 2015-06-30 07:47:52 +02:00 by perfection cat · 7 comments

System Information
windows XP/SP3 32bits

Blender Version
Broken: version 2.75 (sub 1), branch b'master', commit date b'2015-06-29' b'21:10', hash b'56ca7f3', b'Release'
Worked: unknown

Short description of error
closest_point_on_mesh ignores Rotation of the object.
Exact steps for others to reproduce the error
I do not really know whether this is a bug.
This returns the result that I expected.
First.png
However, it is different from the result that expected that I turn object and perform the same thing.
The result is the same as the last time.
Second.png
closest_point_on_mesh.blend
I want you to point it out if how to use script has a problem.
Thanks.

**System Information** windows XP/SP3 32bits **Blender Version** Broken: version 2.75 (sub 1), branch b'master', commit date b'2015-06-29' b'21:10', hash b'56ca7f3', b'Release' Worked: unknown **Short description of error** closest_point_on_mesh ignores Rotation of the object. **Exact steps for others to reproduce the error** I do not really know whether this is a bug. This returns the result that I expected. ![First.png](https://archive.blender.org/developer/F198749/First.png) However, it is different from the result that expected that I turn object and perform the same thing. The result is the same as the last time. ![Second.png](https://archive.blender.org/developer/F198751/Second.png) [closest_point_on_mesh.blend](https://archive.blender.org/developer/F198753/closest_point_on_mesh.blend) I want you to point it out if how to use script has a problem. Thanks.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @sindra1961

Added subscriber: @sindra1961

Added subscriber: @ideasman42

Added subscriber: @ideasman42

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Campbell Barton self-assigned this 2015-06-30 07:52:58 +02:00

This is intentionally in object space, edited docstring blender/blender@cec0138bcc

This is intentionally in object space, edited docstring blender/blender@cec0138bcc
Author

I'm sorry, it was understood.
My script seems to be wrong.
It seems to do a calculating formula of point in this way.
point = obj.matrix_world.transposed() * worldAxisPoint

I'm sorry, it was understood. My script seems to be wrong. It seems to do a calculating formula of point in this way. point = obj.matrix_world.transposed() * worldAxisPoint
Author

Probably this is right.
point = obj.matrix_world.inverted() * worldAxisPoint

Probably this is right. point = obj.matrix_world.inverted() * worldAxisPoint
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#45244
No description provided.