nr.c4d.geom

This module provides common heler methods for working with geometry in Cinema 4D, such as computing face- and vertex normals.

Functions

nr.c4d.geom.calculate_face_normals(op=None, points=None, polys=None)[source]

Builds a list of face normals and polygon midpoints from op or the specified points and polygons lists.

Parameters:
Returns:

(list of c4d.Vector, list of c4d.Vector) – The first element is the polygon normals, the second is the polygon midpoint.

nr.c4d.geom.build_point_connection_list(op, nb, polys=None)[source]

Builds a list that for each vertex contains a tuple which consists of the indices of points connected with that respective point by an edge in the mesh.

from nr.c4d.geom import build_point_connection_list
from c4d.utils import Neighbor

def main():
  nb = Neighbor()
  nb.Init(op)
  conn = build_point_connection_list(op, nb)
  print "Points connected with point 1:", conn[1]
Parameters:
Returns:

list of tuple of int