Changes to satisfy black formatting
This commit is contained in:
@ -179,7 +179,7 @@ def toVTK(
|
|||||||
loc: Location = Location(),
|
loc: Location = Location(),
|
||||||
color: Tuple[float, float, float, float] = (1.0, 1.0, 1.0, 1.0),
|
color: Tuple[float, float, float, float] = (1.0, 1.0, 1.0, 1.0),
|
||||||
tolerance: float = 1e-3,
|
tolerance: float = 1e-3,
|
||||||
angularTolerance: float = 0.1
|
angularTolerance: float = 0.1,
|
||||||
) -> vtkRenderer:
|
) -> vtkRenderer:
|
||||||
|
|
||||||
loc = loc * assy.loc
|
loc = loc * assy.loc
|
||||||
@ -189,7 +189,9 @@ def toVTK(
|
|||||||
color = assy.color.toTuple()
|
color = assy.color.toTuple()
|
||||||
|
|
||||||
if assy.shapes:
|
if assy.shapes:
|
||||||
data = Compound.makeCompound(assy.shapes).toVtkPolyData(tolerance, angularTolerance)
|
data = Compound.makeCompound(assy.shapes).toVtkPolyData(
|
||||||
|
tolerance, angularTolerance
|
||||||
|
)
|
||||||
|
|
||||||
mapper = vtkMapper()
|
mapper = vtkMapper()
|
||||||
mapper.SetInputData(data)
|
mapper.SetInputData(data)
|
||||||
|
|||||||
@ -79,7 +79,9 @@ def exportCAF(assy: AssemblyProtocol, path: str) -> bool:
|
|||||||
return status == PCDM_StoreStatus.PCDM_SS_OK
|
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.
|
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)
|
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.
|
Export an assembly to a vrml file using vtk.
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user