pt2string

NAME

pt2string - format a point cloud using a given pattern

SYNOPSIS

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

DESCRIPTION

pt2string converts a point cloud to a new format described by a given PATTERN. For each point of the cloud, a string derived from PATTERN is output, in which all occurrences of 'x1', 'x2', 'x3' are replaced by their values, all occurrences of 'ref' are replaced by the reference number of the point (possibly shifted by option --shift) and all occurrences of 'npts' are replaced by the total number of points in the cloud. The point cloud is read from the standard input and the results are sent to the standard output. By default, the number of points 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 'pt2string -H Example of patterns: 'sqrt(x1^2+x2^3+x3^2)' or '<point><x>x1</x><y>x2</y><z>x3</z></point>'. The program can be used in conjunction with octave to prepare scalar files which can be used for visualisation (view_pt(1), view_tri(1)) or selection (select_pt(1), select_tri(1)).

POINT CLOUD FORMAT

> number_of_points
> x1 y1 z1
> x2 y2 z2
> ...
> xn yn zn

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 'npts', its occurrences are replaced by 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 'npts', its occurrences are replaced by 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: 2015)

BUGS

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

COPYRIGHT

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

SEE ALSO

view_pt(1), select_pt(1), select_tri(1)

Pierre SMARS (tools, home page)