li2string

NAME

li2string - format a line cloud using a given pattern

SYNOPSIS

li2string [-H STRING|--header STRING] [-F STRING|--footer STRING] [-S INT|--shift INT] [-?|-h|--help] PATTERN

DESCRIPTION

li2string converts a line cloud to a new format described by a given PATTERN. Be careful, the input format used by li2string (see below) is not the format used by view_li(1) and other line processing programs (if necessary, use litopo(1) to convert the format). For each line of the cloud, a string derived from PATTERN is output, in which all occurrences of 'x1', 'x2' are replaced by the coordinates of the first and second point, all occurrences of 'p1' and 'p2' are replaced by the reference number of the point and all occurrences of 'ref' are replaced by the line reference number (possibly shifted by option --shift). The line cloud is read from the standard input and the results are sent to the standard output. By default, the number of lines is output to the first line. Options --header and --footer can be used to add headers and footers to the output. To have no header, the option should be 'li2string -H '' PATTERN'. Example of patterns: 'x1 x2' (to get the usual line cloud format) or '<line>p1,p2</line>'. The program can be used in conjunction with octave to prepare scalar files which can be used for visualisation (view_li(1)) or selection (select_li(1)).

LINE CLOUD FORMAT

> number_of_points
> x1 y1 z1
> x2 y2 z2
> ...
> xn yn zn
> number_of_lines
> r11 r12 r13
> r21 r22 r23
> ...
> rn1 rn2 rn3

OPTIONS

-h,--help,-?

Returns the manual page

-H STRING, --header STRING

header to output before the point processing. Example: '<table>'. By default, the header is the number of points in the cloud. If the string is empty '', no header is output. If the patterns contains 'nlis' or 'npts', their occurrences are replaced by the number of lines and/ord the number of points.

-F STRING, --footer STRING

footer output after the point processing. Example: '</table>'. By default, not footer is output. If the patterns contains 'nlis' or 'npts', their occurrences are replaced by the number of lines and/ord the number of points.

-S INT, --shift INT

if 'ref' is used, its value may be shifted by a given integer using this option.

AUTHORS

Written by Pierre Smars (first version: 2016)

BUGS

Reports of bugs or problems should be submitted via electronic mail to <smars@yuntech.edu.tw>.

COPYRIGHT

Copyright (C) 2016-2021 Pierre Smars. License GPLv2 <http://www.gnu.org/licenses/gpl-2.0.html>. This is free software: you are free to change and redislibute it. There is NO WARRANTY, to the extent permitted by law.

SEE ALSO

litopo(1), view_li(1)

Pierre SMARS (tools, home page)