Name

pnts — Creates/writes/generates a "pnts" (i.e. point cloud) primitive.

Synopsis

pnts {subcommand} {subcommand arguments}

read [-f [xyzijksrgb]] [-u unit] [--size #] {input_file} {pnts_obj}

write [-p #] [--ply] {pnts_obj} {output_filepnts }

gen [-t #] [--surface] [--grid] [--rand] [--sobol] [--max-pnts] [--max-time] {obj} {output_pnts}

tri [-s #]

DESCRIPTION

Allows the user to create/write/generate "pnts" primitives. See also the make_pnts command.

SUBCOMMANDS

read

Reads point data from an input file.

-f [xyzijksrgb]

Specifies the format of input data

-u unit

Sepcifies the units - either a named unit (e.g. in), number, or a unit expression (.15mm). Assumes millemeters by default.

--size #

Sets the default size for each point (default is 0).

write

Writes point data to an output file.

-p #

Specifies the number of significant digits (defualt 17).

--ply

Writes output in PLY format.

gen

Generates a point set from the object and stores the set in a "pnts" primitive.

-t #

Specifies the sampling grid spacing (in mm)

--surface

Saves only first and last points along a ray.

--grid

Samples using a gridded ray pattern.

--rand

Samples using a random Marsaglia ray pattern on the bounding sphere.

--sobol

Samples using a Sobol pseudo-random Marsaglia ray pattern on the bounding sphere.

--max-pnts

Specifies the maximum number of pnts to return per non-grid sampling method.

--max-time

Specifies the maximum time to spend per method (in seconds) when using non-grid sampling.

tri

Generates unit or scaled triangles for each pnt in a point set. If no normal information is present, uses origin at avg of all set points to make normals.

-s #

Specifies the scale factor to apply to unit triangles - scales the triangle to size with the triangle centered on the original point.

EXAMPLES

Example 1. Read a point cloud file

mged> pnts read -f xyz -u in --size 1 pointsfile.txt point_cloud.s1

Creates a "pnts" primitive named "point_cloud.s1" using the data file "pointsfile.txt" where the data file only contains the point coordinates listed in the order "xyz." The units of the file data is "in" and the default point size is set to "1.0" (in current model units).



Example 2. Write a points file from a "pnts" primitive.

mged> pnts write -p 3 point_cloud.s1 pointsfile.txt

Write the XYZ coordinates of the "pnts" primitive point_cloud.s1 to a file called "pointsfile.txt" and and give 3 significant digits.



AUTHOR

BRL-CAD Team

BUG REPORTS

Reports of bugs or problems should be submitted via electronic mail to