Spaces:
Build error
Build error
Muhammad Ahmad Zia commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -933,7 +933,7 @@ def place_finger_cut_adjusted(
|
|
| 933 |
logger.error(f"Error in place_finger_cut_adjusted: {e}")
|
| 934 |
return fallback_solution()
|
| 935 |
|
| 936 |
-
def save_dxf_spline(inflated_contours, scaling_factor, height, finger_clearance=False):
|
| 937 |
logger.info(f"Starting save_dxf_spline with {len(inflated_contours)} contours")
|
| 938 |
|
| 939 |
degree = 3
|
|
@@ -976,7 +976,7 @@ def save_dxf_spline(inflated_contours, scaling_factor, height, finger_clearance=
|
|
| 976 |
finger_cut_centers,
|
| 977 |
final_polygons_inch,
|
| 978 |
circle_diameter=1.0,
|
| 979 |
-
min_gap=0.25,
|
| 980 |
max_attempts=100
|
| 981 |
)
|
| 982 |
|
|
@@ -1253,7 +1253,7 @@ def predict(
|
|
| 1253 |
t = time.time()
|
| 1254 |
use_finger_clearance = True if finger_clearance.lower() == "yes" else False
|
| 1255 |
doc, final_polygons_inch = save_dxf_spline(
|
| 1256 |
-
contours, scaling_factor, processed_size[0], finger_clearance=use_finger_clearance
|
| 1257 |
)
|
| 1258 |
del contours
|
| 1259 |
gc.collect()
|
|
|
|
| 933 |
logger.error(f"Error in place_finger_cut_adjusted: {e}")
|
| 934 |
return fallback_solution()
|
| 935 |
|
| 936 |
+
def save_dxf_spline(offset_value,inflated_contours, scaling_factor, height, finger_clearance=False):
|
| 937 |
logger.info(f"Starting save_dxf_spline with {len(inflated_contours)} contours")
|
| 938 |
|
| 939 |
degree = 3
|
|
|
|
| 976 |
finger_cut_centers,
|
| 977 |
final_polygons_inch,
|
| 978 |
circle_diameter=1.0,
|
| 979 |
+
min_gap=(0.25+offset_value),
|
| 980 |
max_attempts=100
|
| 981 |
)
|
| 982 |
|
|
|
|
| 1253 |
t = time.time()
|
| 1254 |
use_finger_clearance = True if finger_clearance.lower() == "yes" else False
|
| 1255 |
doc, final_polygons_inch = save_dxf_spline(
|
| 1256 |
+
offset_inches,contours, scaling_factor, processed_size[0], finger_clearance=use_finger_clearance
|
| 1257 |
)
|
| 1258 |
del contours
|
| 1259 |
gc.collect()
|