pub enum AttributeValue {
EntityRef(u32),
String(String),
Integer(i64),
Float(f64),
Enum(String),
List(Vec<AttributeValue>),
Null,
Derived,
}Expand description
IFC entity attribute value
Variants§
EntityRef(u32)
Entity reference
String(String)
String value
Integer(i64)
Integer value
Float(f64)
Float value
Enum(String)
Enum value
List(Vec<AttributeValue>)
List of values
Null
Null/undefined
Derived
Derived value (*)
Implementations§
Source§impl AttributeValue
impl AttributeValue
Sourcepub fn from_token(token: &Token<'_>) -> Self
pub fn from_token(token: &Token<'_>) -> Self
Convert from Token
Sourcepub fn as_entity_ref(&self) -> Option<u32>
pub fn as_entity_ref(&self) -> Option<u32>
Get as entity reference
Sourcepub fn as_float(&self) -> Option<f64>
pub fn as_float(&self) -> Option<f64>
Get as float Also handles TypedValue wrappers like IFCNORMALISEDRATIOMEASURE(0.5) which are stored as List([String(“typename”), Float(value)])
Sourcepub fn as_list(&self) -> Option<&[AttributeValue]>
pub fn as_list(&self) -> Option<&[AttributeValue]>
Get as list
Sourcepub fn parse_coordinate_list_3d(coord_list: &[AttributeValue]) -> Vec<f32>
pub fn parse_coordinate_list_3d(coord_list: &[AttributeValue]) -> Vec<f32>
Batch parse 3D coordinates from a list of coordinate triples Returns flattened f32 array: [x0, y0, z0, x1, y1, z1, …] Optimized for large coordinate lists
Sourcepub fn parse_coordinate_list_2d(coord_list: &[AttributeValue]) -> Vec<f32>
pub fn parse_coordinate_list_2d(coord_list: &[AttributeValue]) -> Vec<f32>
Batch parse 2D coordinates from a list of coordinate pairs Returns flattened f32 array: [x0, y0, x1, y1, …]
Sourcepub fn parse_index_list(face_list: &[AttributeValue]) -> Vec<u32>
pub fn parse_index_list(face_list: &[AttributeValue]) -> Vec<u32>
Batch parse triangle indices from a list of index triples Converts from 1-based IFC indices to 0-based indices Returns flattened u32 array: [i0, i1, i2, …]
Sourcepub fn parse_coordinate_list_3d_f64(
coord_list: &[AttributeValue],
) -> Vec<(f64, f64, f64)>
pub fn parse_coordinate_list_3d_f64( coord_list: &[AttributeValue], ) -> Vec<(f64, f64, f64)>
Batch parse coordinate list with f64 precision Returns Vec of (x, y, z) tuples
Trait Implementations§
Source§impl Clone for AttributeValue
impl Clone for AttributeValue
Source§fn clone(&self) -> AttributeValue
fn clone(&self) -> AttributeValue
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more