Skip to content
Snippets Groups Projects
Commit 1b97e99a authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

Mesh.__init__ accepts fixWinding for initial vertex set.

parent 91148e64
No related branches found
No related tags found
No related merge requests found
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment