Lines Matching refs:pts

156 def draw_SVG_poly(pts, face, st, name, parent):
164 d = d+ str(pts[face[i]-1][0]) + ',' + str(-pts[face[i]-1][1])#add point
171 def draw_edges( edge_list, pts, st, parent ):
173 pt_1 = pts[ edge[0]-1 ][0:2] #the point at the start
174 pt_2 = pts[ edge[1]-1 ][0:2] #the point at the end
178 def draw_faces( faces_data, pts, obj, shading, fill_col,st, parent):
186 draw_SVG_poly(pts, obj.fce[ face_no ], st, 'Face:'+str(face_no), parent)
213 def get_normal( pts, face): #returns the normal vector for the plane passing though the first three elements of face of pts
215 a = (array(pts[ face[0]-1 ]) - array(pts[ face[1]-1 ]))
216 b = (array(pts[ face[0]-1 ]) - array(pts[ face[2]-1 ]))
219 def get_unit_normal(pts, face, cw_wound): #returns the unit normal for the plane passing through the first three points of face, taking account of winding
225 return winding*normalise(get_normal(pts, face))
260 def get_max_z(pts, face): #returns the largest z_value of any point in the face
261 max_z = pts[ face[0]-1 ][2]
263 if pts[ face[0]-1 ][2] >= max_z:
264 max_z = pts[ face[0]-1 ][2]
267 def get_min_z(pts, face): #returns the smallest z_value of any point in the face
268 min_z = pts[ face[0]-1 ][2]
270 if pts[ face[i]-1 ][2] <= min_z:
271 min_z = pts[ face[i]-1 ][2]
274 def get_cent_z(pts, face): #returns the centroid z_value of any point in the face
277 sum += pts[ face[i]-1 ][2]
280 def get_z_sort_param(pts, face, method): #returns the z-sorting parameter specified by 'method' ('max', 'min', 'cent')
283 z_sort_param = get_max_z(pts, face)
285 z_sort_param = get_min_z(pts, face)
287 z_sort_param = get_cent_z(pts, face)