Table of Contents

Method ToIfcGeometries

Namespace
GeometryHelper.TeklaConvert
Assembly
GeometryHelper.TeklaConvert.dll

ToIfcGeometries(ReferenceModel, IfcConvertOptions)

Converts every physical product of the IFC file of a reference model into its whole geometry, in the current work plane: bodies and open surfaces, with the GlobalId, name, type and conversion warnings of each product.

public static IReadOnlyList<IfcProductGeometry> ToIfcGeometries(this ReferenceModel referenceModel, IfcConvertOptions options = null)

Parameters

referenceModel ReferenceModel

The reference model.

options IfcConvertOptions

The conversion settings; see CreateIfcConvertOptions(ReferenceModel, IfcConvertOptions).

Returns

IReadOnlyList<IfcProductGeometry>

One entry per physical product; empty when the file cannot be read or is not IFC.

Exceptions

ArgumentNullException

Thrown when referenceModel is null.

ToIfcGeometries(IEnumerable<ReferenceModel>, IfcConvertOptions)

Converts every physical product of the IFC files of several reference models into its whole geometry, in the current work plane: bodies and open surfaces, with the GlobalId, name, type and conversion warnings of each product.

public static IReadOnlyList<IfcProductGeometry> ToIfcGeometries(this IEnumerable<ReferenceModel> referenceModels, IfcConvertOptions options = null)

Parameters

referenceModels IEnumerable<ReferenceModel>

The reference models. Null entries and repeats are skipped.

options IfcConvertOptions

The conversion settings; see CreateIfcConvertOptions(ReferenceModel, IfcConvertOptions).

Returns

IReadOnlyList<IfcProductGeometry>

One entry per physical product that could be read, reference model by reference model in the order given. A reference model that is not IFC, or whose file cannot be read or fails part-way, adds none.

Remarks

IncludeAggregatedParts is always off here: the whole file is walked, parts included, so an assembly returning its parts as well would count each of them twice. The same IFC file inserted twice is parsed once and placed twice, so its products come back twice with the same GlobalId. ReferenceModel.GetReferenceModelObjectByExternalGuid with the GlobalId leads to the Tekla object.

Exceptions

ArgumentNullException

Thrown when referenceModels is null.