diff --git a/__pycache__/compute_print_net.cpython-312.pyc b/__pycache__/compute_print_net.cpython-312.pyc index 87fda83..ff8028b 100644 Binary files a/__pycache__/compute_print_net.cpython-312.pyc and b/__pycache__/compute_print_net.cpython-312.pyc differ diff --git a/__pycache__/compute_print_net_out.cpython-312.pyc b/__pycache__/compute_print_net_out.cpython-312.pyc new file mode 100644 index 0000000..9e61695 Binary files /dev/null and b/__pycache__/compute_print_net_out.cpython-312.pyc differ diff --git a/__pycache__/config.cpython-312.pyc b/__pycache__/config.cpython-312.pyc index a28892d..06e50e2 100644 Binary files a/__pycache__/config.cpython-312.pyc and b/__pycache__/config.cpython-312.pyc differ diff --git a/__pycache__/general.cpython-312.pyc b/__pycache__/general.cpython-312.pyc index 9acdc4c..240cd9c 100644 Binary files a/__pycache__/general.cpython-312.pyc and b/__pycache__/general.cpython-312.pyc differ diff --git a/__pycache__/point_cloud_layout.cpython-312.pyc b/__pycache__/point_cloud_layout.cpython-312.pyc index 30523af..cd20fa2 100644 Binary files a/__pycache__/point_cloud_layout.cpython-312.pyc and b/__pycache__/point_cloud_layout.cpython-312.pyc differ diff --git a/__pycache__/print_factory_type_setting_obj_run.cpython-312.pyc b/__pycache__/print_factory_type_setting_obj_run.cpython-312.pyc index 9b069a8..8ebced7 100644 Binary files a/__pycache__/print_factory_type_setting_obj_run.cpython-312.pyc and b/__pycache__/print_factory_type_setting_obj_run.cpython-312.pyc differ diff --git a/__pycache__/print_show_weight_max_obj.cpython-312.pyc b/__pycache__/print_show_weight_max_obj.cpython-312.pyc index 2ae623c..4949a28 100644 Binary files a/__pycache__/print_show_weight_max_obj.cpython-312.pyc and b/__pycache__/print_show_weight_max_obj.cpython-312.pyc differ diff --git a/__pycache__/test_load_json.cpython-312.pyc b/__pycache__/test_load_json.cpython-312.pyc index d14e8d7..d28dd86 100644 Binary files a/__pycache__/test_load_json.cpython-312.pyc and b/__pycache__/test_load_json.cpython-312.pyc differ diff --git a/compute_print_net.py b/compute_print_net.py index 96796f6..9f746cc 100644 --- a/compute_print_net.py +++ b/compute_print_net.py @@ -105,19 +105,19 @@ def compute_bbox(mesh_obj, obj_name, is_downsample=True): # return compute_bbox_ext(mesh_obj, obj_name, is_downsample) mesh_obj_origin = copy.deepcopy(mesh_obj) - total_matrix, z_max, min_bound, max_bound, ply_name = compute_bbox_ext(mesh_obj, obj_name, is_downsample) - # print(f"compute_bbox_ext total_matrix = {total_matrix}, ply_name = {ply_name}") - """ - # 从网络上获取数据 - printId = "" - match = re.search(r"P(\d+)", obj_name) # 匹配 "P" 后的连续数字 - if match: - printId = match.group(1) - total_matrix, z_max, min_bound, max_bound, ply_name = compute_bbox_net(printId) - ply_name = f"{os.path.splitext(obj_name)[0]}={ply_name.split('=')[1]}" - # print(f"compute_bbox_net printId = {printId}, total_matrix = {total_matrix}, ply_name = {ply_name}") - """ + if is_compute_bbox_net: + # 从网络上获取数据 + printId = "" + match = re.search(r"P(\d+)", obj_name) # 匹配 "P" 后的连续数字 + if match: + printId = match.group(1) + total_matrix, z_max, min_bound, max_bound, ply_name = compute_bbox_net(printId) + ply_name = f"{os.path.splitext(obj_name)[0]}={ply_name.split('=')[1]}" + # print(f"compute_bbox_net printId = {printId}, total_matrix = {total_matrix}, ply_name = {ply_name}") + else : + total_matrix, z_max, min_bound, max_bound, ply_name = compute_bbox_ext(mesh_obj, obj_name, is_downsample) + # print(f"compute_bbox_ext total_matrix = {total_matrix}, ply_name = {ply_name}") transformed_vertices = mesh_transform_by_matrix(np.asarray(mesh_obj_origin.vertices), total_matrix) diff --git a/config.py b/config.py index 09ccc95..c182d91 100644 --- a/config.py +++ b/config.py @@ -53,4 +53,6 @@ local_data= {"machine_print_counts":50, 'machine_type': 'small_machine',"pre_bat test_print_max = 0 +is_compute_bbox_net = False + # -------------------------- 结束:测试相关 -------------------------------