Table of Contents

Class IfcSceneReader

Namespace
IfcIO.Scene
Assembly
IfcIO.Scene.dll

Converts an IFC file, or an IfcIO.IfcModel read by IfcIO, into a IOScene.SceneDocument.

public static class IfcSceneReader

Inheritance

Inherited Members

Remarks

The scene has one IOScene.SceneModel: Key is IfcIO.Scene.IfcSceneOptions.ModelKey, else the file name without directory; SourceFormat is ifc. Geometry is IfcIO's world mesh of each element (IfcIO.Model.IfcElement.GetEffectiveMesh), scaled from IfcIO.IfcModel.LengthUnit to metres by an exact factor; IFC is Z up like the scene, so axes are not swapped. Each mesh becomes one geometry placed once, without a transform.

Each storey becomes a level (elevation in metres) and a tree node of kind IOScene.SceneNodeKind.Level. Each element of the storey (and each space with IfcIO.Scene.IfcSceneOptions.IncludeSpaces) becomes a child of that node, except the type objects (for example IFCWALLTYPE, IFCDOORSTYLE) and lining and panel properties that IfcIO also lists as elements. IOScene.SceneElement.Id is IfcIO.Model.IfcElement.Id, which for a model opened from a file is the STEP entity id (#123 gives 123); IOScene.SceneElement.SourceId and IOScene.SceneElement.IfcGuid are the GlobalId; IOScene.SceneElement.Category is the IFC class as IfcIO reports it (upper case, for example IFCWALL). IfcIO places an element in a storey only through IfcRelContainedInSpatialStructure, so elements contained in the site or building, and spaces aggregated to a storey, are in the first storey.

Property sets and quantity sets become property sets keyed ifc:<SetName>, their properties ifc:<SetName>.<Name>; a set that IfcIO shares between elements is one set in the scene. Occurrence sets come first in IOScene.SceneElement.PropertySetIds, property sets before quantity sets; type property sets are not read. A number is written only when it is dimensionless, since a null IOScene.SceneValue.Unit means dimensionless and the adapter converts no value to SI. Property values are text as IfcIO reads them, because IfcIO does not report the measure of a value read from a file. A count quantity is a number with a null unit; length, area, volume and weight quantities are in the file's units, so they are text with the number as IfcIO reads it. Colour and transparency come from IfcIO.Model.IfcElement.Material; elements without one get a colour for their IFC class. Work schedules become schedules. Openings are not converted.

Methods

Read(string, IfcSceneOptions?)

Reads the IFC file at path (.ifc or .ifczip) with IfcIO.IfcModel.Open(System.String) and converts it.

public static IfcSceneResult Read(string path, IfcSceneOptions? options = null)

Parameters

path string

The IFC file.

options IfcSceneOptions?

Conversion options; null uses the defaults.

Returns

IfcSceneResult

The scene with a report of the conversion.

Exceptions

ArgumentException

IfcIO.Scene.IfcSceneOptions.ModelKey is empty, or two converted elements have the same IfcIO.Model.IfcElement.Id.

Read(IfcModel, IfcSceneOptions)

Converts model, which has no file name, so IfcIO.Scene.IfcSceneOptions.ModelKey is required.

public static IfcSceneResult Read(IfcModel model, IfcSceneOptions options)

Parameters

model IfcModel

The model, for example from IfcIO.IfcModel.Open(System.IO.Stream,System.String).

options IfcSceneOptions

Conversion options with IfcIO.Scene.IfcSceneOptions.ModelKey.

Returns

IfcSceneResult

The scene with a report of the conversion.

Exceptions

ArgumentException

IfcIO.Scene.IfcSceneOptions.ModelKey is empty, or two converted elements have the same IfcIO.Model.IfcElement.Id.