feat: 推进SCDM-first后端接入和大模型编辑优化
This commit is contained in:
@@ -33,6 +33,18 @@ INFO_GROUPS: list[tuple[str, list[str]]] = [
|
||||
"feature_source_face_id",
|
||||
],
|
||||
),
|
||||
(
|
||||
"SCDM",
|
||||
[
|
||||
"scdm_backend_status",
|
||||
"scdm_runtime_status",
|
||||
"scdm_selection_status",
|
||||
"scdm_selection_enabled_capabilities",
|
||||
"scdm_selection_blocked_capabilities",
|
||||
"scdm_selection_capability_count",
|
||||
"scdm_selection_blocked_count",
|
||||
],
|
||||
),
|
||||
(
|
||||
"拓扑",
|
||||
[
|
||||
@@ -529,6 +541,13 @@ INFO_LABELS = {
|
||||
"associated_feature_count": "关联特征数",
|
||||
"associated_feature_face_ids": "关联特征 Face",
|
||||
"feature_context_note": "关联探测",
|
||||
"scdm_backend_status": "SCDM 后端",
|
||||
"scdm_runtime_status": "SCDM 运行状态",
|
||||
"scdm_selection_status": "SCDM 当前选择",
|
||||
"scdm_selection_enabled_capabilities": "SCDM 可执行能力",
|
||||
"scdm_selection_blocked_capabilities": "SCDM 未开放能力",
|
||||
"scdm_selection_capability_count": "SCDM 能力数量",
|
||||
"scdm_selection_blocked_count": "SCDM 未开放数量",
|
||||
"recognition_summary": "识别摘要",
|
||||
"recognition_candidate": "识别候选",
|
||||
"recognition_confidence": "识别置信度",
|
||||
@@ -1178,6 +1197,39 @@ def _smooth_surface_polydata(polydata):
|
||||
return smoothed
|
||||
|
||||
|
||||
def _large_model_display_deflection(
|
||||
requested: float,
|
||||
*,
|
||||
face_count: int = 0,
|
||||
edge_count: int = 0,
|
||||
) -> float:
|
||||
"""Use a coarser display mesh for large STEP interaction only."""
|
||||
value = max(float(requested), 1e-9)
|
||||
if int(face_count or 0) > 1000 or int(edge_count or 0) > 2500:
|
||||
return max(value, 1.2)
|
||||
if int(face_count or 0) > 600 or int(edge_count or 0) > 1600:
|
||||
return max(value, 0.6)
|
||||
return value
|
||||
|
||||
|
||||
def _large_model_display_deflection_for_model(model: object, requested: float) -> float:
|
||||
faces = getattr(model, "faces", ()) or ()
|
||||
edges = getattr(model, "edges", ()) or ()
|
||||
return _large_model_display_deflection(
|
||||
requested,
|
||||
face_count=len(faces),
|
||||
edge_count=len(edges),
|
||||
)
|
||||
|
||||
|
||||
def _large_model_display_deflection_for_stats(stats: object, requested: float) -> float:
|
||||
return _large_model_display_deflection(
|
||||
requested,
|
||||
face_count=int(getattr(stats, "faces", 0) or 0),
|
||||
edge_count=int(getattr(stats, "edges", 0) or 0),
|
||||
)
|
||||
|
||||
|
||||
def _format_percent(value: object) -> str:
|
||||
if value is None or value == "":
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user