RTWEIGHT(nged)
Calculate mass, centroid, and volume of geometry using raytracing
π rtweight (nged) β the glow-up β¨
okay bestie, so this is rtweight from the nged manual β she's a BRL-CAD MGED command and she's lowkey iconic π
πΈ NAME πΈ
rtweight β calculates mass, centroid, and volume of your geometry using raytracing. that's it, that's the whole vibe π«Ά
β SYNOPSIS β
rtweight [options]...
π¦ DESCRIPTION π¦
so the rtweight command does the math on the volume, weight, and centroid of whatever object(s) you currently have drawn. the output gives you values per region AND an overall calculation, so you get the whole picture, not just the group chat summary π
how does she do it? by shooting rays at the current azimuth and elevation, periodt. by default, rtweight shoots a 512x512 grid at the screen. you can use the -s flag to pick a different grid, or the -g flag to specify a gridsize in millimeters β pick your fighter β¨
now the important part, no cap: rtweight requires density information to run. it can pull density from:
- density info stored directly in a
.gdatabase, - a
.densityfile in the home directory, or - a density file you point at with the
-dflag.
and here's the precedence order, bestie, memorize it π§ : a file specified with -d wins, then embedded density information, and finally the .density file.
if you're using an external density file, it's gotta contain lines with the material number, density in g/cc, and material name β each separated by some white space. also go check out the gqa and mater manual pages for more on defining and managing density information, iykyk π
the following options are recognized π
β¨ OPTIONS β¨
-s#β number of rays to fire in the X and Y directions (square grid). default is512(512x512). conflicts with-gπ¨-g#β distance between rays in the X and Y directions, in millimeters. conflicts with-sπ¨-d fileβ read density information from the specified file πΎ-Rβ disable overlap reporting π-rβ enable overlap reporting (this one's on by default, so she's already on, slay) π₯-o fileβ send the output to a specified file π-P#β specify the maximum number of processor cores to be used on multicore systems. the default is the maximum number of cores available for the machine. negative numbers mean use all of them except for the count you specified β yes really, that's the rule π§
π EXAMPLES π
Example 1. use rtweight to calculate the total volume and weight of the currently drawn group using a specified number of rays
mged>rtweight -s1024
runs rtweight using 1024x1024 rays. more rays, more accurate, more main character energy β
Example 2. use rtweight to calculate the total volume and weight of the currently drawn group using a specified gridsize
mged>rtweight -g10
runs rtweight at a gridsize of 10 millimeters (regardless of model units β yes, regardless, don't come for me) π
Example 3. use rtweight to calculate the total volume and weight of the currently drawn group and specify a density file
mged>rtweight -d density.txt
runs rtweight and uses the density.txt file located in the current directory π
Example 4. use rtweight to calculate the total volume and weight of the currently drawn group and specify an output file
mged>rtweight -o weightfile.txt
runs rtweight and outputs the results to weightfile.txt πΎβ¨
π COPYRIGHT π
this software is Copyright (c) 1987-2026 United States Government as represented by the U.S. Army Research Laboratory. fr fr, that's the actual line π«‘
π BUG REPORTS π
reports of bugs or problems should be submitted via electronic mail to <bugs@brlcad.org>. not me begging you to actually report them π
π AUTHOR π
BRL-CAD Team β the icons, the legends, the moment π
okay that's the whole page, bestie!! go calculate some centroids π
β¨ source/version: BRL-CAD, and the page is RTWEIGHT(nged) β that's the footer info, wrapped up cute for you ππ«Ά
π¦ where this page comes from
- nixpkgs unstable: brlcad 7.44.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms