WeldGeometry Class |
Class that represents weld seam specific geometry.
Inheritance Hierarchy
Namespace: Tekla.Structures.Model.Welding
Assembly: Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2023.0.3
Syntax
The WeldGeometry type exposes the following members.
Properties
Name | Description | |
---|---|---|
Polygons |
Gets the weld seam specific ArrayList of Polygon objects.
| |
Position |
Gets the weld seam position (above or below).
|
Examples
using System.Collections; using System.Text; using Tekla.Structures.Geometry3d; using Tekla.Structures.Model; using Tekla.Structures.Model.Welding; public class Example { private static Model _teklaModel; private Model TeklaModel { get { if (_teklaModel == null) { _teklaModel = new Model(); } return _teklaModel; } } public void Example1() { ModelObjectEnumerator weldEnumerator = TeklaModel.GetModelObjectSelector().GetAllObjectsWithType(ModelObject.ModelObjectEnum.WELD); Weld weld = null; while (weldEnumerator.MoveNext()) { weld = weldEnumerator.Current as Weld; if (weld != null) { break; } } if (weld != null) { ArrayList weldGeometries = weld.GetWeldGeometries(); StringBuilder sb = new StringBuilder(); foreach (WeldGeometry weldGeometry in weldGeometries) { if (weldGeometry != null) { int polygonIndex = 1; sb.AppendLine(weldGeometry.Position.ToString()); foreach (Polygon polygon in weldGeometry.Polygons) { if (polygon != null) { sb.AppendLine("Polygon: " + polygonIndex); if (polygon.Points != null) { foreach (Point point in polygon.Points) { if (point != null) { sb.AppendLine(point.ToString()); } } } } polygonIndex++; } } sb.AppendLine(); sb.AppendLine(); } // Print the string builder content to the desired place by calling sb.ToString(); } } }
See Also