feat(cadfs): expand selector provenance coverage
This commit is contained in:
@@ -409,6 +409,28 @@ def _rotated_node(node: FeaturePlanNode, instance_id: str, axis: AxisSpec, angle
|
||||
for key in ("x_dir", "y_dir", "normal"):
|
||||
if path_plane.get(key):
|
||||
path_plane[key] = list(_rotated_vector(tuple(float(v) for v in path_plane[key]), axis, angle_rad))
|
||||
elif isinstance(path, dict) and isinstance(path.get("segments"), list):
|
||||
# A source-only spatial sweep path has no common workplane. Its
|
||||
# captured points and directions are absolute, so replayed circular
|
||||
# pattern instances must rotate each geometric field independently.
|
||||
for segment in path["segments"]:
|
||||
if not isinstance(segment, dict):
|
||||
continue
|
||||
for key in ("start_mm", "end_mm", "center_mm"):
|
||||
value = segment.get(key)
|
||||
if isinstance(value, list) and len(value) == 3:
|
||||
segment[key] = _rotated_point(value, axis, angle_rad)
|
||||
points = segment.get("points_mm")
|
||||
if isinstance(points, list):
|
||||
segment["points_mm"] = [
|
||||
_rotated_point(point, axis, angle_rad)
|
||||
for point in points
|
||||
if isinstance(point, list) and len(point) == 3
|
||||
]
|
||||
for key in ("normal", "start_tangent_mm", "end_tangent_mm"):
|
||||
value = segment.get(key)
|
||||
if isinstance(value, list) and len(value) == 3:
|
||||
segment[key] = list(_rotated_vector(tuple(float(v) for v in value), axis, angle_rad))
|
||||
host = params.get("host_face")
|
||||
host_frame = host.get("frame") if isinstance(host, dict) else None
|
||||
positions_are_local = isinstance(host_frame, dict) and all(
|
||||
|
||||
Reference in New Issue
Block a user