GeometricPlane Class |
The GeometricPlane class represents a 3d geometric plane.
SystemObject
Tekla.Structures.Geometry3dGeometricPlane
Tekla.Structures.Geometry3dGeometricPlane
Namespace: Tekla.Structures.Geometry3d
Assembly: Tekla.Structures (in Tekla.Structures.dll) Version: 2025.0.0-alpha00045580+dc02c3918546f1e94eb2d3b13ea99057fb3313e0
The GeometricPlane type exposes the following members.
| Name | Description | |
|---|---|---|
| GeometricPlane |
Instantiates an XY-plane with the origin at (0,0,0).
| |
| GeometricPlane(CoordinateSystem) |
Instantiates a plane defined by the given coordinate system.
| |
| GeometricPlane(Point, Vector) |
Instantiates a plane defined by the given origin point and normal vector.
| |
| GeometricPlane(Point, Vector, Vector) |
Instantiates a plane defined by the given origin, X-axis vector and Y-axis vector.
|
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(); } } }