Skip to main content

StyleView

Struct StyleView 

Source
pub struct StyleView<'m, 's> { /* private fields */ }
Expand description

Entry point for strict presentation and annotation projections.

Implementations§

Source§

impl<'m, 's> StyleView<'m, 's>

Source

pub fn resolve_item_style(&self, item: EntityId) -> StyleResult<ResolvedStyle>

Resolves the effective style for item by scanning every IfcStyledItem and IfcPresentationLayerAssignment in the model.

A unique direct IfcStyledItem binding wins over any layer style. Returns Err(StyleError::AmbiguousStyleAssignment) if more than one direct IfcStyledItem targets the same item.

Source§

impl<'m, 's> StyleView<'m, 's>

Source

pub fn new(model: &'m Model, schema: &'s Schema) -> Self

Bind a schema-resolved view over model using schema’s attribute layout and type hierarchy.

Source

pub fn annotation(&self, id: EntityId) -> StyleResult<Annotation<'m, 's>>

Project entity id as an IfcAnnotation.

Source

pub fn text_literal(&self, id: EntityId) -> StyleResult<TextLiteral<'m, 's>>

Project entity id as an IfcTextLiteral.

Source

pub fn text_literal_with_extent( &self, id: EntityId, ) -> StyleResult<TextLiteralWithExtent<'m, 's>>

Project entity id as an IfcTextLiteralWithExtent.

Source

pub fn annotation_fill_area( &self, id: EntityId, ) -> StyleResult<AnnotationFillArea<'m, 's>>

Project entity id as an IfcAnnotationFillArea.

Source

pub fn colour_rgb(&self, id: EntityId) -> StyleResult<ColourRgb<'m, 's>>

Project entity id as an IfcColourRgb.

Source

pub fn surface_style_shading( &self, id: EntityId, ) -> StyleResult<SurfaceStyleShading<'m, 's>>

Project entity id as an IfcSurfaceStyleShading.

Source

pub fn surface_style(&self, id: EntityId) -> StyleResult<SurfaceStyle<'m, 's>>

Project entity id as an IfcSurfaceStyle.

Source

pub fn styled_item(&self, id: EntityId) -> StyleResult<StyledItem<'m, 's>>

Project entity id as an IfcStyledItem.

Source

pub fn presentation_layer( &self, id: EntityId, ) -> StyleResult<PresentationLayer<'m, 's>>

Project entity id as an IfcPresentationLayerAssignment.

Source

pub fn surface_style_rendering( &self, id: EntityId, ) -> StyleResult<SurfaceStyleRendering<'m, 's>>

Project entity id as an IfcSurfaceStyleRendering.

Source

pub fn curve_style(&self, id: EntityId) -> StyleResult<CurveStyle<'m, 's>>

Project entity id as an IfcCurveStyle.

Source

pub fn fill_area_style( &self, id: EntityId, ) -> StyleResult<FillAreaStyle<'m, 's>>

Project entity id as an IfcFillAreaStyle.

Source

pub fn fill_area_style_hatching( &self, id: EntityId, ) -> StyleResult<FillAreaStyleHatching<'m, 's>>

Project entity id as an IfcFillAreaStyleHatching.

Source

pub fn fill_area_style_tiles( &self, id: EntityId, ) -> StyleResult<FillAreaStyleTiles<'m, 's>>

Project entity id as an IfcFillAreaStyleTiles.

Source

pub fn surface_texture( &self, id: EntityId, ) -> StyleResult<SurfaceTexture<'m, 's>>

Project entity id as an IfcSurfaceTexture.

Source

pub fn image_texture(&self, id: EntityId) -> StyleResult<ImageTexture<'m, 's>>

Project entity id as an IfcImageTexture.

Source

pub fn texture_coordinate( &self, id: EntityId, ) -> StyleResult<TextureCoordinate<'m, 's>>

Project entity id as an IfcTextureCoordinate.

Source

pub fn indexed_texture_map( &self, id: EntityId, ) -> StyleResult<IndexedTextureMap<'m, 's>>

Project entity id as an IfcIndexedTextureMap.

Source

pub fn text_style(&self, id: EntityId) -> StyleResult<TextStyle<'m, 's>>

Project entity id as an IfcTextStyle.

Source

pub fn text_style_font_model( &self, id: EntityId, ) -> StyleResult<TextStyleFontModel<'m, 's>>

Project entity id as an IfcTextStyleFontModel.

Source

pub fn presentation_style_assignment( &self, id: EntityId, ) -> StyleResult<PresentationStyleAssignment<'m, 's>>

