ProfileItemGetCrossSection Method

Returns list of cross section points of inner surfaces from the profile item.

Namespace:  Tekla.Structures.Catalogs
Assembly:  Tekla.Structures.Catalogs (in Tekla.Structures.Catalogs.dll) Version: 2024.0.0+a110b435391768740483e3032720a566518c9a63
Syntax
public CrossSection GetCrossSection(
	double RelativeLocation = 0
)

Parameters

RelativeLocation (Optional)
Type: SystemDouble
The relative location of the cross section, values between 0 (start of profile) and 1 (end of profile).

Return Value

Type: CrossSection
List of inner cross section point lists on success, null on failure.
Examples
using System;
using Tekla.Structures.Catalogs;
using Tekla.Structures.Geometry3d;

public class Example
{
    public void Example1()
    {
        LibraryProfileItem item = new LibraryProfileItem();

        if (item.Select("HEA100"))
        {
            var section = item.GetCrossSection();
            if(section != null)
            {
                var outerSurface = section.OuterSurface;
                if(outerSurface != null)
                {
                    foreach (CrossSectionPoint point in outerSurface)
                    {
                        Console.WriteLine("Point " + string.Format("({0:0.000}, {1:0.000}, {2:0.000})", point.X, point.Y, point.Z));
                        Console.WriteLine("Chamfer type " + point.Chamfer.Type.ToString());
                        Console.WriteLine("Chamfer " + string.Format("({0:0.000}, {1:0.000}, {2:0.000}, {3:0.000})", point.Chamfer.X, point.Chamfer.Y, point.Chamfer.DZ1, point.Chamfer.DZ2));
                    }

                    var  outerSurfacePoints = section.OuterSurfacePoints;
                    if (outerSurfacePoints != null)
                    {
                        foreach (Point p in outerSurfacePoints)
                        {
                            Console.WriteLine("Point " + string.Format("({0:0.000}, {1:0.000}, {2:0.000})", p.X, p.Y, p.Z));
                        }
                    }
                }

                Console.WriteLine("HEA100 cross section points selected successfully");
            }
        }
    }
}
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