GraphicsDrawer Class

The GraphicsDrawer class draws temporary graphics in the currently active rendered view in Tekla Structures.
Inheritance Hierarchy
SystemObject
  Tekla.Structures.Model.UIGraphicsDrawer

Namespace:  Tekla.Structures.Model.UI
Assembly:  Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2023.0.3
Syntax
[SerializableAttribute]
public sealed class GraphicsDrawer

The GraphicsDrawer type exposes the following members.

Constructors
  NameDescription
Public methodGraphicsDrawer
Creates a new graphics drawer instance.
Top
Methods
  NameDescription
Public methodDrawLineSegment(LineSegment, Color)
Draws a temporary line segment in the currently active rendered view.
Public methodDrawLineSegment(Point, Point, Color)
Draws a temporary line segment in the currently active rendered view.
Public methodDrawMeshLines
Draws the mesh lines as temporary graphics in the currently active Tekla Structures rendered view.
Public methodDrawMeshSurface
Draws the mesh surface as temporary graphics in the currently active Tekla Structures rendered view. The counterclockwise sides of the mesh triangles are drawn.
Public methodDrawPolyLine
Draw a temporary polyline into all open Tekla Structures views.
Public methodDrawText
Draws a temporary text in the currently active rendered view.
Public methodRemoveTemporaryGraphicsObject
Remove a temporary graphic object from all views.
Public methodRemoveTemporaryGraphicsObjects
Remove a list of temporary graphic objects from all views.
Top
Examples
using Tekla.Structures.Model.UI;
using Tekla.Structures.Geometry3d;

public class Example
{
       public void Example1()
       {
           GraphicsDrawer drawer = new GraphicsDrawer();

           drawer.DrawText(new Point(0.0, 1000.0, 1000.0), "TEXT SAMPLE", new Color(1.0, 0.5, 0.0));
           drawer.DrawLineSegment(new Point(0.0, 0.0, 0.0), new Point(1000.0, 1000.0, 1000.0), new Color(1.0, 0.0, 0.0));

           Mesh mesh = new Mesh();
           mesh.AddPoint(new Point(   0.0,    0.0, 0.0));
           mesh.AddPoint(new Point(1000.0,    0.0, 0.0));
           mesh.AddPoint(new Point(1000.0, 1000.0, 0.0));
           mesh.AddPoint(new Point(   0.0, 1000.0, 0.0));
           mesh.AddTriangle(0,1,2);
           mesh.AddTriangle(0,2,3);
           mesh.AddLine(0,1); mesh.AddLine(1,2); mesh.AddLine(2,3); mesh.AddLine(3,1);

           drawer.DrawMeshSurface(mesh, new Color(1.0, 0.0, 0.0, 0.5));
           drawer.DrawMeshLines(mesh, new Color(0.0, 0.0, 1.0));
       }
}
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