Skip to content

Commit a85fa71

Browse files
committed
round the progress bar while drawing
1 parent e5e703f commit a85fa71

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

elkplot/device.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,12 @@ def run_layer(self, layer: shapely.MultiLineString, label: Optional[str] = None)
277277
args=(queue, layer_coord_list, jog_planner, draw_planner),
278278
)
279279
p.start()
280-
bar = tqdm(total=layer.length + elkplot.up_length(layer), desc=label)
280+
bar = tqdm(
281+
total=layer.length + elkplot.up_length(layer),
282+
desc=label,
283+
bar_format="{l_bar}{bar}| {n:.1f}/{total:.1f} {unit} [{elapsed}<{remaining} {rate_fmt}{postfix}]",
284+
unit="inches",
285+
)
281286
idx = 0
282287
while True:
283288
jog_plan, length = queue.get()

0 commit comments

Comments
 (0)