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: - op –
c4d.PolygonObject - points –
listofc4d.Vector - polys –
listofc4d.CPolygon
Returns: (
listofc4d.Vector,listofc4d.Vector) – The first element is the polygon normals, the second is the polygon midpoint.- op –
-
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: - op –
c4d.PolygonObject - nb –
c4d.utils.Neighborinitialized with op - polys – An optional list of the polygons of op.
Returns: - op –