swri-robotics / toolpath_offline_planning

GUI tools for generating tool paths from mesh models offline
27 stars 18 forks source link

Feature Request: Orient part correctly #14

Open mpowelson opened 4 years ago

mpowelson commented 4 years ago

Center mesh and orient "correctly".

Perhaps we could average the normals and then orient the face of the bounding box most inline with that up? Or maybe you just orient the largest bbx face up/down and use the average normals to decide which goes up. We could also potentially let the user move it around using an interactive marker, but I imagine most of our parts would be handled by an approach like above.

This is motivated by parts like this where the part is not centered at the origin and it is oriented down. You end up looking up through the floor at it. Screenshot from 2020-01-16 14-02-31