Class ReferenceModelConvert
- Namespace
- GeometryHelper.TeklaConvert
- Assembly
- GeometryHelper.TeklaConvert.dll
Reads the IFC file behind a Tekla reference model into GeoSolid3 bodies, or into the whole IfcProductGeometry of each product, placed where Tekla shows the reference model.
Tekla draws an IFC reference model by taking the coordinates of the file, scaling them by the reference
model's Tekla.Structures.Model.ReferenceModel.Scale and carrying them to where the model was inserted. The same steps
are taken here: GeometryHelper.IfcConvert reads the file in millimetres at that scale, and the frame the
reference model reports through GetCoordinateSystem() places the result.
Bodies come back in the current work plane, like every other coordinate the Tekla API hands out
(Part.GetSolid() included), so they line up with what the caller already works with. Reading the
frames needs the work plane switched to global for a moment; it is restored before any IFC file is read.
A reference model that is not IFC (DWG, SKP, ...), a file that cannot be read and a product that cannot be converted are left out rather than thrown on, because one bad file should not cost the others; what was left out, and why, is written to GeometryHelperLog. Each IFC file is parsed once and then served from IfcStoreCache for the life of the process.
public static class ReferenceModelConvert
- Inheritance
-
ReferenceModelConvert
- Inherited Members
Methods
- CreateIfcConvertOptions(ReferenceModel, IfcConvertOptions)
Creates the options for reading the IFC file of a reference model: millimetres, the reference model's scale and global IFC coordinates, with every other setting taken from
options.
- GetIfcFilePath(ReferenceModel)
Gets the full path of the IFC file a reference model currently shows, that is its active revision.
- GetIfcToGlobal(ReferenceModel)
Gets the transformation that carries the IFC geometry of a reference model into Tekla global coordinates.
- GetIfcToWorkPlane(ReferenceModel)
Gets the transformation that carries the IFC geometry of a reference model into the current work plane.
- ToGeoSolids(IEnumerable<ReferenceModel>, IfcConvertOptions)
Converts every physical product of the IFC files of several reference models, in the current work plane.
- ToGeoSolids(ReferenceModel, IfcConvertOptions)
Converts every physical product of the IFC file of a reference model, in the current work plane.
- 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.
- 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.