pub struct PmiAnnotation {
pub kind: String,
pub enabled: bool,
pub params: Value,
pub persistent_data: Value,
pub plugin_replay: Option<PluginAnnotationReplay>,
pub label_world: Option<[f64; 3]>,
}Expand description
One annotation: schema-driven params keyed by its type.
Fields§
§kind: String§enabled: bool§params: Value§persistent_data: Value§plugin_replay: Option<PluginAnnotationReplay>Last accepted callback transition. Replays use its prior input, never saved geometry.
label_world: Option<[f64; 3]>The draggable label’s world anchor. Absent until the user moves it — the report then carries a default derived from the geometry.
Implementations§
Source§impl PmiAnnotation
impl PmiAnnotation
Sourcepub fn hide_step(id: &str, targets: &[String], baseline: bool) -> Self
pub fn hide_step(id: &str, targets: &[String], baseline: bool) -> Self
A hide step id naming targets; baseline marks the view’s
captured baseline (HIDE_BASELINE_PARAM).
Sourcepub fn is_baseline_hide(&self) -> bool
pub fn is_baseline_hide(&self) -> bool
Whether this is a view’s baseline hide step.
Source§impl PmiAnnotation
impl PmiAnnotation
Sourcepub fn text(&self, key: &str) -> &str
pub fn text(&self, key: &str) -> &str
A string param, trimmed ("" when absent or not a string).
Sourcepub fn number(&self, key: &str, env: &Env, default: f64) -> Result<f64, String>
pub fn number(&self, key: &str, env: &Env, default: f64) -> Result<f64, String>
A numeric param: a JSON number, or a string evaluated as an expression
against the document’s variable sheet. default when absent / empty.
Sourcepub fn plane_ref(&self) -> Option<&str>
pub fn plane_ref(&self) -> Option<&str>
The plane reference (a planar face / reference plane name), when
the annotation is laid out in a picked plane rather than the view.
Sourcepub fn references(&self, key: &str) -> Vec<String>
pub fn references(&self, key: &str) -> Vec<String>
A reference param as a name list: a string, or an array of strings (empty strings dropped).