Tekla Open API

Detailed and full API reference helps you master Tekla Open API

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

Solid Class

The Solid class represents the physical object in the model created by a part instance. A solid instance can be used to query the actual geometry of the part and intersect that geometry with, for example, lines and planes.
Inheritance Hierarchy
SystemObject
  Tekla.Structures.ModelSolid

Namespace:  Tekla.Structures.Model
Assembly:  Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2018.1.0.0 (2018.1.0.0)
Syntax
[SerializableAttribute]
public sealed class Solid : ISolid

The Solid type exposes the following members.

Properties
  Name Description
Public property MaximumPoint
Gets the maximum axis-aligned point of the solid in the current plane.
Public property MinimumPoint
Gets the minimum axis-aligned point of the solid in the current plane.
Top
Methods
  Name Description
Public method GetAllIntersectionPoints
Used to get all the intersection points between the solid and a plane. Does not arrange the points into polygons, thus a lot faster.
Public methodCode example GetCutPart
Returns a shell enumerator for the solid th at results cutting this solid with the given solid.
Public method GetEdgeEnumerator
Returns a new edge enumerator in the current plane.
Public method GetFaceEnumerator
Returns a new face enumerator in the current plane.
Public method Intersect(LineSegment)
Returns a list of line - solid intersection points.
Public method Intersect(Point, Point)
Returns a list of line - solid intersection points.
Public method Intersect(Point, Point, Point) Obsolete.
Returns a list of plane - solid intersection points. The first item of the list contains a list of the outmost intersection polygon and the rest of the items (if there are any) inner polygons.
Public methodCode example IntersectAllFaces
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).
Top
Examples
using Tekla.Structures.Model;
using Tekla.Structures.Solid;
using Tekla.Structures.Geometry3d;
using System.Collections;

public class Example
{
    public void Example1()
    {
        Beam MyPart = new Beam();
        ArrayList MyList = new ArrayList();
        ArrayList MyFaceNormalList = new ArrayList();

        Solid Solid = MyPart.GetSolid();
        FaceEnumerator MyFaceEnum = Solid.GetFaceEnumerator();
        while (MyFaceEnum.MoveNext())
        {
            Face MyFace = MyFaceEnum.Current as Face;
            if (MyFace != null)
            {
                MyFaceNormalList.Add(MyFace.Normal);

                LoopEnumerator MyLoopEnum = MyFace.GetLoopEnumerator();
                while (MyLoopEnum.MoveNext())
                {
                    Loop MyLoop = MyLoopEnum.Current as Loop;
                    if (MyLoop != null)
                    {
                        VertexEnumerator MyVertexEnum = MyLoop.GetVertexEnumerator() as VertexEnumerator;
                        while (MyVertexEnum.MoveNext())
                        {
                            Point MyVertex = MyVertexEnum.Current as Point;
                            if (MyVertex != null)
                            {
                                MyList.Add(MyVertex);
                            }
                        }
                    }
                }
            }
        }
    }
}
See Also