feat: 完善一级关系参数化建模与参数导出

This commit is contained in:
2026-08-11 18:28:16 +08:00
parent 6cb99a1273
commit 19364d81b5
20 changed files with 917 additions and 167 deletions
+13 -8
View File
@@ -335,17 +335,21 @@ def _assert_target_change_detection() -> None:
def _assert_property_table_column_widths() -> None:
for width in (320, 340, 360, 400, 520):
columns = _property_table_column_widths(width)
if len(columns) != 4:
raise SystemExit(f"property table should have four column widths, got {columns}")
if len(columns) != 5:
raise SystemExit(f"property table should have five column widths, got {columns}")
if sum(columns) != width:
raise SystemExit(f"property table widths should fill viewport {width}, got {columns} sum={sum(columns)}")
label_width, current_width, scope_width, target_width = columns
if current_width < 96:
label_width, current_width, scope_width, target_width, input_width = columns
if label_width < 58:
raise SystemExit(f"dimension name column should stay visible at {width}: {columns}")
if current_width < 64:
raise SystemExit(f"current value column should stay readable at {width}: {columns}")
if target_width < 56:
if target_width < 54:
raise SystemExit(f"target value column should stay usable at {width}: {columns}")
if scope_width < 44:
if scope_width < 52:
raise SystemExit(f"modeling-intent column should stay usable at {width}: {columns}")
if input_width < 48:
raise SystemExit(f"input-parameter checkbox column should stay usable at {width}: {columns}")
def _assert_holed_plane_local_scopes_disabled() -> None:
@@ -465,6 +469,8 @@ def main() -> int:
plane_display_specs = _display_specs(plane_info)
if any(str(spec.get("key", "")) == "area" for spec in plane_display_specs):
raise SystemExit("Face property table should keep area in diagnostics, not in the parameter table")
if any(str(spec.get("key", "")) == "face_center_position" for spec in plane_display_specs):
raise SystemExit("Face property table should temporarily hide center editing")
_assert_keys_absent(
plane_display_specs,
(
@@ -473,6 +479,7 @@ def main() -> int:
"face_first_level_topology",
"face_edit_semantics",
"feature_context_note",
"face_center_position",
),
"plane Face display specs",
)
@@ -530,7 +537,6 @@ def main() -> int:
(
"local_face_width",
"local_face_height",
"face_center_position",
"face_target_normal_position",
),
"plane Face display order",
@@ -555,7 +561,6 @@ def main() -> int:
expected_plane_feature_keys = {
"local_face_width",
"local_face_height",
"face_center_position",
"face_target_normal_position",
}
missing_plane_feature_keys = expected_plane_feature_keys - plane_feature_keys