API Reference

Detailed and full API reference helps you master Tekla development

This is the most recent version of Tekla Open API.
For older versions, please visit Tekla Warehouse.

SolidIntersectAllFaces Method

Returns an enumerator for an array list of lists of plane - solid intersection points from all intersecting faces. The first item of one list contains points of the outmost intersection polygon and then the inner polygons (if there are any).

Namespace:  Tekla.Structures.Model
Assembly:  Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2023.0.1
Syntax
public IEnumerator IntersectAllFaces(
	Point point1,
	Point point2,
	Point point3
)

Parameters

point1
Type: Tekla.Structures.Geometry3dPoint
The first plane point.
point2
Type: Tekla.Structures.Geometry3dPoint
The second plane point.
point3
Type: Tekla.Structures.Geometry3dPoint
The third plane point.

Return Value

Type: IEnumerator
An enumerator for an array list of intersection point lists.
Examples
using Tekla.Structures.Model;
using Tekla.Structures.Solid;
using Tekla.Structures.Geometry3d;
using System.Collections;

public class Example
{
    public void Example1()
    {
        Beam Beam = new Beam(new Point(0, 0, 0), new Point(500, 0, 0));
        Beam.Profile.ProfileString = "HEA400";
        Beam.Name = "SolidPlane";
        Beam.Finish = "Normal";
        Beam.Class = "6";
        Beam.Insert();

        Solid Solid = Beam.GetSolid();

        IEnumerator FaceEnum = Solid.IntersectAllFaces(new Point(0, -50, 0), new Point(1000, -50, 0), new Point(0, -50, 1000));
        int FaceIndex = 0;
        while (FaceEnum.MoveNext())
        {
            ArrayList Points = FaceEnum.Current as ArrayList;
            IEnumerator LoopsEnum = Points.GetEnumerator();

            int LoopIndex = 0;
            while (LoopsEnum.MoveNext())
            {
                ArrayList LoopPoints = LoopsEnum.Current as ArrayList;
                if (LoopPoints != null)
                {
                    IEnumerator LoopPointsEnum = LoopPoints.GetEnumerator();
                    while (LoopPointsEnum.MoveNext())
                    {
                        Point SolidPoint = LoopPointsEnum.Current as Point;
                        if(SolidPoint != null)
                        {
                            System.Diagnostics.Debug.WriteLine("Face " + FaceIndex.ToString() + " Loop " + LoopIndex.ToString() + " Point " + SolidPoint.ToString());
                        }
                    }
                }
                LoopIndex++;
            }
            FaceIndex++;
        }
    }
}
See Also
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.