Skip to content

Latest commit

 

History

History
56 lines (42 loc) · 1.64 KB

File metadata and controls

56 lines (42 loc) · 1.64 KB

TinSurface Class

Overview

The TinSurface class represents a Triangulated Irregular Network (TIN) surface in Civil3D, the most common surface type for terrain modeling.

Namespace

Autodesk.Civil.DatabaseServices

Inheritance Hierarchy

System.Object
  └─ RXObject
      └─ DBObject
          └─ Entity
              └─ Surface
                  └─ TinSurface

Key Properties

Inherits all properties from Surface

Key Methods

Method Return Type Description
GetTriangles() Triangle[] Gets all triangles in the surface
GetPoints() SurfacePoint[] Gets all surface points

Code Examples

Example 1: Getting TIN Surface Statistics

using (Transaction tr = civilDoc.Database.TransactionManager.StartTransaction())
{
    TinSurface tinSurf = tr.GetObject(surfaceId, OpenMode.ForRead) as TinSurface;
    
    GeneralSurfaceProperties props = tinSurf.GetGeneralProperties();
    
    ed.WriteMessage($"\nTIN Surface: {tinSurf.Name}");
    ed.WriteMessage($"\nNumber of Points: {props.NumberOfPoints}");
    ed.WriteMessage($"\nNumber of Triangles: {props.NumberOfTriangles}");
    ed.WriteMessage($"\nMin Elevation: {props.MinimumElevation:F2}");
    ed.WriteMessage($"\nMax Elevation: {props.MaximumElevation:F2}");
    
    tr.Commit();
}

Related Objects

References