Triangulated Irregular Network (TIN) Home

The TIN model represents a surface as a set of contiguous, non-overlapping triangles. Within each triangle the surface is represented by a plane. The triangles are made from a set of points called mass points.

To add TIN object into a drawing use following functions:

Function Meaning
lcBlockAddTIN Adds TIN object into a drawing
lcTIN_AddPoint Used to pre-define all TIN points (before to call lcBlockAddTIN)

TIN object functions:

Function Meaning
lcTIN_AddPoint Adds new point
lcTIN_PtypeGetByName Retrieves point type by its name
lcTIN_PtypeGetFirst
lcTIN_PtypeGetNext
Used to sequentially retrieve all point types
lcTIN_PntGetFirst
lcTIN_PntGetNext
Used to sequentially retrieve all points
lcTIN_PntGetNear Finds a point, nearest to the specified X,Y coordinates
lcTIN_PntDelDup Deletes duplicate points
lcTIN_TriGetFirst
lcTIN_TriGetNext
Used to sequentially retrieve all triangles
lcTIN_TriGetByPos Retrieves a tringle by position
lcTIN_TriGetEdge Retrieves points of triangle edge and contacted triangle
lcTIN_TriUpdate Updates triangles after editing point position
lcTIN_Bnd Generates a boundary
lcTIN_BndGetPoint Retrieves boundary point
lcTIN_Triangulate Triangulate points within a boundary
lcTIN_Isolines Generates isolines
lcTIN_IsoGetFirst
lcTIN_IsoGetNext
Used to sequentially retrieve all isolines
lcTIN_IsoMakeLabels
lcTIN_GetIsoLabel
Used to retrieve positions of isoline's height labels
lcTIN_GetZ Retrieves Z-coordinate for specified X,Y position
lcTIN_ColorFill Generates color filling (raster image)
lcTIN_Save Write TIN model or points into external file
lcTIN_InterLine Defines intersection line
lcTIN_InterGetPoint Retrieves intersection points
lcTIN_Clear Clears TIN data

There are list of commands to add TIN object into a drawing:

Value Meaning
LC_CMD_TIN_LOAD Creates new TIN object by loading TIN model from a file (*.tin)
LC_CMD_TIN_LOADPT Creates new TIN object by loading TIN points from a file (*.csv)
LC_CMD_TIN_ADDPT Creates new TIN object by adding points on-screen

There are list of commands to work with selected TIN object:

