Skip to documentation
DocumentationAll documentsEnglish

PLY-G(1)

NAME

ply-g - convert a Stanford PLY file to a BRL-CAD database

On this page

SYNOPSIS

ply-g [-s scale_factor] [-d] [-v] input_file.ply output_file.g

DESCRIPTION

ply-g converts the geometry in a Stanford PLY file (ASCII or binary) into a BRL-CAD .g database via the GCV conversion library. The resulting BRL-CAD model contains the triangulated mesh described by input_file.ply.

PLY data is conventionally expressed in meters, so by default the input coordinates are scaled by 1000.0 to produce a model in BRL-CAD’s base unit of millimeters. Use -s to override this factor.

OPTIONS

-s scale_factor

Multiply all input coordinates by scale_factor instead of the default of 1000.0. For example, a value of 1.0 keeps the data in its original units and a value of 500 produces a model half the default size.

-d

Enable the GCV debug flag, producing additional low-level diagnostic output during conversion.

-v

Run verbosely, reporting progress and details about the conversion.

EXAMPLES

Example 1. Convert a binary PLY scan and inspect it
ply-g bunny.ply bunny.g
mged bunny.g 'tops'

Convert the PLY mesh bunny.ply into the database bunny.g, then list the top-level objects with mged(1) to verify the imported geometry.

Example 2. Preserve native units
ply-g -s 1.0 model.ply model.g

Import model.ply without the default meters-to-millimeters scaling, leaving the coordinates exactly as stored in the file.

SEE ALSO

brlcad(1), g-ply(1), mged(1)

AUTHOR

BRL-CAD Team

This software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory.

BUG REPORTS

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org