G-PLY(1)

πŸ“¦
version 7.44.0 Β· 2 versions
, in nixpkgs unstable

πŸ’… G-PLY(1) β€” the BRL-CAD one, bestie πŸŽ€

okay so real talk, this is the g-ply girlie from BRL-CAD, and she's here to make your geometry go poof into a Stanford PLY file ✨


🌸 NAME 🌸

g-ply β€” convert BRL-CAD geometry to a Stanford PLY file πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

g-ply [-v] [-s] [-t type] [-a abs_tol] [-r rel_tol] [-n norm_tol] [-D dist_tol] [-x rt_debug] [-X nmg_debug] -o output.ply database.g object [object ...]

✨ DESCRIPTION ✨

so g-ply takes the object(s) you listed out of a BRL-CAD database.g and converts them into a Stanford PLY (Polygon File Format) geometry file β€” the name of which you give it with -o, no cap πŸ’…

every object gets tessellated into a faceted mesh first, by way of the NMG booleans, before anything gets written. so basically any solid, region, or combination that can be evaluated down to a triangle mesh is fair game for exporting 🫢

the output can be ASCII PLY or binary PLY β€” your call, bestie β€” and by default all the objects you asked for get merged into one single file. iconic behavior honestly πŸ”₯


🧚 OPTIONS 🧚

  • -o output.ply β€” the name of the PLY file to write. this one is required, so like, don't forget it πŸ™ˆ when -s is given, this name gets appended as a suffix to each per-object file, and that file is named objectoutput.ply.
  • -s β€” write a separate PLY file for each object instead of merging all the objects into a single file. one file per bestie, we love boundaries πŸ’–
  • -t type β€” pick the PLY encoding. valid values are asc for ASCII, le for binary little-endian, and be for binary big-endian. choose your fighter ⭐
  • -a abs_tol β€” absolute tessellation tolerance in millimeters (that's the maximum chord distance between the true surface and a facet edge). setting this one clears the relative tolerance. default is 0.0 (disabled).
  • -r rel_tol β€” relative tessellation tolerance, expressed as a fraction of the bounding-box size of the object. default is 0.01.
  • -n norm_tol β€” surface normal tessellation tolerance, i.e. the maximum angle in degrees between facet normals. setting this clears the relative tolerance. default is 0.0 (disabled).
  • -D dist_tol β€” calculational distance tolerance in millimeters, used when deciding whether two vertices are coincident. default is 0.0005.
  • -x rt_debug β€” set the librt debug flag to the given hexadecimal value.
  • -X nmg_debug β€” set the libnmg debug flag to the given hexadecimal value.
  • -v β€” enable verbose output during conversion. she will tell you everything πŸ’€
  • -h, -? β€” print the usage message and exit. bye bestie πŸ‘‹

🌈 EXAMPLES 🌈

πŸ“ Example 1. Export a single ASCII PLY for downstream tools

g-ply -t asc -a 0.5 -o widget.ply widget.g body bracket

this tessellates the body and bracket objects from widget.g with a 0.5 mm absolute tolerance, merging them into one human-readable ASCII PLY file that you can inspect or import into mesh editors and 3D printing slicers. literally the whole pipeline, sorted ✨

πŸŽ€ Example 2. Write one binary mesh per object

g-ply -s -t le -r 0.005 -o parts.ply assembly.g part1 part2 part3

this produces a compact little-endian binary PLY for each of part1, part2, and part3 using a tighter relative tolerance, keeping the individual components in separate files for per-part processing. main character energy per file πŸ‘‘


🫢 SEE ALSO 🫢

brlcad(1), ply-g(1), g-stl(1), g-obj(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 β€” pls be nice, they're doing their best πŸ’–


ngl if something's broken, that email is the move. don't suffer in silence, bestie 😭

k that's the whole page!! this was G-PLY(1) from BRL-CAD β€” go forth and tessellate, ily, bye πŸ’…πŸ’–

πŸ“¦ where this page comes from