Value Meaning
LC_CMD_TIN_PROPS Opens a dialog "TIN properties"
LC_CMD_TIN_PTYPES Opens a dialog "Point types"
LC_CMD_TIN_EDITPT Picks and edits points
LC_CMD_TIN_ADDPT Adds new TIN points on-screen (CmdParam = 1)
LC_CMD_TIN_DELPT Picks and deletes points
LC_CMD_TIN_BNDDELPT Deletes all points within a boundary
LC_CMD_TIN_DELPTDUP Opens a dialog "Delete duplicate points"
LC_CMD_TIN_DELTRALL Delete all triangles. (CmdParam: 1-no messages
LC_CMD_TIN_DELTR Picks and deletes triangles
LC_CMD_TIN_BNDDELTR Deletes all triangles within a boundary
LC_CMD_TIN_SWAPTR Picks a common edge of two triangles and swap their edge if possible
LC_CMD_TIN_BNDAUTO Creates a boundary by edge distance
LC_CMD_TIN_BND Creates a boundary by picking TIN points
LC_CMD_TIN_BNDEDIT Edits exist boundary on-screen
LC_CMD_TIN_BNDCLEAR Deletes a boundary
LC_CMD_TIN_BNDTRANG Triangulates points within a boundary. (CmdParam: 1 - stop after each triangle
LC_CMD_TIN_GENISO Call dialog "Generate TIN isolines"
LC_CMD_TIN_GENFILL Call dialog "Generate TIN filling"
LC_CMD_TIN_SAVE Save TIN object or only TIN points in a file
LC_CMD_TIN_BNDSAVE Save a bounded part of TIN object or TIN points in a file
LC_CMD_TIN_Z Switches on/off current Z-coordinate of cursor position (displayed near cursor)
LC_CMD_TIN_ZOOM Zoom on extents of TIN object
LC_CMD_TIN_DELETE Deletes TIN object from a memory. See also lcBlockDeleteEnt

TIN object has properties and functions derived from base class and the following specific properties:

Property Type Access Meaning
LC_PROP_TIN_NAME string RW TIN name
LC_PROP_TIN_DESCR string RW Comment
LC_PROP_TIN_NPTYPES int R Number of point types
LC_PROP_TIN_NPOINTS int R Number of points
LC_PROP_TIN_NTRIANS int R Number of triangles
LC_PROP_TIN_NBNDPTS int R Number of boundary points
LC_PROP_TIN_NISOLINES int R Number of isolines
LC_PROP_TIN_HASCFILL bool R Has color filling
LC_PROP_TIN_EXTERNAL bool RW If TRUE then TIN data will be stored in external file
LC_PROP_TIN_FILENAME string R Name of TIN data file

Extents
LC_PROP_TIN_XMIN
LC_PROP_TIN_YMIN
LC_PROP_TIN_ZMIN
float R Minimal X, Y, Z coordinate
LC_PROP_TIN_XMAX
LC_PROP_TIN_YMAX
LC_PROP_TIN_ZMAX
float R Maximal X, Y, Z coordinate
LC_PROP_TIN_DX
LC_PROP_TIN_DZ
LC_PROP_TIN_DZ
float R Length along X, Y, Z axis

Visibility
LC_PROP_TIN_VIEWPT bool RW Points
LC_PROP_TIN_VIEWPTN bool RW Point type name
LC_PROP_TIN_VIEWPTI bool RW Point index
LC_PROP_TIN_VIEWPTZ bool RW Point Z-coordinate
LC_PROP_TIN_VIEWTR bool RW Triangles
LC_PROP_TIN_VIEWCF bool RW Color filling
LC_PROP_TIN_VIEWTRI bool RW Index of triangle
LC_PROP_TIN_VIEWTRV bool RW Triangle's waterflow vector
LC_PROP_TIN_VIEWBND bool RW Boundary line
LC_PROP_TIN_VIEWBNDI bool RW Index of boundary vertex
LC_PROP_TIN_VIEWISO bool RW Isolines
LC_PROP_TIN_VIEWISOH bool RW Heights of isolines
LC_PROP_TIN_VIEWZ bool RW Displays current Z-value near cursor, when user moves it

Colors
LC_PROP_TIN_COLTR int RW Color of triangle outline
LC_PROP_TIN_COLTRI int RW Color of triangle index
LC_PROP_TIN_COLTRV int RW Color of triangle normal vector
LC_PROP_TIN_COLISO int RW Color of isolines
LC_PROP_TIN_COLISOB int RW Color of bold isolines
LC_PROP_TIN_COLISOW int RW Color of water isolines
LC_PROP_TIN_COLBND int RW Color of boundary line
LC_PROP_TIN_COLBNDP int RW Color of boundary point

Isolines
LC_PROP_TIN_ISOBASE float RW Start Z-level. Default value is 0.0
LC_PROP_TIN_ISOSTEP float RW Z step
LC_PROP_TIN_ISOBOLD int RW Step of bold isolines
LC_PROP_TIN_ISOSPLINE bool RW Spline isolines

Color filling
LC_PROP_TIN_IMG_ZSTEP float RW Z step. Defines a number of colors used for filling. Use 0.0 for full palette (256 colors)
LC_PROP_TIN_IMG_PSIZE float RW Pixel size (drawing units). This value determines the image size
LC_PROP_TIN_IMG_NX int R Image width (pixels)
LC_PROP_TIN_IMG_NY int R Image height (pixels)


Properties of TIN point type (require a handle of point type)

Property Type Access Meaning
LC_PROP_TINPTYPE_NAME string RW Name of point type
LC_PROP_TINPTYPE_DTEXT string RW Text to be drawn near a point
LC_PROP_TINPTYPE_COLOR int RW Color of points (COLORREF)

Properties of TIN point (require a handle of point)

Property Type Access Meaning
LC_PROP_TINPNT_TYPE handle RW Handle of point type
LC_PROP_TINPNT_I int R Index of point
LC_PROP_TINPNT_X float RW X coordinate
LC_PROP_TINPNT_Y float RW Y coordinate
LC_PROP_TINPNT_Z float RW Z coordinate
LC_PROP_TINPNT_COLOR int R Color of point (get from point type)
LC_PROP_TINPNT_NAME string R Point name (get from point type)
LC_PROP_TINPNT_ONAME string RW Point own name (overrides name of point type)
LC_PROP_TINPNT_DESCR string RW Point description

Properties of TIN triangle (require a handle of triangle)

Property Type Access Meaning
LC_PROP_TINTR_I int R Index of triangle
LC_PROP_TINTR_PT0 handle R Handle of first point
LC_PROP_TINTR_PT1 handle R Handle of second point
LC_PROP_TINTR_PT2 handle R Handle of third point
LC_PROP_TINTR_PT0X
LC_PROP_TINTR_PT0Y
LC_PROP_TINTR_PT0Z
float R X, Y, Z coordinate of first point
LC_PROP_TINTR_PT1X
LC_PROP_TINTR_PT1Y
LC_PROP_TINTR_PT1Z
float R X, Y, Z coordinate of second point
LC_PROP_TINTR_PT2X
LC_PROP_TINTR_PT2Y
LC_PROP_TINTR_PT2Z
float R X, Y, Z coordinate of third point
LC_PROP_TINTR_XC
LC_PROP_TINTR_YC
LC_PROP_TINTR_ZC
float R X, Y, Z coordinate of center point
LC_PROP_TINTR_NVX
LC_PROP_TINTR_NVY
LC_PROP_TINTR_NVZ
float R X, Y, Z component of normal vector
LC_PROP_TINTR_NANG float R Angle of normal vector on XY plane
LC_PROP_TINTR_XMIN
LC_PROP_TINTR_YMIN
LC_PROP_TINTR_ZMIN
float R Minimal X, Y, Z coordinate of triangle
LC_PROP_TINTR_XMAX
LC_PROP_TINTR_YMAX
LC_PROP_TINTR_ZMAX
float R Maximal X, Y, Z coordinate of triangle
LC_PROP_TINTR_DX
LC_PROP_TINTR_DY
LC_PROP_TINTR_DZ
float R Length along X, Y, Z axis

Properties of TIN isoline (require a handle of isoline)

Property Type Access Meaning
LC_PROP_TINISO_Z float R Z of isoline
LC_PROP_TINISO_NVERS int R Number of vertices
LC_PROP_TINISO_IVER int RW Index of isoline
LC_PROP_TINISO_X float R X of isoline vertex
LC_PROP_TINISO_Y float R Y of isoline vertex
LC_PROP_TINISO_CLOSED bool R Flag "closed isoline"


Code samples

Create TIN object from pre-defined points
Modify points of TIN object
Get intersection points


See also

  Retrieve objects