refined the PolygonMesh constructor
This commit is contained in:
+4
-4
@@ -133,10 +133,10 @@ class PolygonMesh(object):
|
||||
edges, and faces)
|
||||
'''
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.vertices = [Vertex(*v) for v in kwargs['vertices']]
|
||||
self.edges = kwargs['edges']
|
||||
self.faces = kwargs['faces']
|
||||
def __init__(self, vertices, faces, edges=None, **kwargs):
|
||||
self.vertices = [Vertex(*v) for v in vertices]
|
||||
self.faces = faces
|
||||
self.edges = edges
|
||||
|
||||
# the strategy for the following members involves lazy-instantiating
|
||||
# them if they weren't passing them in:
|
||||
|
||||
Reference in New Issue
Block a user