Commit 1b97e99a authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

Mesh.__init__ accepts fixWinding for initial vertex set.

parent 91148e64
......@@ -136,7 +136,12 @@ class Mesh(notifier.Notifier, meta.Meta):
"""
def __init__(self, indices, name='mesh', dataSource=None, vertices=None):
def __init__(self,
indices,
name='mesh',
dataSource=None,
vertices=None,
fixWinding=False):
"""Create a ``Mesh`` instance.
Before a ``Mesh`` can be used, some vertices must be added via the
......@@ -151,6 +156,9 @@ class Mesh(notifier.Notifier, meta.Meta):
:arg vertices: Initial vertex set to add - given the key
``'default'``.
:arg fixWinding: Ignored if ``vertices is None``. Passed through to the
:meth:`addVertices` method along with ``vertices``.
"""
self.__name = name
......
......@@ -60,9 +60,12 @@ class VTKMesh(fslmesh.Mesh):
raise RuntimeError('All polygons in VTK file must be '
'triangles ({})'.format(infile))
fslmesh.Mesh.__init__(self, indices, name, dataSource)
self.addVertices(data, 'default', fixWinding=fixWinding)
fslmesh.Mesh.__init__(self,
indices,
name,
dataSource,
vertices=data,
fixWinding=fixWinding)
def loadVTKPolydataFile(infile):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment