Skip to content

JohnYeung-dojjy/py_geometry_constraint

Repository files navigation

py_geometry_constraint

The geometryConstraint function in Maya and similar functions in other languages are helpful to project points/vertices onto a mesh, locking their motion.

But I have found no similar implementations currently existing in python. After some research, referencing to:

  1. facebookresearch/pytorch3d#193 and
  2. facebookresearch/pytorch3d#1016

I present to you a geometryConstraint implementation in python, using pytorch3d.

Example output:

  • blue points: vertices on mesh
  • red lines: edges on mesh
  • green points: points and their projection on the closest plane/faces
  • black lines: line of projection

test output

Development Environment

WSL Ubuntu-22.04 with python3.10