feat: 完善一级关系编辑 UI 与视图体验
This commit is contained in:
@@ -53,6 +53,15 @@ def main() -> int:
|
||||
context = state._feature_context_info(SOURCE_FACE_ID)
|
||||
specs, _used = state._editable_property_specs(context)
|
||||
rows = state._feature_context_property_specs(specs, context)
|
||||
context_row = next((row for row in rows if row.get("key") == "feature_context_note"), None)
|
||||
if context_row is None:
|
||||
raise AssertionError("feature context should expose an associated-feature detection summary row")
|
||||
context_text = str(context_row.get("current_text") or "")
|
||||
context_scope = str(context_row.get("scope_text") or "")
|
||||
if "相邻特征" not in context_text or "局部关联特征" not in context_text:
|
||||
raise AssertionError(f"associated detection summary is not clear enough: {context_row}")
|
||||
if "相邻特征" not in context_scope or "关联特征" not in context_scope:
|
||||
raise AssertionError(f"associated detection summary should expose level and count: {context_row}")
|
||||
editable = {
|
||||
(str(row.get("label")), int(row.get("source_face_id", -1)), str(row.get("action")))
|
||||
for row in rows
|
||||
@@ -74,8 +83,24 @@ def main() -> int:
|
||||
index for index in range(display.GetNumberOfCells())
|
||||
if int(face_ids.GetTuple1(index)) == 394
|
||||
]
|
||||
if len(boss_cells) < 400:
|
||||
if display.GetNumberOfCells() > 250_000:
|
||||
raise AssertionError(f"display tessellation exceeded the large-model budget: {display.GetNumberOfCells()}")
|
||||
if len(boss_cells) < 60:
|
||||
raise AssertionError(f"cylindrical display tessellation is too coarse: {len(boss_cells)}")
|
||||
local_boss = model.build_face_polydata(face_ids=[394], deflection=0.035)
|
||||
if local_boss.GetNumberOfCells() < 400:
|
||||
raise AssertionError(
|
||||
"single-Face local display should still allow fine cylindrical tessellation: "
|
||||
f"{local_boss.GetNumberOfCells()}"
|
||||
)
|
||||
local_first_model = StepModel.load(MODEL_PATH)
|
||||
local_first_model.build_face_polydata(face_ids=[394], deflection=0.035)
|
||||
local_first_display = local_first_model.build_face_polydata(deflection=0.035)
|
||||
if local_first_display.GetNumberOfCells() > 250_000:
|
||||
raise AssertionError(
|
||||
"full display should remain budgeted after a local fine display was built first: "
|
||||
f"{local_first_display.GetNumberOfCells()}"
|
||||
)
|
||||
plane_cells = [
|
||||
index for index in range(display.GetNumberOfCells())
|
||||
if int(face_ids.GetTuple1(index)) == SOURCE_FACE_ID
|
||||
|
||||
Reference in New Issue
Block a user