Changeset View
Changeset View
Standalone View
Standalone View
object_cloud_gen.py
| Context not available. | |||||
| minVert[2] = minVert[2] - sizeDifference | minVert[2] = minVert[2] - sizeDifference | ||||
| #Create arrays of verts and faces to be added to the mesh | #Create arrays of verts and faces to be added to the mesh | ||||
| addVerts = [] | addVerts = [ | ||||
| # X high loop | |||||
| #X high loop | [maxVert[0], maxVert[1], maxVert[2]], | ||||
| addVerts.append([maxVert[0], maxVert[1], maxVert[2]]) | [maxVert[0], maxVert[1], minVert[2]], | ||||
| addVerts.append([maxVert[0], maxVert[1], minVert[2]]) | [maxVert[0], minVert[1], minVert[2]], | ||||
| addVerts.append([maxVert[0], minVert[1], minVert[2]]) | [maxVert[0], minVert[1], maxVert[2]], | ||||
| addVerts.append([maxVert[0], minVert[1], maxVert[2]]) | # x low loop | ||||
| [minVert[0], maxVert[1], maxVert[2]], | |||||
| #x low loop | [minVert[0], maxVert[1], minVert[2]], | ||||
| addVerts.append([minVert[0], maxVert[1], maxVert[2]]) | [minVert[0], minVert[1], minVert[2]], | ||||
| addVerts.append([minVert[0], maxVert[1], minVert[2]]) | [minVert[0], minVert[1], maxVert[2]] | ||||
| addVerts.append([minVert[0], minVert[1], minVert[2]]) | ] | ||||
| addVerts.append([minVert[0], minVert[1], maxVert[2]]) | |||||
| # Make the faces of the bounding box. | # Make the faces of the bounding box. | ||||
| addFaces = [] | |||||
| # Draw a box on paper and number the vertices. | # Draw a box on paper and number the vertices. | ||||
| # Use right hand rule to come up with number orders for faces on | # Use right hand rule to come up with number orders for faces on | ||||
| # the box (with normals pointing out). | # the box (with normals pointing out). | ||||
| addFaces.append([0, 3, 2, 1]) | addFaces = [ | ||||
| addFaces.append([4, 5, 6, 7]) | [0, 3, 2, 1], | ||||
| addFaces.append([0, 1, 5, 4]) | [4, 5, 6, 7], | ||||
| addFaces.append([1, 2, 6, 5]) | [0, 1, 5, 4], | ||||
| addFaces.append([2, 3, 7, 6]) | [1, 2, 6, 5], | ||||
| addFaces.append([0, 4, 7, 3]) | [2, 3, 7, 6], | ||||
| [0, 4, 7, 3] | |||||
| ] | |||||
| # Delete all geometry from the object. | # Delete all geometry from the object. | ||||
| bpy.ops.mesh.select_all(action='SELECT') | bpy.ops.mesh.select_all(action='SELECT') | ||||
| Context not available. | |||||