MCPcopy
hub / github.com/CadQuery/cadquery / _to_vtk_shapes

Function _to_vtk_shapes

cadquery/vis.py:179–198  ·  view source on GitHub ↗

Convert Shapes to vtkAssembly.

(
    obj: List[ShapeLike],
    color: Tuple[float, float, float] = DEFAULT_COLOR,
    edgecolor: Tuple[float, float, float] = DEFAULT_EDGE_COLOR,
    edges: bool = True,
    linewidth: float = 2,
    alpha: float = 1,
    tolerance: float = 1e-3,
)

Source from the content-addressed store, hash-verified

177
178
179def _to_vtk_shapes(
180 obj: List[ShapeLike],
181 color: Tuple[float, float, float] = DEFAULT_COLOR,
182 edgecolor: Tuple[float, float, float] = DEFAULT_EDGE_COLOR,
183 edges: bool = True,
184 linewidth: float = 2,
185 alpha: float = 1,
186 tolerance: float = 1e-3,
187) -> List[vtkProp3D]:
188 """
189 Convert Shapes to vtkAssembly.
190 """
191
192 return toVTKAssy(
193 _to_assy(*obj, color=color, alpha=alpha),
194 edgecolor=(*edgecolor, 1),
195 edges=edges,
196 linewidth=linewidth,
197 tolerance=tolerance,
198 )
199
200
201def ctrlPts(

Callers 1

styleFunction · 0.85

Calls 2

toVTKAssyFunction · 0.85
_to_assyFunction · 0.85

Tested by

no test coverage detected