feat: 完善 STEP 编辑器最小系统和稳定性

This commit is contained in:
2026-07-28 14:05:14 +08:00
parent 26216064e0
commit 7c263d1e96
19 changed files with 3173 additions and 931 deletions
+58 -10
View File
@@ -65,6 +65,13 @@ INFO_GROUPS: list[tuple[str, list[str]]] = [
"length_change_ratio",
"edge_length_anchor_mode",
"edge_length_anchor_label",
"affine_initial_scale",
"affine_scale",
"affine_scale_correction",
"affine_predicted_edge_length",
"affine_scale_refine_iterations",
"planar_edge_scale_sample_count",
"planar_edge_scale_plane_deviation",
"circular_edge_current_radius",
"circular_edge_target_radius",
"circular_edge_length_scale",
@@ -160,8 +167,15 @@ INFO_GROUPS: list[tuple[str, list[str]]] = [
"shell_source_face_ids",
"shell_opposite_face_id",
"shell_thickness_estimate",
"shell_current_thickness",
"shell_target_thickness",
"shell_delta_thickness",
"shell_delta_ratio",
"shell_signed_thickness",
"shell_overlap_ratio_estimate",
"shell_opposite_normal_dot",
"shell_desired_movement_vector",
"shell_movement_alignment",
"shell_note",
"shell_region_note",
],
@@ -379,13 +393,21 @@ INFO_LABELS = {
"surface_area": "表面积",
"area": "面积",
"length": "长度",
"edge_length": "边长",
"current_length": "当前边长",
"target_length": "目标边长",
"delta_length": "边长变化量",
"length_change_ratio": "边长变化比例",
"edge_length_anchor_mode": "边长基准模式",
"edge_length_anchor_label": "边长基准",
"edge_length": "Edge长度",
"current_length": "当前Edge长度",
"target_length": "目标Edge长度",
"delta_length": "Edge长度变化量",
"length_change_ratio": "Edge长度变化比例",
"edge_length_anchor_mode": "Edge长度基准模式",
"edge_length_anchor_label": "Edge长度基准",
"local_edge_deform_target_kind": "局部边形变目标",
"local_edge_deform_anchor": "局部边形变基准",
"local_edge_deform_face_count": "局部边形变重建面数",
"local_edge_deform_start_move": "局部边形变起点移动",
"local_edge_deform_end_move": "局部边形变终点移动",
"local_edge_deform_moved_endpoint_count": "局部边形变移动端点数",
"local_edge_deform_risk": "局部边形变风险",
"local_edge_deform_note": "局部边形变说明",
"circular_edge_current_radius": "圆边当前半径",
"circular_edge_target_radius": "圆边目标半径",
"circular_edge_length_scale": "圆边长度比例",
@@ -400,10 +422,28 @@ INFO_LABELS = {
"cylinder_resize_delta_ratio": "圆柱直径变化比例",
"cylinder_resize_status": "圆柱编辑状态",
"cylinder_resize_risk": "圆柱编辑风险",
"cylinder_resize_feature_guess": "圆柱候选判断",
"cylinder_resize_feature_guess": "圆柱候选判断",
"cylinder_resize_confidence": "圆柱判断置信度",
"cylinder_resize_same_domain_face_ids": "圆柱同域 Face",
"cylinder_resize_same_domain_face_count": "圆柱同域 Face 数",
"affine_scale": "几何缩放比例",
"affine_initial_scale": "几何缩放初始比例",
"affine_scale_correction": "几何缩放校正比例",
"affine_predicted_edge_length": "几何缩放预估Edge长度",
"affine_scale_refine_iterations": "几何缩放校正次数",
"affine_scale_refine_note": "几何缩放校正说明",
"affine_transform_kind": "几何缩放类型",
"affine_transform_label": "几何缩放类型",
"affine_transform_note": "几何缩放说明",
"affine_transform_warning": "几何缩放警告",
"affine_transform_risk": "几何缩放风险",
"affine_axis_point": "几何缩放基准点",
"affine_axis_direction": "几何缩放轴线方向",
"affine_axis_source": "几何缩放轴线来源",
"affine_anchor_source": "几何缩放基准来源",
"affine_target_kind": "几何缩放目标",
"planar_edge_scale_sample_count": "平面曲线采样点数",
"planar_edge_scale_plane_deviation": "平面曲线采样偏差",
"radius": "半径",
"diameter": "直径",
"target_radius": "目标圆角半径",
@@ -476,11 +516,19 @@ INFO_LABELS = {
"shell_region_kind": "壳体/薄壁候选类型",
"shell_region_status": "壳体/薄壁识别状态",
"shell_confidence": "壳体/薄壁置信度",
"shell_thickness": "薄壁厚度",
"shell_source_face_ids": "壳体/薄壁源平面 Face",
"shell_opposite_face_id": "相对平面 Face",
"shell_thickness_estimate": "薄壁厚度估算",
"shell_current_thickness": "当前薄壁厚度",
"shell_target_thickness": "目标薄壁厚度",
"shell_delta_thickness": "薄壁厚度变化量",
"shell_delta_ratio": "薄壁厚度变化比例",
"shell_signed_thickness": "有符号薄壁厚度",
"shell_overlap_ratio_estimate": "相对平面重叠率估算",
"shell_opposite_normal_dot": "相对平面法向点积",
"shell_desired_movement_vector": "薄壁目标移动向量",
"shell_movement_alignment": "薄壁移动方向匹配度",
"shell_note": "壳体/薄壁识别说明",
"shell_region_note": "壳体/薄壁识别说明",
"u_range": "U 参数范围",
@@ -730,10 +778,10 @@ def _edit_quality_warnings(before_part_stats, after_part_stats) -> list[str]:
return []
warnings: list[str] = []
if after_part_stats.solids == 0:
warnings.append("目标零件编辑后没有检测到 solid,导出前请确认模型是否有效。")
warnings.append("目标零件编辑后没有检测到Solid,导出前请确认模型是否有效。")
elif before_part_stats.solids > 0 and after_part_stats.solids != before_part_stats.solids:
warnings.append(
"目标零件 solid 数发生变化:"
"目标零件Solid数发生变化:"
f"{before_part_stats.solids} -> {after_part_stats.solids}"
"如果这是一次局部推拉/孔径修改,请重点检查导出后是否仍是一体实体。"
)