pub enum ModelCommand {
Show 13 variants
CreateElement {
element: Box<ElementRecord>,
},
DeleteElement {
global_id: GlobalId,
},
SetName {
global_id: GlobalId,
name: Option<String>,
},
SetProperty {
global_id: GlobalId,
set: String,
name: String,
value: Option<PropertyValue>,
},
MoveElement {
global_id: GlobalId,
delta: DVec3,
},
SetPlacement {
global_id: GlobalId,
placement: Placement,
},
AssignContainer {
global_id: GlobalId,
container: Option<GlobalId>,
},
SetRepresentation {
global_id: GlobalId,
representation: Option<Box<Representation>>,
},
AssignType {
global_id: GlobalId,
type_ref: Option<GlobalId>,
},
AddVoid {
host: GlobalId,
opening: GlobalId,
},
RemoveVoid {
host: GlobalId,
opening: GlobalId,
},
AddFill {
opening: GlobalId,
filler: GlobalId,
},
RemoveFill {
opening: GlobalId,
filler: GlobalId,
},
}Expand description
A single durable edit.
Variants§
CreateElement
Insert an element. Boxed because this variant is far larger than the others and would otherwise inflate every command in the log.
Fields
element: Box<ElementRecord>DeleteElement
SetName
SetProperty
Fields
value: Option<PropertyValue>None clears the property.
MoveElement
Translate an element. Kept distinct from SetPlacement because its inverse is exact
without reading the current state.
SetPlacement
AssignContainer
IfcRelContainedInSpatialStructure.
SetRepresentation
Attach evaluated geometry. None clears it.
A command rather than a cache write, unlike bounds: the representation is what gets exported to IFC, so it is part of the model and belongs in the audit trail.
AssignType
IfcRelDefinesByType — bind an instance to a family type.
AddVoid
IfcRelVoidsElement — an opening cuts its host.
RemoveVoid
AddFill
IfcRelFillsElement — a door or window fills an opening.
RemoveFill
Implementations§
Source§impl ModelCommand
impl ModelCommand
Sourcepub fn primary_target(&self) -> &GlobalId
pub fn primary_target(&self) -> &GlobalId
The element this command is about, for permission checks and change reporting.
Sourcepub fn invalidates_geometry(&self) -> bool
pub fn invalidates_geometry(&self) -> bool
Whether applying this command requires geometry to be rebuilt.
A rename must not invalidate a mesh — that distinction is the whole point of tracking
semantic_revision separately from representation_revision.
Trait Implementations§
Source§impl Clone for ModelCommand
impl Clone for ModelCommand
Source§fn clone(&self) -> ModelCommand
fn clone(&self) -> ModelCommand
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ModelCommand
impl Debug for ModelCommand
Source§impl<'de> Deserialize<'de> for ModelCommand
impl<'de> Deserialize<'de> for ModelCommand
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ModelCommand
impl PartialEq for ModelCommand
Source§fn eq(&self, other: &ModelCommand) -> bool
fn eq(&self, other: &ModelCommand) -> bool
self and other values to be equal, and is used by ==.