Added a scanfill wraper to Mathutils, allows you to fill polylines without using Meshes .fill() function.
Takes a list of polylines and returns a list of face index triplets. Added this so using mesh.fill() could be avoided since it requires making an object, linking to the scene and cycling editmode for every NGon imported. Since this is so close to release, It might be good if ken, willian or stivs takes a look at the function to make sure its ok. - Ran 100's of times for importing lightwave models but would be good to doublecheck.
This commit is contained in:
@@ -114,6 +114,17 @@ def LineIntersect(vec1, vec2, vec3, vec4):
|
||||
@return: A tuple with the points on each line respectively closest to the other.
|
||||
"""
|
||||
|
||||
def PolyFill(polylines):
|
||||
"""
|
||||
Takes a list of polylines and calculates triangles that would fill in the polylines.
|
||||
Multiple lines can be used to make holes inside a polyline, or fill in 2 seperate lines at once.
|
||||
@type polylines: List of lists containing vectors, each representing a closed polyline.
|
||||
@rtype: list
|
||||
@return: a list if tuples each a tuple of 3 ints representing a triangle indexing the points given.
|
||||
@note: 2D Vectors will have an assumed Z axis of zero, 4D Vectors W axis is ignored.
|
||||
"""
|
||||
|
||||
|
||||
def CopyVec(vector):
|
||||
"""
|
||||
Create a copy of the Vector object.
|
||||
|
||||
Reference in New Issue
Block a user