Namespace GeometryHelper.TeklaConvert
Classes
- AabbConvert
Provides extension methods to convert bounding boxes (AABB) between Tekla Structures and GeometryHelper.
- CoordinateSystemConvert
Provides extension methods to convert coordinate systems between Tekla Structures and GeometryHelper.
- FaceConvert
Provides extension methods to convert faces from Tekla Structures Solids to GeometryHelper.
- GeometricPlaneConvert
Provides extension methods to convert geometric planes between Tekla Structures and GeometryHelper.
- GeometryDraw
Draws geometry into the Tekla model view as control polycurves, to see where a result lies.
A control polycurve is a temporary line of the model view rather than a part, and like everything the Tekla API is given it is placed in the current work plane. Geometry read in that same plane —
Part.GetSolid(), or theToGeoSolidsof ReferenceModelObjectConvert and ReferenceModelConvert — is therefore drawn where it came from. A face is drawn with its outer boundary in red and its holes in white unless other colours are given, so that a hole stands out from the edge it is cut in.The view shows what was drawn after
Model.CommitChanges(). These methods leave that to the caller, so that drawing a thousand faces costs one commit rather than a thousand. Each returns the polycurves it inserted, whichDelete()removes again. A polyline with fewer than two distinct points, or one Tekla will not insert, is skipped rather than thrown on; a polyline Tekla refuses is written to GeometryHelperLog.
- LineSegmentConvert
Provides extension methods to convert line segments between Tekla Structures and GeometryHelper.
- MatrixConvert
Provides extension methods to convert transformation matrices between Tekla Structures and GeometryHelper.
- PointConvert
Converts geometry between Tekla Structures and GeometryHelper.
The two libraries describe the same shapes and disagree only about names and about how much they insist on. Tekla hands back what its modeller happens to hold; GeometryHelper asks for flatness, for a closed boundary, and for normals that point out of the body. The conversions here do that checking rather than trusting it, because a body that only looks right measures wrong later and says nothing about why.
Tekla models in millimetres with coordinates that can run to hundreds of thousands, and a face of a twelve metre member is rarely flat to the last decimal. The default tolerance is often too tight for that, so every conversion that needs one takes it, and the overloads without one read Global as everywhere else.
- PolyLineConvert
Provides extension methods to convert polylines between Tekla Structures and GeometryHelper.
- PolygonConvert
Provides extension methods to convert Tekla model polygons to GeometryHelper geometry.
- RebarGeometryConvert
Provides extension methods to convert the geometry Tekla works out for a reinforcing bar.
- RectangleBoundingBoxConvert
Provides extension methods to convert bounding boxes between Tekla Drawing API and GeometryHelper.
- ReferenceModelConvert
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.
- ReferenceModelObjectConvert
Reads the objects of Tekla IFC reference models into GeoSolid3 bodies, in the current work plane.
A reference object carries the GlobalId of its IFC product in the
EXTERNAL.GUIDreport property, and that GlobalId is what GeometryHelper.IfcConvert looks products up by. Objects are grouped by the reference model they belong to rather than by file: one IFC file inserted twice is placed twice, while it is parsed once. Placement, scale and the default options are those of ReferenceModelConvert.An object with no GlobalId, one its file does not hold, one that cannot be converted, and every object of a reference model that is not IFC or cannot be read, are left out rather than thrown on, and written to GeometryHelperLog. An object given twice is returned once, and the rest keep the order they were given in.
- ReinforcementConvert
Provides extension methods to convert reinforcement between Tekla Structures and GeometryHelper.
- SolidConvert
Reads the surface of a Tekla solid into a GeoSolid3.
The two descriptions line up almost exactly. Tekla walks a solid as faces, and each face as loops: the first loop is its outer edge and any further loop is a hole. That is what a GeoFace3 is, so the shape of the conversion is a walk rather than a rebuild. They part only over flatness: a face Tekla gives out of flat comes as triangles on its own corners.
What has to be checked rather than trusted is orientation. GeometryHelper reads volume and containment from the assumption that face normals point out of the body, and a body whose normals point the other way measures the same volume but reports every point as being on the wrong side of it. Each face is therefore turned to agree with the normal Tekla gives it, and the finished body is turned inside out if its signed volume says the whole surface came in reversed.
- VectorConvert
Converts geometry between Tekla Structures and GeometryHelper.
The two libraries describe the same shapes and disagree only about names and about how much they insist on. Tekla hands back what its modeller happens to hold; GeometryHelper asks for flatness, for a closed boundary, and for normals that point out of the body. The conversions here do that checking rather than trusting it, because a body that only looks right measures wrong later and says nothing about why.
Tekla models in millimetres with coordinates that can run to hundreds of thousands, and a face of a twelve metre member is rarely flat to the last decimal. The default tolerance is often too tight for that, so every conversion that needs one takes it, and the overloads without one read Global as everywhere else.