mesh Package

mesh Package

class TriangleMesh(vertices, triangles, vertex_colors)[source]

Bases: object

__init__(vertices, triangles, vertex_colors)[source]

Vertices is an n,3 array, triangles is a list, vertex_colors is a n,3 array

downshrink()[source]
classmethod merge(meshes)[source]
nTriangles
nVertices
find_closest_points(pts1, pts2)[source]
get_normal_vectors(vec)[source]
get_point_circle_about(pt, normal, radius, n)[source]
norm_vec(v)[source]
get_best_joining_offset(pts1, pts2)[source]
class MeshWriterPLY[source]

Bases: object

classmethod build_string(mesh)[source]
ply_tmpl = 'ply\nformat ascii 1.0\nelement vertex $mesh.nVertices\nproperty float x\nproperty float y\nproperty float z\nproperty uchar red\nproperty uchar green\nproperty uchar blue\nelement face $mesh.nTriangles\nproperty list uchar int vertex_index\nend_header\n#for i in range($mesh.nVertices):\n$mesh.vertices[i,0] $mesh.vertices[i,1] $mesh.vertices[i,2] $conv($mesh.vertex_colors[i,0]) $conv($mesh.vertex_colors[i,1]) $conv($mesh.vertex_colors[i,2])\n#end for\n#for t in $mesh.triangles:\n3 $t[0] $t[1] $t[2]\n#end for'
class MeshBuilderRings[source]

Bases: object

classmethod build(morph, region_color_map=None, n=20)[source]

builder_rings Module

class MeshBuilderRings[source]

Bases: object

classmethod build(morph, region_color_map=None, n=20)[source]
_build_triangle_mesh_between_rings(pts1, pts2, pts1_offset, pts2_offset)[source]

mesh Module

class TriangleMesh(vertices, triangles, vertex_colors)[source]

Bases: object

__init__(vertices, triangles, vertex_colors)[source]

Vertices is an n,3 array, triangles is a list, vertex_colors is a n,3 array

downshrink()[source]
classmethod merge(meshes)[source]
nTriangles
nVertices

util Module

find_closest_points(pts1, pts2)[source]
get_best_joining_offset(pts1, pts2)[source]
get_normal_vectors(vec)[source]
get_point_circle_about(pt, normal, radius, n)[source]
norm_vec(v)[source]

writer_ply Module

class MeshWriterPLY[source]

Bases: object

classmethod build_string(mesh)[source]
ply_tmpl = 'ply\nformat ascii 1.0\nelement vertex $mesh.nVertices\nproperty float x\nproperty float y\nproperty float z\nproperty uchar red\nproperty uchar green\nproperty uchar blue\nelement face $mesh.nTriangles\nproperty list uchar int vertex_index\nend_header\n#for i in range($mesh.nVertices):\n$mesh.vertices[i,0] $mesh.vertices[i,1] $mesh.vertices[i,2] $conv($mesh.vertex_colors[i,0]) $conv($mesh.vertex_colors[i,1]) $conv($mesh.vertex_colors[i,2])\n#end for\n#for t in $mesh.triangles:\n3 $t[0] $t[1] $t[2]\n#end for'