The Unit delivers the interface to dynmic library functions J.R. Shewchuks two-dimensional quality mesh generator and delaunay triangulator.
None.
None.
Function ExecTriangulate( Switches: PChar; Var InData, OutData, VorOut: PTriangulateIO): LongInt; |
Function ExecTriangulate(Switches:PChar;Var InData,
OutData,VorOut:PTriangulateIO):LongInt;
Capsulation by permanent use of Dll .
1. Switches parameter switches: p Triangulates a Planar Straight Line Graph (.poly file). r Refines a previously generated mesh. q Quality mesh generation. A minimum angle may be specified. a Applies a maximum triangle area constraint. A Applies attributes to identify elements in certain regions. c Encloses the convex hull with segments. e Generates an edge list. v Generates a Voronoi diagram. n Generates a list of triangle neighbors. g Generates an .off file for Geomview. B Suppresses output of boundary information. P Suppresses output of .poly file. N Suppresses output of .node file. E Suppresses output of .ele file. I Suppresses mesh iteration numbers. O Ignores holes in .poly file. X Suppresses use of exact arithmetic. z Numbers all items starting from zero (rather than one). o2 Generates second-order subparametric elements. Y Suppresses boundary segment splitting. S Specifies maximum number of added Steiner points. i Uses incremental method, rather than divide-and-conquer. F Uses Fortune's sweepline algorithm, rather than d-and-c. l Uses vertical cuts only, rather than alternating cuts. s Force segments into mesh by splitting (instead of using CDT). C Check consistency of final mesh. Q Quiet: No terminal output except errors. V Verbose: Detailed information on what I'm doing. h Help: Detailed instructions for Triangle.
InData - contains the input set OutData - contains the output set VorData - contains the output set for voronoi diagramsResult:
If the Function is zero everthing is fine. If not and the value is < 10000 an error occurs.
If not and the value is > 10000 you called the syntax or info function like triangle without parameter or triangle -h
Procedure FreeIntegerArray(Var Data: PIntegerArray; Dummy: Integer); |
Free a the integer buffer!
Procedure FreeRealArray(Var Data: PRealArray; Dummy: Integer); |
Free a the real buffer!
Function NewIntegerArray(Var Data: PIntegerArray; Size: Integer): Boolean; |
Allocate a new integer buffer!
Function NewRealArray(Var Data: PRealArray; Size: Integer): Boolean; |
Allocate a real buffer!
Procedure Report(IO: TTriangulateIO; Markers, ReportTriangles, ReportNeighbors, ReportSegments, ReportEdges, ReportNorms: Boolean); |
Report function like in TriCall.c
Procedure SetIntegerArray(Buffer: PIntegerArray; index: Integer; Data: TInteger); |
Assign a dataset in a integer buffer!
Procedure SetRealArray(Buffer: PRealArray; index: Integer; Data: TReal); |
Assign a dataset in a real buffer!
Function TriangulateLoadDLL( Switches: PChar; Var InData, OutData, VorOut: PTriangulateIO): LongInt; |
Like ExecTriangle but only a example how to use the Dll by dynamic loading
Procedure WriteStringsIO; |
The Procedure WriteStringsIO is the encapsulation for reading of the whole Buffer and write it to console as example how to use.
Procedure _cleariobuffer; cdecl; external 'Triangle.DLL'; |
The procedure _cleariobuffer will clear the strings an set the linnumer to zero its like clearing a screen.
Procedure _dlpFreeTriangleIO(Var Data: PTriangulateIO); |
Free a triangulation data exchange record only available vor the input recor vor OutData and VoroutData use the external procedure _freetriangulateio !
Procedure _freeiobuffer; cdecl; external 'Triangle.DLL'; |
The procedure _freeoibuffer will dispose your current buffer.
Procedure _freetriangleio(Data: PTriangulateIO); cdecl; external 'Triangle.DLL'; |
Core dll call to free in triangle.dll allocated dynamic datasets to prevent memory access failture. It should be applied to OutData and VorData called in the function Exec triangulation.
Function _getiobuffer(Num: Integer; Data: PChar): Integer; cdecl; external 'Triangle.DLL'; |
The funtion _getiobuffer get back a line string of "num"th line in the buffer. The result of function is zero by bad amounts of num and 1 else. See WriteStringIO how to use
Procedure _InitTriangleIO(Var Data: PTriangulateIO); |
Initialisation of a triangulation data exchange record The settings to NIL needed to have no invalid memory snatching.
Function _iobufferlines: Integer; cdecl; external 'Triangle.DLL'; |
The function _iobufferlines gives back the maximal number of used lines.
Function _iobuffertextwidth: Integer; cdecl; external 'Triangle.DLL'; |
The function _iobuffertextwidth gives back the width of the characters in the buffer.
Procedure _openiobuffer(cMaxLine, cIOWidth: Integer); cdecl; external 'Triangle.DLL'; |
_openiobuffer will allocate the buffer by triangle.dll the parameters: cMaxLine: is ignored now and fixed to static 127 lines of output cIOWidth: is the maximal width of each string in your buffer
Function _triangulate(Switches: PChar; InData, OutData, VorOut: PTriangulateIO): Integer; cdecl; external 'Triangle.DLL'; |
Core dll call of triangulation. Better use the function ExecTriangulation.
None.
<Alexander Weidauer> alex.weidauer@huckfinn.de
Februar 2002
Februar 2002