Project entity id as an IFC2x3 IfcPresentationStyleAssignment.

Source

pub fn surface_style_lighting( &self, id: EntityId, ) -> StyleResult<SurfaceStyleLighting<'m, 's>>

Project entity id as an IfcSurfaceStyleLighting.

Source

pub fn surface_style_refraction( &self, id: EntityId, ) -> StyleResult<SurfaceStyleRefraction<'m, 's>>

Project entity id as an IfcSurfaceStyleRefraction.

Source

pub fn surface_style_with_textures( &self, id: EntityId, ) -> StyleResult<SurfaceStyleWithTextures<'m, 's>>

Project entity id as an IfcSurfaceStyleWithTextures.

Source

pub fn curve_style_font( &self, id: EntityId, ) -> StyleResult<CurveStyleFont<'m, 's>>

Project entity id as an IfcCurveStyleFont.

Source

pub fn curve_style_font_pattern( &self, id: EntityId, ) -> StyleResult<CurveStyleFontPattern<'m, 's>>

Project entity id as an IfcCurveStyleFontPattern.

Source

pub fn blob_texture(&self, id: EntityId) -> StyleResult<BlobTexture<'m, 's>>

Project entity id as an IfcBlobTexture.

Source

pub fn pixel_texture(&self, id: EntityId) -> StyleResult<PixelTexture<'m, 's>>

Project entity id as an IfcPixelTexture.

Source

pub fn texture_vertex(&self, id: EntityId) -> StyleResult<TextureVertex<'m, 's>>

Project entity id as an IfcTextureVertex.

Source

pub fn texture_vertex_list( &self, id: EntityId, ) -> StyleResult<TextureVertexList<'m, 's>>

Project entity id as an IfcTextureVertexList.

Source

pub fn light_source(&self, id: EntityId) -> StyleResult<LightSource<'m, 's>>

Project entity id as an IfcLightSource, whatever its subtype.

Use this when only the shared colour/intensity attributes are needed; call LightSource::kind to decide which concrete projection below to reach for.

Source

pub fn light_source_ambient( &self, id: EntityId, ) -> StyleResult<LightSourceAmbient<'m, 's>>

Project entity id as an IfcLightSourceAmbient.

Source

pub fn light_source_directional( &self, id: EntityId, ) -> StyleResult<LightSourceDirectional<'m, 's>>

Project entity id as an IfcLightSourceDirectional.

Source

pub fn light_source_goniometric( &self, id: EntityId, ) -> StyleResult<LightSourceGoniometric<'m, 's>>

Project entity id as an IfcLightSourceGoniometric.

Source

pub fn light_source_positional( &self, id: EntityId, ) -> StyleResult<LightSourcePositional<'m, 's>>

Project entity id as an IfcLightSourcePositional.

Accepts an IfcLightSourceSpot too, since a spot is a positional light; use Self::light_source_spot to reach the cone attributes.

Source

pub fn light_source_spot( &self, id: EntityId, ) -> StyleResult<LightSourceSpot<'m, 's>>

Project entity id as an IfcLightSourceSpot.

Source

pub fn light_intensity_distribution( &self, id: EntityId, ) -> StyleResult<LightIntensityDistribution<'m, 's>>

Project entity id as an IfcLightIntensityDistribution.

Source

pub fn light_distribution_data( &self, id: EntityId, ) -> StyleResult<LightDistributionData<'m, 's>>

Project entity id as an IfcLightDistributionData.

Source

pub fn planar_extent(&self, id: EntityId) -> StyleResult<PlanarExtent<'m, 's>>

Project entity id as an IfcPlanarExtent.

Accepts an IfcPlanarBox too, since a box is a planar extent; use Self::planar_box to reach its placement.

Source

pub fn planar_box(&self, id: EntityId) -> StyleResult<PlanarBox<'m, 's>>

Project entity id as an IfcPlanarBox.

Trait Implementations§

Source§

impl<'m, 's> Clone for StyleView<'m, 's>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'m, 's> Copy for StyleView<'m, 's>

Source§

impl<'m, 's> Debug for StyleView<'m, 's>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'m, 's> Freeze for StyleView<'m, 's>

§

impl<'m, 's> RefUnwindSafe for StyleView<'m, 's>

§

impl<'m, 's> Send for StyleView<'m, 's>

§

impl<'m, 's> Sync for StyleView<'m, 's>

§

impl<'m, 's> Unpin for StyleView<'m, 's>

§

impl<'m, 's> UnsafeUnpin for StyleView<'m, 's>

§

impl<'m, 's> UnwindSafe for StyleView<'m, 's>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.