Skip to documentation
DocumentationAll documentsEnglish

PNTS(nged)

NAME

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

On this page

SYNOPSIS

pnts {subcommand} {subcommand arguments}
read [-f [xyzijksrgb]] [-u unit] [--size #] {input_file} {pnts_obj}
write [-p #] [-f xyz] [--ply] {pnts_obj} {output_file}
gen [-t #] [--surface] [--grid] [--rand] [--sobol] [--max-pnts] [--max-time] {obj} {output_pnts}
tri [unit] [-s #]
tri spsr

DESCRIPTION

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

Most pnts subcommands accept -h or --help to print subcommand-specific usage details.

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 (default 17).

-f xyz

Writes only point coordinates, omitting normals, sizes, and colors. This option cannot be combined with --ply.

--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 [unit]

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.

tri spsr

Apply the Screened Poisson Surface Reconstruction methodology to generate a mesh from the point cloud. See the -h option for the various controls available for this methodology.

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 devs@brlcad.org