feat: 完善特征编辑和选择稳定性

This commit is contained in:
2026-07-29 15:43:28 +08:00
parent 720c2dc970
commit c937e13d43
13 changed files with 8294 additions and 290 deletions
+223 -37
View File
@@ -103,11 +103,19 @@ class StepEditorWindow(WindowCoreMixin, WindowStateMixin, WindowActionMixin, Inf
self.hover_face_actor = None
self.hover_edge_actor = None
self.hover_signature: tuple[str, int] | None = None
self.hover_interval_ms = 85
self.hover_move_threshold_px = 5
self.hover_interval_ms = 140
self.hover_move_threshold_px = 8
self.pending_hover_position: tuple[int, int] | None = None
self.last_hover_pick_position: tuple[int, int] | None = None
self.camera_interaction_active = False
self.edge_actor_visible_before_interaction = True
self.model_interpolation_before_interaction: int | None = None
self.pointer_button_down = False
self.left_button_press_position: tuple[int, int] | None = None
self.left_button_dragged = False
self.left_click_drag_threshold_px = 6
self.skip_next_vtk_left_press = False
self.skip_next_vtk_left_release = False
self.pick_marker_actor = None
self.edit_preview_actor = None
self.edit_preview_actors: list[object] = []
@@ -143,6 +151,11 @@ class StepEditorWindow(WindowCoreMixin, WindowStateMixin, WindowActionMixin, Inf
self.cylinder_candidate_cache: list[dict[str, object]] = []
self.cylinder_candidates_loaded = False
self.operation_in_progress = False
self.edit_busy_timer = QTimer(self)
self.edit_busy_timer.timeout.connect(self._pulse_edit_busy_status)
self.edit_busy_base_text = ""
self.edit_busy_started_at: datetime | None = None
self.edit_busy_phase = 0
self.edit_thread: QThread | None = None
self.edit_worker: EditWorker | None = None
self.pending_edit_context: dict[str, object] | None = None
@@ -158,6 +171,7 @@ class StepEditorWindow(WindowCoreMixin, WindowStateMixin, WindowActionMixin, Inf
self.load_refine_worker: LoadWorker | None = None
self.pending_load_path: Path | None = None
self.initial_load_deflection = 2.0
self.edit_result_deflection = 1.6
self.last_id_kind = "Face"
self.property_editor_updating = False
self.property_editor_specs: list[dict[str, object]] = []
@@ -394,23 +408,76 @@ class StepEditorWindow(WindowCoreMixin, WindowStateMixin, WindowActionMixin, Inf
font-weight: 500;
}
QPushButton#propertyRowEditButton {
background: #fff3d9;
border: 1px solid #d97706;
background: #ea580c;
border: 1px solid #c2410c;
border-radius: 5px;
color: #92400e;
color: #ffffff;
font-weight: 700;
min-height: 18px;
padding: 1px 6px;
}
QPushButton#propertyRowEditButton:hover {
background: #ffe6b8;
border-color: #b45309;
background: #f97316;
border-color: #9a3412;
}
QPushButton#propertyRowEditButton:pressed {
background: #9a3412;
border-color: #7c2d12;
color: #ffffff;
padding-top: 2px;
padding-left: 7px;
}
QPushButton#propertyRowEditButton[changed="true"] {
background: #dcfce7;
border: 1px solid #16a34a;
color: #14532d;
}
QPushButton#propertyRowEditButton[changed="true"]:hover {
background: #bbf7d0;
border-color: #15803d;
}
QPushButton#propertyRowEditButton:disabled {
background: #eef2f6;
border: 1px dashed #bcc7d4;
color: #8f99a8;
}
QLineEdit#propertyTargetEditor {
background: #fff7ed;
border: 2px solid #f97316;
border-radius: 5px;
color: #111827;
min-height: 18px;
padding: 0px 5px;
selection-background-color: #bfdbfe;
}
QLineEdit#propertyTargetEditor:hover {
background: #ffedd5;
border-color: #ea580c;
}
QLineEdit#propertyTargetEditor:focus {
background: #ffffff;
border: 2px solid #2563eb;
padding: 0px 4px;
}
QPushButton#propertyExpandBar {
background: #f8fafc;
border: 1px solid #d7dee8;
border-radius: 4px;
color: #475569;
font-weight: 600;
min-height: 14px;
max-height: 20px;
padding: 1px 6px;
}
QPushButton#propertyExpandBar:hover {
background: #eef6ff;
border-color: #9dbbe0;
color: #1e3a8a;
}
QPushButton#propertyExpandBar:pressed {
background: #dbeafe;
padding-top: 2px;
}
QLineEdit:disabled,
QComboBox:disabled,
QPlainTextEdit:disabled {
@@ -743,14 +810,24 @@ class StepEditorWindow(WindowCoreMixin, WindowStateMixin, WindowActionMixin, Inf
self.property_table.itemChanged.connect(self._on_property_table_item_changed)
object_edit_layout.addWidget(self.property_table)
self.property_expand_button = QPushButton("展开全部属性")
self.property_expand_button.setObjectName("propertyExpandBar")
help_tip(self.property_expand_button, "当前选中对象属性较多时,默认只显示前 6 行;点击这里展开或收起属性表。")
self.property_expand_button.clicked.connect(self.toggle_property_table_expanded)
self.property_expand_button.setVisible(False)
self.property_expand_button.setMaximumHeight(22)
self.property_expand_button.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed)
object_edit_layout.addWidget(self.property_expand_button)
property_action_row = QHBoxLayout()
property_action_row.setContentsMargins(0, 0, 0, 0)
self.apply_property_button = QPushButton("参数化建模")
help_tip(self.apply_property_button, "按当前属性表里修改过的目标值执行参数化建模;一次只执行一个几何修改,成功后可撤销。")
self.apply_property_button.clicked.connect(self.apply_current_property_edit)
object_edit_layout.addWidget(self.apply_property_button)
self.quick_export_all_button = QPushButton("导出当前完整STEP")
help_tip(self.quick_export_all_button, "把当前编辑后的完整模型导出为 STEP 文件。导出前会做基础质量检查。")
self.quick_export_all_button.clicked.connect(self.export_all)
property_action_row.addWidget(self.apply_property_button)
property_action_row.addWidget(self.quick_export_all_button)
object_edit_layout.addLayout(property_action_row)
edit_box = QGroupBox(panel)
edit_box.setObjectName("editSection")
@@ -770,6 +847,18 @@ class StepEditorWindow(WindowCoreMixin, WindowStateMixin, WindowActionMixin, Inf
self.hole_diameter_input = QLineEdit("")
help_tip(self.hole_diameter_input, "圆柱孔/槽的目标直径。选中候选后会自动填一个参考值,可以手动改。")
edit_layout.addWidget(self.hole_diameter_input, 2, 1)
self.hole_center_x_input = QLineEdit("", edit_box)
self.hole_center_y_input = QLineEdit("", edit_box)
self.hole_center_z_input = QLineEdit("", edit_box)
for hole_center_input in (
self.hole_center_x_input,
self.hole_center_y_input,
self.hole_center_z_input,
):
hole_center_input.setVisible(False)
help_tip(self.hole_center_x_input, "圆柱孔轴心目标 X 坐标。当前选中对象表会使用这个隐藏输入执行孔位置修改。")
help_tip(self.hole_center_y_input, "圆柱孔轴心目标 Y 坐标。当前选中对象表会使用这个隐藏输入执行孔位置修改。")
help_tip(self.hole_center_z_input, "圆柱孔轴心目标 Z 坐标。当前选中对象表会使用这个隐藏输入执行孔位置修改。")
self.resize_button = QPushButton("调整圆柱孔径")
help_tip(self.resize_button, "修改孔或圆柱槽的直径。扩大时切削,缩小时会先补料再重切。")
self.resize_button.clicked.connect(self.resize_hole)
@@ -784,21 +873,75 @@ class StepEditorWindow(WindowCoreMixin, WindowStateMixin, WindowActionMixin, Inf
self.resize_slot_button.clicked.connect(self.resize_slot_width)
edit_layout.addWidget(self.resize_slot_button, 5, 0, 1, 2)
edit_layout.addWidget(QLabel("凸台直径"), 6, 0)
edit_layout.addWidget(QLabel("槽/半孔深度"), 6, 0)
self.slot_depth_input = QLineEdit("")
help_tip(self.slot_depth_input, "槽或半孔的目标凹入深度。程序会按当前圆弧角度换算成对应圆柱直径来执行。")
edit_layout.addWidget(self.slot_depth_input, 6, 1)
self.resize_slot_depth_button = QPushButton("调整槽/半孔深度")
help_tip(self.resize_slot_depth_button, "修改已识别槽/半孔候选的凹入深度。当前版本是几何近似,失败会回滚。")
self.resize_slot_depth_button.clicked.connect(self.resize_slot_depth)
edit_layout.addWidget(self.resize_slot_depth_button, 7, 0, 1, 2)
self.slot_arc_length_input = QLineEdit("", edit_box)
self.slot_arc_length_input.setVisible(False)
help_tip(self.slot_arc_length_input, "槽或半孔的目标圆弧长度。当前选中对象表会使用这个隐藏输入执行圆弧长度修改。")
self.slot_angular_span_input = QLineEdit("", edit_box)
self.slot_angular_span_input.setVisible(False)
help_tip(self.slot_angular_span_input, "槽或半孔的目标圆弧角度。当前选中对象表会使用这个隐藏输入执行角度修改。")
self.slot_pair_face_input = QLineEdit("", edit_box)
self.slot_pair_face_input.setVisible(False)
help_tip(self.slot_pair_face_input, "长圆槽/槽孔的另一个半圆端 Face ID。自动配对不准时可在当前选中对象表里手动设置。")
self.slot_total_length_input = QLineEdit("", edit_box)
self.slot_total_length_input.setVisible(False)
help_tip(self.slot_total_length_input, "长圆槽/槽孔的目标总长度。只有识别到成对半圆槽端时才会启用。")
self.slot_center_x_input = QLineEdit("", edit_box)
self.slot_center_x_input.setVisible(False)
self.slot_center_y_input = QLineEdit("", edit_box)
self.slot_center_y_input.setVisible(False)
self.slot_center_z_input = QLineEdit("", edit_box)
self.slot_center_z_input.setVisible(False)
help_tip(self.slot_center_x_input, "槽/半孔目标轴心坐标 X。当前选中对象表会使用这个隐藏输入执行轴心移动。")
help_tip(self.slot_center_y_input, "槽/半孔目标轴心坐标 Y。当前选中对象表会使用这个隐藏输入执行轴心移动。")
help_tip(self.slot_center_z_input, "槽/半孔目标轴心坐标 Z。当前选中对象表会使用这个隐藏输入执行轴心移动。")
edit_layout.addWidget(QLabel("凸台直径"), 8, 0)
self.boss_diameter_input = QLineEdit("")
help_tip(self.boss_diameter_input, "圆柱凸台的目标直径。选中凸台候选后会自动填一个参考值。")
edit_layout.addWidget(self.boss_diameter_input, 6, 1)
edit_layout.addWidget(self.boss_diameter_input, 8, 1)
self.boss_height_input = QLineEdit("", edit_box)
self.boss_height_input.setVisible(False)
help_tip(self.boss_height_input, "圆柱凸台的目标高度。当前选中对象表会使用这个隐藏输入执行高度修改。")
self.boss_center_x_input = QLineEdit("", edit_box)
self.boss_center_x_input.setVisible(False)
self.boss_center_y_input = QLineEdit("", edit_box)
self.boss_center_y_input.setVisible(False)
self.boss_center_z_input = QLineEdit("", edit_box)
self.boss_center_z_input.setVisible(False)
help_tip(self.boss_center_x_input, "圆柱凸台目标轴心坐标 X。当前选中对象表会使用这个隐藏输入执行轴心移动。")
help_tip(self.boss_center_y_input, "圆柱凸台目标轴心坐标 Y。当前选中对象表会使用这个隐藏输入执行轴心移动。")
help_tip(self.boss_center_z_input, "圆柱凸台目标轴心坐标 Z。当前选中对象表会使用这个隐藏输入执行轴心移动。")
self.cone_reference_radius_input = QLineEdit("", edit_box)
self.cone_reference_radius_input.setVisible(False)
help_tip(self.cone_reference_radius_input, "圆锥面的目标参考半径。当前选中对象表会使用这个隐藏输入执行圆锥面修改。")
self.sphere_radius_input = QLineEdit("", edit_box)
self.sphere_radius_input.setVisible(False)
help_tip(self.sphere_radius_input, "球面的目标半径。当前选中对象表会使用这个隐藏输入执行球面修改。")
self.torus_radius_input = QLineEdit("", edit_box)
self.torus_radius_input.setVisible(False)
help_tip(self.torus_radius_input, "环面的目标半径。当前选中对象表会使用这个隐藏输入执行环面修改。")
self.face_area_input = QLineEdit("", edit_box)
self.face_area_input.setVisible(False)
help_tip(self.face_area_input, "复杂曲面的目标Face面积。当前选中对象表会使用这个隐藏输入执行兜底面积缩放。")
self.resize_boss_button = QPushButton("调整圆柱凸台直径")
help_tip(self.resize_boss_button, "修改完整圆柱凸台直径。变大会加料,变小会重建凸台区域。")
self.resize_boss_button.clicked.connect(self.resize_boss)
edit_layout.addWidget(self.resize_boss_button, 7, 0, 1, 2)
edit_layout.addWidget(self.resize_boss_button, 9, 0, 1, 2)
self.suppress_button = QPushButton("封堵圆柱孔")
help_tip(self.suppress_button, "用补料体填住完整圆柱孔。适合通孔/盲孔,不适合半孔或槽。")
self.suppress_button.clicked.connect(self.suppress_hole)
edit_layout.addWidget(self.suppress_button, 8, 0, 1, 2)
edit_layout.addWidget(self.suppress_button, 10, 0, 1, 2)
edit_layout.addWidget(QLabel("孔深度"), 9, 0)
edit_layout.addWidget(QLabel("孔深度"), 11, 0)
depth_inputs = QWidget()
depth_layout = QHBoxLayout(depth_inputs)
depth_layout.setContentsMargins(0, 0, 0, 0)
@@ -810,41 +953,72 @@ class StepEditorWindow(WindowCoreMixin, WindowStateMixin, WindowActionMixin, Inf
self.hole_bottom_face_input.textChanged.connect(lambda _text: self._update_action_states())
depth_layout.addWidget(self.hole_depth_input, stretch=2)
depth_layout.addWidget(self.hole_bottom_face_input, stretch=1)
edit_layout.addWidget(depth_inputs, 9, 1)
self.resize_depth_button = QPushButton("调整盲孔深度")
edit_layout.addWidget(depth_inputs, 11, 1)
self.resize_depth_button = QPushButton("调整盲孔/盲槽深度")
help_tip(self.resize_depth_button, "加深或变浅盲孔/盲槽。需要识别到底面,或手动填写底面 Face ID。")
self.resize_depth_button.clicked.connect(self.resize_hole_depth)
edit_layout.addWidget(self.resize_depth_button, 10, 0, 1, 2)
edit_layout.addWidget(self.resize_depth_button, 12, 0, 1, 2)
edit_layout.addWidget(QLabel("圆角半径"), 11, 0)
edit_layout.addWidget(QLabel("圆角半径"), 13, 0)
self.edge_fillet_radius_input = QLineEdit("")
help_tip(self.edge_fillet_radius_input, "新圆角或已有圆角的目标半径。选中Edge/圆角候选后会自动填参考值。")
edit_layout.addWidget(self.edge_fillet_radius_input, 11, 1)
edit_layout.addWidget(self.edge_fillet_radius_input, 13, 1)
self.fillet_edge_button = QPushButton("给Edge添加圆角")
help_tip(self.fillet_edge_button, "给当前直线Edge新增圆角。不是修改已有圆角;已有圆角请用下面那个按钮。")
self.fillet_edge_button.clicked.connect(self.fillet_edge)
edit_layout.addWidget(self.fillet_edge_button, 12, 0, 1, 2)
edit_layout.addWidget(self.fillet_edge_button, 14, 0, 1, 2)
self.resize_existing_fillet_button = QPushButton("修改已有圆角半径")
help_tip(self.resize_existing_fillet_button, "尝试修改已识别圆角面的半径。会先移除原圆角再重建,复杂圆角可能失败并回滚。")
self.resize_existing_fillet_button.clicked.connect(self.resize_existing_fillet)
edit_layout.addWidget(self.resize_existing_fillet_button, 13, 0, 1, 2)
edit_layout.addWidget(self.resize_existing_fillet_button, 15, 0, 1, 2)
edit_layout.addWidget(QLabel("倒角距离"), 14, 0)
edit_layout.addWidget(QLabel("倒角距离"), 16, 0)
self.edge_chamfer_distance_input = QLineEdit("")
help_tip(self.edge_chamfer_distance_input, "给Edge添加倒角时使用的距离。选中直线Edge后会填一个较小参考值。")
edit_layout.addWidget(self.edge_chamfer_distance_input, 14, 1)
self.edge_chamfer_distance1_input = QLineEdit("", edit_box)
self.edge_chamfer_distance2_input = QLineEdit("", edit_box)
self.edge_chamfer_angle_distance_input = QLineEdit("", edit_box)
self.edge_chamfer_angle_degrees_input = QLineEdit("", edit_box)
self.edge_chamfer_reference_face_input = QLineEdit("", edit_box)
self.edge_chamfer_distance1_input.setVisible(False)
self.edge_chamfer_distance2_input.setVisible(False)
self.edge_chamfer_angle_distance_input.setVisible(False)
self.edge_chamfer_angle_degrees_input.setVisible(False)
self.edge_chamfer_reference_face_input.setVisible(False)
edit_layout.addWidget(self.edge_chamfer_distance_input, 16, 1)
self.chamfer_edge_button = QPushButton("给Edge添加倒角")
help_tip(self.chamfer_edge_button, "给当前直线Edge新增对称倒角。会先预览,再后台执行,失败会回滚。")
self.chamfer_edge_button.clicked.connect(self.chamfer_edge)
edit_layout.addWidget(self.chamfer_edge_button, 15, 0, 1, 2)
edit_layout.addWidget(self.chamfer_edge_button, 17, 0, 1, 2)
edit_layout.addWidget(QLabel("Edge目标长度"), 16, 0)
edit_layout.addWidget(QLabel("Edge目标长度"), 18, 0)
edge_length_inputs = QWidget()
edge_length_layout = QHBoxLayout(edge_length_inputs)
edge_length_layout.setContentsMargins(0, 0, 0, 0)
self.edge_target_length_input = QLineEdit("")
help_tip(self.edge_target_length_input, "当前Edge的目标长度。选中Edge后会自动填当前长度,改成新长度再执行。")
self.edge_start_x_input = QLineEdit("", edit_box)
self.edge_start_y_input = QLineEdit("", edit_box)
self.edge_start_z_input = QLineEdit("", edit_box)
self.edge_center_x_input = QLineEdit("", edit_box)
self.edge_center_y_input = QLineEdit("", edit_box)
self.edge_center_z_input = QLineEdit("", edit_box)
self.edge_end_x_input = QLineEdit("", edit_box)
self.edge_end_y_input = QLineEdit("", edit_box)
self.edge_end_z_input = QLineEdit("", edit_box)
for endpoint_input in (
self.edge_start_x_input,
self.edge_start_y_input,
self.edge_start_z_input,
self.edge_center_x_input,
self.edge_center_y_input,
self.edge_center_z_input,
self.edge_end_x_input,
self.edge_end_y_input,
self.edge_end_z_input,
):
endpoint_input.setVisible(False)
self.edge_length_anchor_combo = NoWheelComboBox()
self.edge_length_anchor_combo.addItem("自动", "auto")
self.edge_length_anchor_combo.addItem("中心", "center")
@@ -858,31 +1032,31 @@ class StepEditorWindow(WindowCoreMixin, WindowStateMixin, WindowActionMixin, Inf
)
edge_length_layout.addWidget(self.edge_target_length_input, stretch=2)
edge_length_layout.addWidget(self.edge_length_anchor_combo, stretch=1)
edit_layout.addWidget(edge_length_inputs, 16, 1)
edit_layout.addWidget(edge_length_inputs, 18, 1)
self.resize_edge_length_button = QPushButton("修改Edge长度")
help_tip(
self.resize_edge_length_button,
"修改当前Edge长度。直线Edge优先局部形变;圆、椭圆和平面曲线会优先用局部/径向策略,必要时再用后备缩放。",
)
self.resize_edge_length_button.clicked.connect(self.resize_any_edge_length)
edit_layout.addWidget(self.resize_edge_length_button, 17, 0, 1, 2)
edit_layout.addWidget(self.resize_edge_length_button, 19, 0, 1, 2)
edit_layout.addWidget(QLabel("薄壁厚度"), 18, 0)
edit_layout.addWidget(QLabel("薄壁厚度"), 20, 0)
self.shell_thickness_input = QLineEdit("")
help_tip(
self.shell_thickness_input,
"薄壁/壳体局部区域的目标厚度。选中有相对平面的平面候选后会自动填一个参考值。",
)
edit_layout.addWidget(self.shell_thickness_input, 18, 1)
edit_layout.addWidget(self.shell_thickness_input, 20, 1)
self.resize_shell_thickness_button = QPushButton("调整薄壁厚度")
help_tip(
self.resize_shell_thickness_button,
"移动当前平面区域来达到目标厚度。当前版本基于相对平面估算,执行前会预览并可回滚。",
)
self.resize_shell_thickness_button.clicked.connect(self.resize_shell_thickness)
edit_layout.addWidget(self.resize_shell_thickness_button, 19, 0, 1, 2)
edit_layout.addWidget(self.resize_shell_thickness_button, 21, 0, 1, 2)
edit_layout.addWidget(QLabel("平移 X/Y/Z"), 20, 0)
edit_layout.addWidget(QLabel("平移 X/Y/Z"), 22, 0)
translate_inputs = QWidget()
translate_layout = QHBoxLayout(translate_inputs)
translate_layout.setContentsMargins(0, 0, 0, 0)
@@ -898,17 +1072,17 @@ class StepEditorWindow(WindowCoreMixin, WindowStateMixin, WindowActionMixin, Inf
translate_layout.addWidget(self.translate_x_input)
translate_layout.addWidget(self.translate_y_input)
translate_layout.addWidget(self.translate_z_input)
edit_layout.addWidget(translate_inputs, 20, 1)
edit_layout.addWidget(translate_inputs, 22, 1)
self.translate_part_button = QPushButton("平移选中零件")
help_tip(self.translate_part_button, "按上面的 X/Y/Z 距离移动当前零件。会写入历史,可撤销。")
self.translate_part_button.clicked.connect(self.translate_selected_part)
self.translate_solid_button = QPushButton("平移选中Solid")
help_tip(self.translate_solid_button, "按上面的 X/Y/Z 距离移动当前Solid。单Solid零件中相当于移动整个零件。")
self.translate_solid_button.clicked.connect(self.translate_selected_solid)
edit_layout.addWidget(self.translate_part_button, 21, 0, 1, 2)
edit_layout.addWidget(self.translate_solid_button, 22, 0, 1, 2)
edit_layout.addWidget(self.translate_part_button, 23, 0, 1, 2)
edit_layout.addWidget(self.translate_solid_button, 24, 0, 1, 2)
edit_layout.addWidget(QLabel("旋转轴/角度"), 23, 0)
edit_layout.addWidget(QLabel("旋转轴/角度"), 25, 0)
rotate_inputs = QWidget()
rotate_layout = QHBoxLayout(rotate_inputs)
rotate_layout.setContentsMargins(0, 0, 0, 0)
@@ -921,15 +1095,27 @@ class StepEditorWindow(WindowCoreMixin, WindowStateMixin, WindowActionMixin, Inf
help_tip(self.rotate_angle_input, "旋转角度,单位是度。正负号决定旋转方向。")
rotate_layout.addWidget(self.rotate_axis_combo)
rotate_layout.addWidget(self.rotate_angle_input)
edit_layout.addWidget(rotate_inputs, 23, 1)
edit_layout.addWidget(rotate_inputs, 25, 1)
self.scale_target_diagonal_input = QLineEdit("", edit_box)
self.scale_target_diagonal_input.setVisible(False)
help_tip(self.scale_target_diagonal_input, "零件或Solid的目标包围盒对角线。当前选中对象表会使用这个隐藏输入执行整体等比缩放。")
self.scale_x_size_input = QLineEdit("", edit_box)
self.scale_x_size_input.setVisible(False)
help_tip(self.scale_x_size_input, "零件或Solid的目标 X 向包围盒尺寸。")
self.scale_y_size_input = QLineEdit("", edit_box)
self.scale_y_size_input.setVisible(False)
help_tip(self.scale_y_size_input, "零件或Solid的目标 Y 向包围盒尺寸。")
self.scale_z_size_input = QLineEdit("", edit_box)
self.scale_z_size_input.setVisible(False)
help_tip(self.scale_z_size_input, "零件或Solid的目标 Z 向包围盒尺寸。")
self.rotate_part_button = QPushButton("旋转选中零件")
help_tip(self.rotate_part_button, "绕所选轴旋转当前零件。会写入历史,可撤销。")
self.rotate_part_button.clicked.connect(self.rotate_selected_part)
self.rotate_solid_button = QPushButton("旋转选中Solid")
help_tip(self.rotate_solid_button, "绕所选轴旋转当前Solid。单Solid零件中相当于旋转整个零件。")
self.rotate_solid_button.clicked.connect(self.rotate_selected_solid)
edit_layout.addWidget(self.rotate_part_button, 24, 0, 1, 2)
edit_layout.addWidget(self.rotate_solid_button, 25, 0, 1, 2)
edit_layout.addWidget(self.rotate_part_button, 26, 0, 1, 2)
edit_layout.addWidget(self.rotate_solid_button, 27, 0, 1, 2)
panel_layout.addWidget(self.object_edit_box)
if ENABLE_EXPORT_PANEL: