Merge remote-tracking branch 'origin/main' into lk_dev

# Conflicts:
#	backend/engine/cdsl_engine/capabilities.py
This commit is contained in:
2026-09-07 18:34:45 +08:00
3 changed files with 61 additions and 15 deletions
@@ -18,6 +18,9 @@ from .operation_contracts import materialized_feature_contracts
_SELECTOR_REQUIRED = frozenset({"fillet", "chamfer"})
_SKETCH_ATOM_PREFIXES = ("extrude_", "revolve_")
# 开放轮廓(closed=false / role=open)只有"刀具截面补槽口边闭合后作切除"的
# 物理意义:仅 extrude 直切类原子支持;add/回转对开放轮廓会造出无意义的封块。
_OPEN_PROFILE_ATOMICS = frozenset({"extrude_cut_blind", "extrude_cut_through"})
_PRIMARY_ATOMICS = frozenset({
"extrude_add_blind", "extrude_add_two_sided", "extrude_cut_blind", "extrude_cut_two_sided",
"extrude_cut_through",
@@ -299,6 +302,17 @@ class CapabilityAnalyzer:
"The resolved sketch contains no closed profile region",
sketch_id=node.sketch_id,
))
elif (
not resolution_error
and sketches[node.sketch_id].get("_open_contour")
and node.atomic_id not in _OPEN_PROFILE_ATOMICS
):
blockers.append(self._blocker(
node.feature_id, "unsupported_open_profile",
"Open profiles are only supported for straight extruded cut features",
sketch_id=node.sketch_id,
atomic_id=node.atomic_id,
))
if node.atomic_id == "loft_add":
profile_ids = params.get("profile_sketch_ids")
if not isinstance(profile_ids, list) or len(profile_ids) < 2: