forked from 1b-agent/opencadstudio-upstream
Map Viewport in the Python host model
Curated view fields are writable; the owner must be a paper-space block and frozen layers must exist. staged_python_viewport_lifecycle_over_real_ipc passes every gate except a paper-space canvas oracle, so the kind is recorded as integration-tested. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
1 parent
2e4d77dc09
commit
9075e53511
10 files changed
+219
-14
No files matched your search
@@ -94,7 +94,7 @@ The host-owned catalog classifies all 48 entity variants and tracks every
|
||||
traced field, including fields marked `unmapped`. Query it with
|
||||
`doc.coverage()` or `doc.coverage("Line")`; each row includes source field,
|
||||
type, access, and current validation status. Geometry edits remain limited to
|
||||
the 34 mapped kinds.
|
||||
the 35 mapped kinds.
|
||||
For any entity, `entity.snapshot` returns a detached dictionary of its raw
|
||||
CAD fields, including `snapshot["common"]` and kind-specific nested values.
|
||||
It can inspect an unmapped kind; editing the dictionary does
|
||||
|
||||
@@ -33,7 +33,8 @@
|
||||
"Helix",
|
||||
"RasterImage",
|
||||
"Wipeout",
|
||||
"Underlay"
|
||||
"Underlay",
|
||||
"Viewport"
|
||||
],
|
||||
"manual_kinds": ["Dimension"],
|
||||
"base_fields": ["handle", "layer", "owner_handle"],
|
||||
@@ -367,6 +368,41 @@
|
||||
"definition_handle": { "required": true },
|
||||
"insertion_point": { "required": true }
|
||||
}
|
||||
},
|
||||
"Viewport": {
|
||||
"fields": {
|
||||
"id": { "read_only": true },
|
||||
"snap_base": { "read_only": true },
|
||||
"snap_spacing": { "read_only": true },
|
||||
"grid_spacing": { "read_only": true },
|
||||
"snap_angle": { "read_only": true },
|
||||
"clip_boundary_handle": { "read_only": true },
|
||||
"style_sheet": { "read_only": true },
|
||||
"ucs_at_origin": { "read_only": true },
|
||||
"ucs_per_viewport": { "read_only": true },
|
||||
"ucs_origin": { "read_only": true },
|
||||
"ucs_x_axis": { "read_only": true },
|
||||
"ucs_y_axis": { "read_only": true },
|
||||
"ucs_handle": { "read_only": true },
|
||||
"base_ucs_handle": { "read_only": true },
|
||||
"ucs_ortho_type": { "read_only": true },
|
||||
"elevation": { "read_only": true },
|
||||
"shade_plot_mode": { "read_only": true },
|
||||
"grid_flags": { "read_only": true },
|
||||
"grid_major": { "read_only": true },
|
||||
"background_handle": { "read_only": true },
|
||||
"shade_plot_handle": { "read_only": true },
|
||||
"visual_style_handle": { "read_only": true },
|
||||
"sun_handle": { "read_only": true },
|
||||
"default_lighting": { "read_only": true },
|
||||
"default_lighting_type": { "read_only": true },
|
||||
"brightness": { "read_only": true },
|
||||
"contrast": { "read_only": true },
|
||||
"ambient_color": { "read_only": true },
|
||||
"center": { "required": true },
|
||||
"width": { "required": true },
|
||||
"height": { "required": true }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4756,7 +4756,7 @@ mod tests {
|
||||
);
|
||||
}
|
||||
}
|
||||
assert_eq!(emitted.len(), 34);
|
||||
assert_eq!(emitted.len(), 35);
|
||||
}
|
||||
|
||||
#[cfg(feature = "experimental-host-model")]
|
||||
|
||||
Reference in new issue
Block a user