WeldGeometry Class

Class that represents weld seam specific geometry.
Inheritance Hierarchy
SystemObject
  Tekla.Structures.Model.WeldingWeldGeometry

Namespace:  Tekla.Structures.Model.Welding
Assembly:  Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2024.0.0+a110b435391768740483e3032720a566518c9a63
Syntax
[SerializableAttribute]
public sealed class WeldGeometry

The WeldGeometry type exposes the following members.

Properties
  NameDescription
Public propertyPolygons
Gets the weld seam specific ArrayList of Polygon objects.
Public propertyPosition
Gets the weld seam position (above or below).
Top
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
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.
Previous
Next