Skip to content

Instantly share code, notes, and snippets.

@serguei-k
Created September 23, 2018 21:11
Show Gist options
  • Save serguei-k/267080b24ba55ae6b14f67d5c3a09575 to your computer and use it in GitHub Desktop.
Save serguei-k/267080b24ba55ae6b14f67d5c3a09575 to your computer and use it in GitHub Desktop.
Project Vector to Plane v2
# get plane normal
normal = eval_expression('axis(plane.matrix, 1)', 'proj')
# project vector to plane
proj = eval_expression('src.translate - ({normal} * dot(src.translate, {normal}))'.format(normal=normal), 'proj')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment