feat: 增加Face偏移保持一级关系策略
This commit is contained in:
@@ -491,6 +491,19 @@ def main() -> int:
|
||||
_assert_label(plane_specs, "local_face_width", "面内长度")
|
||||
_assert_label(plane_specs, "local_face_height", "面内宽度")
|
||||
_assert_label(plane_specs, "face_target_normal_position", "偏移")
|
||||
offset_keep_relations = _scope_mode(plane_specs, "face_target_normal_position", "keep_relations")
|
||||
if str(offset_keep_relations.get("label") or "") != "保持关系":
|
||||
raise SystemExit(f"Face plane-offset keep-relations scope should be labelled clearly: {offset_keep_relations}")
|
||||
if str(offset_keep_relations.get("action") or "") != "push_pull_face_keep_relations":
|
||||
raise SystemExit(f"Face plane-offset keep-relations scope should use its own action: {offset_keep_relations}")
|
||||
if not bool(offset_keep_relations.get("enabled", False)):
|
||||
raise SystemExit(f"Face plane-offset keep-relations scope should be available on simple planar Face: {offset_keep_relations}")
|
||||
_assert_scoped_hint_fragments(
|
||||
plane_specs,
|
||||
"face_target_normal_position",
|
||||
"keep_relations",
|
||||
("一级", "平行/垂直", "会直接阻止"),
|
||||
)
|
||||
_assert_actionable_rows_first(
|
||||
plane_info,
|
||||
(
|
||||
@@ -575,7 +588,7 @@ def main() -> int:
|
||||
mode,
|
||||
("5%", "5 倍", "会被阻止"),
|
||||
)
|
||||
for mode in ("push_pull", "local", "owning"):
|
||||
for mode in ("push_pull", "keep_relations", "local", "owning"):
|
||||
_assert_scoped_hint_fragments(
|
||||
plane_specs,
|
||||
"face_target_normal_position",
|
||||
|
||||
Reference in New Issue
Block a user