feat: 完善 STEP 一级参数化编辑识别与关系式建模
This commit is contained in:
@@ -740,7 +740,15 @@ def main() -> int:
|
||||
cylinder_specs = _specs(cylinder_info)
|
||||
cylinder_keys = {str(spec.get("key", "")) for spec in cylinder_specs}
|
||||
_assert_no_generic_face_leak(cylinder_keys, "cylindrical hole feature")
|
||||
_assert_contains(cylinder_keys, {"diameter", "hole_cylinder_radius"}, "cylindrical hole feature")
|
||||
_assert_contains(cylinder_keys, {"diameter", "hole_cylinder_radius", "hole_axis_center"}, "cylindrical hole feature")
|
||||
hole_axis_spec = _spec(cylinder_specs, "hole_axis_center")
|
||||
hole_axis_local = _scope_mode(cylinder_specs, "hole_axis_center", "local")
|
||||
if str(hole_axis_spec.get("label") or "") != "位置":
|
||||
raise SystemExit(f"hole axis center should be shown to users as position: {hole_axis_spec}")
|
||||
if str(hole_axis_spec.get("value_type") or "") != "vector3":
|
||||
raise SystemExit(f"hole axis center should use an X/Y/Z vector target: {hole_axis_spec}")
|
||||
if str(hole_axis_local.get("action") or "") != "move_cylindrical_hole_axis":
|
||||
raise SystemExit(f"hole axis center should move the hole itself by default: {hole_axis_local}")
|
||||
_assert_current_text_contains(
|
||||
cylinder_specs,
|
||||
"cad_modeling_form",
|
||||
@@ -750,7 +758,7 @@ def main() -> int:
|
||||
_assert_current_text_contains(
|
||||
cylinder_specs,
|
||||
"cad_recommended_operation",
|
||||
("孔径", "盲孔", "轴心"),
|
||||
("孔径", "盲孔", "位置"),
|
||||
"cylindrical hole feature",
|
||||
)
|
||||
|
||||
@@ -789,6 +797,12 @@ def main() -> int:
|
||||
cylinder_feature_probe = _PropertySpecProbe()
|
||||
cylinder_feature_specs, _used = cylinder_feature_probe._editable_property_specs(cylinder_topology_info)
|
||||
cylinder_feature_rows = cylinder_feature_probe._feature_property_specs(cylinder_feature_specs, cylinder_topology_info)
|
||||
cylinder_feature_keys = {str(spec.get("key", "")) for spec in cylinder_feature_rows}
|
||||
_assert_contains(
|
||||
cylinder_feature_keys,
|
||||
{"diameter", "hole_axis_center"},
|
||||
"cylindrical feature mode display specs",
|
||||
)
|
||||
_assert_keys_absent(
|
||||
cylinder_feature_rows,
|
||||
(
|
||||
@@ -876,7 +890,7 @@ def main() -> int:
|
||||
"feature_bottom_face_ids": (),
|
||||
}
|
||||
)
|
||||
_assert_contains(split_full_hole_keys, {"diameter", "hole_cylinder_radius"}, "split full cylindrical hole")
|
||||
_assert_contains(split_full_hole_keys, {"diameter", "hole_cylinder_radius", "hole_axis_center"}, "split full cylindrical hole")
|
||||
if "slot_chord_width_estimate" in split_full_hole_keys:
|
||||
raise SystemExit(f"split full cylindrical hole should not be shown as a slot: {split_full_hole_keys}")
|
||||
|
||||
@@ -915,7 +929,7 @@ def main() -> int:
|
||||
_assert_current_text_contains(
|
||||
slot_specs,
|
||||
"cad_recommended_operation",
|
||||
("槽宽", "槽深", "轴心"),
|
||||
("槽宽", "槽深", "位置"),
|
||||
"slot/half-hole feature",
|
||||
)
|
||||
blocked_slot_specs = _display_specs(
|
||||
|
||||
Reference in New Issue
Block a user