Browse Source

代码更新

main
hesuicong 2 weeks ago
parent
commit
4dffb90613
  1. 4
      compute_print_net.py
  2. 4
      config.py
  3. 7
      test_load_json.py

4
compute_print_net.py

@ -172,11 +172,9 @@ def get_lowest_position_of_z_ext(mesh_obj): @@ -172,11 +172,9 @@ def get_lowest_position_of_z_ext(mesh_obj):
vertices = np.asarray(pcd_transformed.vertices)
z_mean1 = np.mean(vertices[:, 2])
z_max1 = np.max(vertices[:, 2])
start_time_v1 = time.time()
volume_centroid = get_volume_centroid(pcd_transformed)
z_volume_center1 = volume_centroid[2]
delta = time.time() - start_time_v1
# print(f"get_volume_centroid time={delta}")
angle_rad = np.pi
#print("旋转前质心:", pcd_transformed.get_center())

4
config.py

File diff suppressed because one or more lines are too long

7
test_load_json.py

@ -6,8 +6,8 @@ from PIL import Image @@ -6,8 +6,8 @@ from PIL import Image
import argparse
import gc
from config import print_factory_type_dir
from config import print_data_dir
from config import test_print_max
from general import mesh_transform_by_matrix
from general import read_mesh
@ -96,8 +96,9 @@ def load_and_transform_models(base_path, dict_origin, json_name): @@ -96,8 +96,9 @@ def load_and_transform_models(base_path, dict_origin, json_name):
print(f"已加载并变换: {index} {os.path.basename(obj_path)}")
index = index + 1
# if (index > 80):
# break
if test_print_max > 0:
if (index > test_print_max):
break
add_plank = True
if add_plank:

Loading…
Cancel
Save