Please enable JavaScript to view this site.

TerraModeler User Guide

Navigation: Programming Interface > MDL Public Functions

Triangulate Survey

Scroll Prev Top Next More

Triangulate Survey

TerraModeler Triangulate Survey tool creates a surface model from survey elements. TerraModeler does not understand any details about survey elements or survey feature coding. TerraSurvey is responsible for deciding what elements and what feature codes can be used as valid information for the surface to be created.

TerraModeler scans the CAD file and calls a function in TerraSurvey for each element to find out if that element can be used in triangulation.

A similar calling sequence has been implemented for DigiCad, PRO600, and Espa applications. The example code below shows how an application should publish the functions for being called by TerraModeler.

 

#define PRO600_SYMBSET 250 /* Any value of your choice */

char *ProSym = NULL ;

ProSym = mdlCExpression_initializeSet( PRO600_SYMBSET, 0, 1);

mdlCExpression_symbolPublish( ProSym, “Pro600StartTriMap”, SYMBOL_CLASS_FUNCTION,
                                        (CType *) &intType, Pro600StartTriMap);
mdlCExpression_symbolPublish( ProSym, “Pro600AcceptTriMap”, SYMBOL_CLASS_FUNCTION,
                                        (CType *) &intType, Pro600AcceptTriMap);

 

/*-------------------------------------------------------------------

PRO600 should use this function to add grid points

to the surface model. This function enables PRO600 to add

points which do not have corresponding CAD file elements.

 

Triangulate Survey command has been started for surface

with id I.

 

PRO600 can make calls to FnAddPoints() to add points

to the surface. PRO600 should not call FnAddDone() from

within this routine.

 

Return 1 if Pro600AcceptTriMap should be called while scanning.

Return 0 if Pro600AcceptTriMap does not need to be called.

*/

 

int Pro600StartTriMap( int I) ;

 

/*-------------------------------------------------------------------

TerraModeler calls this function for every CAD file

descriptor if Pro600StartTriMap() returned 1.

 

Pro600 should return one of the following values:

0 : element is invalid for surface type Type or element is not a PRO600 element

1 : random point element

2 : breakline element

10 : external 3D boundary

11 : external 2D boundary

20 : internal 3D boundary

21 : internal 2D boundary

*/

 

int Pro600AcceptTriMap( MSElementDescr *Dp, int FileNr, int Type) ;

 

/*-------------------------------------------------------------------

This function enables DigiCad to add points which do not

have corresponding CAD file elements.

 

Triangulate Survey command has been started for surface

with id value of I.

 

DigiCad can make calls to FnAddPoints() to add points

to the surface. DigiCad should not call FnAddDone() from

within this routine.

 

Return 1 if DigiAcceptTriMap should be called while scanning.

Return 0 if DigiAcceptTriMap does not need to be called.

*/

 

int DigiStartTriMap( int I) ;

 

/*-------------------------------------------------------------------

TerraModeler calls this function for every CAD file

descriptor if DigiStartTriMap() returned 1.

 

DigiCad can set the exact point in *Xyz (for leveling text

elements where the position of the decimal point is not accurate).

 

DigiCad should return one of the following values:

0 : element is invalid for surface type T or element is not a DigiCad element

1 : random point element

2 : breakline element

10 : external 3D boundary

11 : external 2D boundary

20 : internal 3D boundary

21 : internal 2D boundary

*/

 

int DigiAcceptTriMap( Dpoint3d *Xyz, MSElementDescr *Dp, int FileNr, int T) ;

TerraModeler User Guide   01.01.2024   © 2024 Terrasolid Ltd