Get into the table a list of geometry points of the upper surface of the set of elements collected in the list.

The table is then used, for example, to build 3d meshes as a list of points or a list of lines.

Call:

ac_request("get_lands_topcoords", int iElementsList, int iTablePointsXYZ_s_polynum, int iMode);


Here:

iElementsList - number of the list of elements from which to select surface points;

iTablePointsXYZ_s_polynum - table descriptor where to write the result;

The structure is generated automatically.

Speakers:

"x","y","z" - coordinates of 3d points of the surface;

"s" - numeric flag for tracking nested contours of cutouts (reserved);

"polynum" - unique polygon or line number in the table.

iMode - view in which we get data about points - 0/1/2/3.

0 - all points of the contours of the upper faces of the elements' surfaces are entered into the table. The "polynum" field contains the ordinal number of the face within the list. It is used for the most accurate reproduction of surfaces due to the absolutely accurate reproduction of all faces.

1 - only unique points are entered into the table, i.e. for adjacent faces, points of adjacent edges will be specified only once.

2 - pairs of points are entered for each line that defines an edge, the numbers of edges within the list are unique.

3 - pairs of points are entered for two lines that define the edges of each face - the numbers of the edges within the list are unique.

If iMode is 0,2 or 3, the table can be used as a data source for building 3d grids along lines.


Example.

Write the selected elements of 3d grids to the list No. 1 and

get a list of unique points of the top surfaces in a table.

Display this table in a message box.


ac_request_special("load_elements_list_from_selection", 1, "MeshType", 2);

int iTable_Coords3DTable;

object("create", "ts_table", iTable_Coords3DTable);

ac_request("get_loaded_elements_list_count", 1);

int icount = ac_getnumvalue();

cout << "Items selected for analysis = " << icount << "\n";

string str;

ac_request("get_lands_topcoords", 1, iTable_Coords3DTable, 1);

ts_table(iTable_Coords3DTable, "print_to_str", str);

cout << "\nCoords\n";

coutvar << str;