@@ -62,7 +62,8 @@ def run(self, num_proc: int = 1):
6262 if num_proc <= 1 :
6363
6464 # Iterates through points z (inner) -> y (middle) -> x (outer)
65- for data_point in tqdm (_data_points , desc = "Running Process Map" ):
65+ # for data_point in tqdm(_data_points, desc="Running Process Map"):
66+ for data_point in tqdm (_data_points ):
6667 # Copies build parameters to a new object to pass as overrides.
6768 modified_build_parameters = deepcopy (self .build_parameters )
6869
@@ -104,7 +105,7 @@ def run(self, num_proc: int = 1):
104105 for future in tqdm (
105106 as_completed (futures ),
106107 total = len (futures ),
107- desc = "Running Process Map" ,
108+ # desc="Running Process Map", # Causes invalid json warning in claude-desktop
108109 ):
109110 result = (
110111 future .result ()
@@ -337,10 +338,10 @@ def plot(
337338 max_z_value_magnitude = _plot_data .axes [2 ][- 1 ].magnitude
338339
339340 # z is often layer height or hatch spacing
340- z_values = _plot_data . axes [ 2 ]
341- z_values . reverse ( )
341+ # Use reversed() to avoid mutating the original list
342+ z_values = list ( reversed ( _plot_data . axes [ 2 ]) )
342343
343- z_units = f" { _plot_data .axes [2 ][0 ].units :~ } "
344+ z_units = _plot_data .axes [2 ][0 ].units
344345 z_label = _plot_data .parameter_names [2 ].replace ("_" , " " ).title ()
345346
346347 for z_idx , z_value in enumerate (z_values ):
@@ -359,14 +360,17 @@ def plot(
359360 layer_cmap = get_colormap_segment (position , cmap )
360361
361362 # Plotting
362- data_2d = data [:, :, - z_idx ]
363+ # Use -(z_idx + 1) since -0 equals 0, not -1
364+ data_2d = data [:, :, - (z_idx + 1 )]
363365 # Mask all the False values so only True (1) areas are drawn
364366 data_2d_masked = np .ma .masked_where (
365367 ~ np .array (data_2d , dtype = bool ), data_2d
366368 )
367369 ax .imshow (
368370 data_2d_masked ,
369371 cmap = layer_cmap ,
372+ vmin = 0 ,
373+ vmax = 2 ,
370374 aspect = "auto" ,
371375 origin = "lower" ,
372376 extent = extent ,
0 commit comments