GeometricPlane Class

The GeometricPlane class represents a 3d geometric plane.
Inheritance Hierarchy
SystemObject
  Tekla.Structures.Geometry3dGeometricPlane

Namespace:  Tekla.Structures.Geometry3d
Assembly:  Tekla.Structures (in Tekla.Structures.dll) Version: 2025.0.0-alpha00045580+dc02c3918546f1e94eb2d3b13ea99057fb3313e0
Syntax
[SerializableAttribute]
public class GeometricPlane

The GeometricPlane type exposes the following members.

Constructors
  NameDescription
Public methodGeometricPlane
Instantiates an XY-plane with the origin at (0,0,0).
Public methodGeometricPlane(CoordinateSystem)
Instantiates a plane defined by the given coordinate system.
Public methodGeometricPlane(Point, Vector)
Instantiates a plane defined by the given origin point and normal vector.
Public methodGeometricPlane(Point, Vector, Vector)
Instantiates a plane defined by the given origin, X-axis vector and Y-axis vector.
Top
Properties
  NameDescription
Public propertyNormal
The normal vector of the plane.
Public propertyOrigin
The origin point of the plane.
Top
Methods
  NameDescription
Public methodGetNormal
Returns a normalized normal vector of the plane.
Top
Examples
using System.Collections;
using Tekla.Structures.Geometry3d;
using Tekla.Structures.Model;
using Tekla.Structures.Model.UI;

namespace CreatePlateWithGeometricPlane
{
    internal class Program
    {
        static void Main()
        {
            ArrayList facePoints = new ArrayList();
            ModelObject modelObject = null;
            Picker picker = new Picker();
            PickInput pickedInput = picker.PickFace("Pick a face to create a plate with geometric plane");
            IEnumerator myEnum = pickedInput.GetEnumerator();

            while (myEnum.MoveNext())
            {
                InputItem item = myEnum.Current as InputItem;
                if (item.GetInputType() == InputItem.InputTypeEnum.INPUT_1_OBJECT)
                {
                    modelObject = item.GetData() as ModelObject;
                }
                if (item.GetInputType() == InputItem.InputTypeEnum.INPUT_POLYGON)
                {
                    facePoints = item.GetData() as ArrayList;
                }
            }

            if(facePoints.Count < 3) return;

            GeometricPlane plane = new GeometricPlane((Point)facePoints[1],
                new Vector((Point)facePoints[0] - (Point)facePoints[1]), 
                new Vector((Point)facePoints[2] - (Point)facePoints[1]));

            CreateContourPlate(facePoints, plane.GetNormal());
            new Model().CommitChanges();

            bool parallel = Parallel.PlaneToPlane(plane, new GeometricPlane(modelObject.GetCoordinateSystem()));
        }

        private static void CreateContourPlate(ArrayList contourPoints, Vector normal)
        {
            double distance = 100.0;
            Vector translate = normal * distance;
            ContourPlate plate = new ContourPlate();
            plate.Profile.ProfileString = "PL10";

            foreach (Point contourPoint in contourPoints)
            {
                plate.Contour.AddContourPoint(new ContourPoint(contourPoint + translate, null));
            }

            plate.Insert();
        }
    }
}
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