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.

These are TIN functions:

Function Meaning
lcTIN_Clear Deletes all points and triangles
lcTIN_FileLoad Loads TIN object from a file
lcTIN_FileSave Saves TIN object into a file
lcTIN_Update Updates TIN object

TIN points
Adds a point
lcTIN_LoadPoints Loads points from a file
lcTIN_DelDupPoints Deletes duplicate points
lcTIN_DelPoint Deletes specific point
Used to sequentially retrieve all points

TIN triangles
lcTIN_AddTrian Adds a triangle
lcTIN_DelTrian Deletes specific triangle
Used to sequentially retrieve all triangles
lcTIN_NormTrians Normalize all triangles

lcTIN_Triangulate Triangulate points within the boundary
lcTIN_BndClear Deletes a boundary
lcTIN_BndAuto Automatically creates a boundary
lcTIN_BndAddPoint Adds boundary point
lcTIN_BndUpdate Updates a boundary
lcTIN_BndGetPoint Retrieves a boundary point
lcTIN_BndFileSave Saves a part of TIN object, which is inside of a boundary

Utility functions
lcTIN_GetZ Gets Z coordinate by X,Y position
lcTIN_InterLine Defines intersection line
lcTIN_InterGetPoint Retrieves intersection points between the line and TIN triangles edges
lcTIN_GetNearPoint Retrieves TIN point which is nearest to specified position

There are special commands to work with TIN object:

Value Meaning
LC_CMD_TIN_CLEAR Delete all points and triangles
LC_CMD_TIN_LOAD Load TIN object from a file (*.tin)
LC_CMD_TIN_SAVE Save TIN object in a file (*.tin)
LC_CMD_TIN_PROPS Edit TIN properties by dialog
LC_CMD_TIN_LOADPT Load points from a file
LC_CMD_TIN_DELPT Delete points
LC_CMD_TIN_DELPTDUP Delete duplicate points (within specified Delta)
LC_CMD_TIN_DELTR Delete triangles
LC_CMD_TIN_SWAPTR Swap adjoining triangles
LC_CMD_TIN_ZOOM Zoom on extents of TIN object
LC_CMD_TIN_BND Create a boundary by picking points
LC_CMD_TIN_BNDAUTO Create a boundary by edge distance
LC_CMD_TIN_BNDTRANG Triangulate points within a boundary
LC_CMD_TIN_BNDDELTR Delete all triangles within a boundary
LC_CMD_TIN_BNDDELPT Delete all points within a boundary
LC_CMD_TIN_BNDCLEAR Delete a boundary
LC_CMD_TIN_BNDSAVE Save a bounded part of TIN object in a file (*.tin)

TIN object has the following properties:

Property Type Access Meaning
LC_PROP_TIN_FILENAME string R Filename of loaded TIN data
LC_PROP_TIN_XMIN float R Mininal X extents
LC_PROP_TIN_XMAX float R Maximal X extents
LC_PROP_TIN_YMIN float R Mininal Y extents
LC_PROP_TIN_YMAX float R Maximal Y extents
LC_PROP_TIN_ZMIN float R Mininal Z extents
LC_PROP_TIN_ZMAX float R Maximal Z extents
LC_PROP_TIN_DX float R Delta of X coordinates
LC_PROP_TIN_DY float R Delta of Y coordinates
LC_PROP_TIN_DZ float R Delta of Z coordinates
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_ISOSTEP float RW Z step of isolines
LC_PROP_TIN_ISOBOLD int RW Interval for bold isolines
LC_PROP_TIN_ISOBASE float RW Start Z for isoline step
LC_PROP_TIN_IMGDIR string RW Directory of points images

Elements visibility
LC_PROP_TIN_VIEWPT bool RW View points
LC_PROP_TIN_VIEWPTN bool RW View points names
LC_PROP_TIN_VIEWPTI bool RW View points indices
LC_PROP_TIN_VIEWPTZ bool RW View points Z-coordinates
LC_PROP_TIN_VIEWTR bool RW View triangles
LC_PROP_TIN_VIEWTRF bool RW View filling of triangles
LC_PROP_TIN_VIEWTRI bool RW View triangles indices
LC_PROP_TIN_VIEWTRV bool RW View triangle's waterflow vector
LC_PROP_TIN_VIEWISO bool RW View isolines
LC_PROP_TIN_VIEWBND bool RW View boundary
LC_PROP_TIN_VIEWBNDI bool RW View indices of boundary vertices

