understanding the bpy_extras.view3d_utils

i’m trying to understand what exactly the bpy_extras.view3d_utils-methods do. the image is an visualisation of what i think they do.

corrections or hints are much appreciated!

EDIT: the image below is outdated and some vectors are wrong.

  • location 3d_to_region_2d, requires a coordinate converted to world space and returns its location on the screen for the given region / view3d.
  • region_2d_to_location_3d, will be the inverse of that.

For the rest I would do help(function) because i haven’t used them yet. I used location_3d_to_region_2d in GL_fillet, Basic Calliper and SVG from object

question about the gl_fillet: first you calculate the points in 3d-space and then draw them on the viewplane with location_3d_to_region_2d. right?

gl_fillet is perhaps a poor example, because i don’t do local->global conversion correctly (for the fillet to show up in the correct location you must apply all transforms to the object - a trivial fix in hindsight but the script became quickly redundant with the advent of zmj100 fillet tools) .

gl_calliper with two or three empties selected does draw correctly (empties don’t have local coordinates).

The svg script does translate local->global->screen correctly.

blenderscripting matrixworld might be of some interest, it does convert local->global coordinates correctly and projects them into 2d space.

Sorry if this is more confusing than silence :slight_smile: