Changes to satisfy black formatting

This commit is contained in:
Jeremy Wright
2022-04-27 13:52:45 -04:00
parent 7c0fd90e7c
commit a1f46463ce
2 changed files with 13 additions and 4 deletions

View File

@ -179,7 +179,7 @@ def toVTK(
loc: Location = Location(),
color: Tuple[float, float, float, float] = (1.0, 1.0, 1.0, 1.0),
tolerance: float = 1e-3,
angularTolerance: float = 0.1
angularTolerance: float = 0.1,
) -> vtkRenderer:
loc = loc * assy.loc
@ -189,7 +189,9 @@ def toVTK(
color = assy.color.toTuple()
if assy.shapes:
data = Compound.makeCompound(assy.shapes).toVtkPolyData(tolerance, angularTolerance)
data = Compound.makeCompound(assy.shapes).toVtkPolyData(
tolerance, angularTolerance
)
mapper = vtkMapper()
mapper.SetInputData(data)

View File

@ -79,7 +79,9 @@ def exportCAF(assy: AssemblyProtocol, path: str) -> bool:
return status == PCDM_StoreStatus.PCDM_SS_OK
def _vtkRenderWindow(assy: AssemblyProtocol, tolerance: float=1e-3, angularTolerance: float=0.1) -> vtkRenderWindow:
def _vtkRenderWindow(
assy: AssemblyProtocol, tolerance: float = 1e-3, angularTolerance: float = 0.1
) -> vtkRenderWindow:
"""
Convert an assembly to a vtkRenderWindow. Used by vtk based exporters.
"""
@ -111,7 +113,12 @@ def exportVTKJS(assy: AssemblyProtocol, path: str):
make_archive(path, "zip", tmpdir)
def exportVRML(assy: AssemblyProtocol, path: str, tolerance: float=1e-3, angularTolerance: float=0.1):
def exportVRML(
assy: AssemblyProtocol,
path: str,
tolerance: float = 1e-3,
angularTolerance: float = 0.1,
):
"""
Export an assembly to a vrml file using vtk.
"""