LC_PROP_TIN_NCOLPNT int RW Number of colors for TIN points (max 30)
LC_PROP_TIN_ICOLPNT int RW Current index of point color (0...LC_PROP_TIN_NCOLPNT-1)
LC_PROP_TIN_COLPNT int RW Color for points (COLORREF) at current index
LC_PROP_TIN_COLTR int RW Color of triangle edge (COLORREF)
LC_PROP_TIN_COLTRI int RW Color of triangle index (COLORREF)
LC_PROP_TIN_COLTRV int RW Color of triangle waterflow vector (COLORREF)
LC_PROP_TIN_COLISO int RW Color of isolines (COLORREF)
LC_PROP_TIN_COLISOB int RW Color of bold isolines (COLORREF)

TIN point properties (require point handle):

Property Type Access Meaning
LC_PROP_TIN_PNT_X float RW Point X coordinate
LC_PROP_TIN_PNT_Y float RW Point Y coordinate
LC_PROP_TIN_PNT_Z float RW Point Z coordinate
LC_PROP_TIN_PNT_NAME string RW Point name
LC_PROP_TIN_PNT_DESCR string RW Point description
LC_PROP_TIN_PNT_ICOLOR int RW Index of Point color (0...LC_PROP_TIN_NCOLPNT-1)
LC_PROP_TIN_PNT_IMGFILE string RW Image filename (without path)
LC_PROP_TIN_PNT_IMGFILE2 string R Image full filename (with path)
LC_PROP_TIN_PNT_ATTR string RW Attributes, 10 fields

TIN triangle properties (require triangle handle):

Property Type Access Meaning
LC_PROP_TIN_TR_I int R Index
LC_PROP_TIN_TR_PT0 handle R Handle to 1st point
LC_PROP_TIN_TR_PT1 handle R Handle to 2nd point
LC_PROP_TIN_TR_PT2 handle R Handle to 3rd point
LC_PROP_TIN_TR_PT0X float R X coordinate of 1st point
LC_PROP_TIN_TR_PT0Y float R Y coordinate of 1st point
LC_PROP_TIN_TR_PT0Z float R Z coordinate of 1st point
LC_PROP_TIN_TR_PT1X float R X coordinate of 2nd point
LC_PROP_TIN_TR_PT1Y float R Y coordinate of 2nd point
LC_PROP_TIN_TR_PT1Z float R Z coordinate of 2nd point
LC_PROP_TIN_TR_PT2X float R X coordinate of 3rd point
LC_PROP_TIN_TR_PT2Y float R Y coordinate of 3rd point
LC_PROP_TIN_TR_PT2Z float R Z coordinate of 3rd point
LC_PROP_TIN_TR_XC float R X coordinate of triange center point
LC_PROP_TIN_TR_YC float R Y coordinate of triange center point
LC_PROP_TIN_TR_ZC float R Z coordinate of triange center point
LC_PROP_TIN_TR_NVX float R X value of triange normal vector
LC_PROP_TIN_TR_NVY float R Y value of triange normal vector
LC_PROP_TIN_TR_NVZ float R Z value of triange normal vector
LC_PROP_TIN_TR_NANG float R Normal vector angle at XY plane
LC_PROP_TIN_TR_XMIN float R X min of triange extents
LC_PROP_TIN_TR_YMIN float R Y min of triange extents
LC_PROP_TIN_TR_ZMIN float R Z min of triange extents
LC_PROP_TIN_TR_XMAX float R X max of triange extents
LC_PROP_TIN_TR_YMAX float R Y max of triange extents
LC_PROP_TIN_TR_ZMAX float R Z max of triange extents
LC_PROP_TIN_TR_DX float R Delta X of triange extents
LC_PROP_TIN_TR_DY float R Delta Y of triange extents
LC_PROP_TIN_TR_DZ float R Delta Z of triange extents
LC_PROP_TIN_TR_FLAGS int RW Triangle flags (0-255)
LC_PROP_TIN_TR_MARK bool RW "Marked triangle" flag