Convert a path to a 3D segment.
(path, zs=0, zdir='z')
| 394 | |
| 395 | |
| 396 | def _path_to_3d_segment(path, zs=0, zdir='z'): |
| 397 | """Convert a path to a 3D segment.""" |
| 398 | |
| 399 | zs = np.broadcast_to(zs, len(path)) |
| 400 | pathsegs = path.iter_segments(simplify=False, curves=False) |
| 401 | seg = [(x, y, z) for (((x, y), code), z) in zip(pathsegs, zs)] |
| 402 | seg3d = [juggle_axes(x, y, z, zdir) for (x, y, z) in seg] |
| 403 | return seg3d |
| 404 | |
| 405 | |
| 406 | def _paths_to_3d_segments(paths, zs=0, zdir='z'): |
no test coverage detected
searching dependent graphs…