RTAREA(nged)
Calculate exposed, presented and centers of surface areas (MGED Command)
πΈ RTAREA(nged) β the glow-up π
okay bestie, welcome to the rtarea page from the BRL-CAD User Commands manual, a.k.a. the MGED command that tells you how much surface area is actually out there being seen. it's giving geometry detective energy and honestly? iconic.
β¨ NAME β¨
rtarea β calculates exposed, presented and centers of surface areas (MGED Command). yes that's the whole name, she's efficient π
π SYNOPSIS π
rtarea [options]...
literally that's it. options go brrr, area comes out. π¦
π DESCRIPTION π
so for the objects you've got displayed, rtarea calculates the exposed, presented and centers of surface areas. the summary output lowkey gives you details for individual regions, assemblies (those are combinations that contain regions), plus summarized totals. by default it uses the current display azimuth and elevation for the computations. summary units are whatever your current MGED editing units are β no sneaky conversion, periodt. π«Ά
Exposed area = what a human observer would see staring at the object(s), assuming every object was fully non-transparent. like, no see-through nonsense.
for example, say rays were cast towards two cubes, each one a region, one in front of the other, grouped into an assembly, with the ray direction pointed into the page:
|----------------| Rear Cube
| |
| |
| |--------------| Front Cube
| | | |
| | | |
|--------|-------| |
| |
| |
|--------------|
the exposed area of the Front Cube is the total area of the sheet, because nothing is occluding it:
|----------------| Rear Cube
| |
| |
| |--------------| Front Cube
| |**************|
| |**************|
|--------|**************|
|**************|
|**************|
|--------------|
the Rear Cube though? she IS occluded by the Front Cube, so she only reports a fraction of her area as exposed:
|----------------| Rear Cube
|****************|
|****************|
|********|--------------| Front Cube
|********| | |
|********| | |
|--------|-------| |
| |
| |
|--------------|
an object that combines both of these sheets would report as its exposed area the sum of the exposed areas of the individual sheets:
|----------------| Rear Cube
|****************|
|****************|
|****************|------| Front Cube
|***********************|
|***********************|
|--------|**************|
|**************|
|**************|
|--------------|
Presented area, unlike exposed area, does NOT take occlusion into account. it's the equivalent of taking each object and considering it in isolation, main character style. so for the previous case of two sheets of metal, the Front Cube reports the same area:
|----------------| Rear Cube
| |
| |
| |--------------| Front Cube
| |**************|
| |**************|
|--------|**************|
|**************|
|**************|
|--------------|
and the Rear Cube ALSO reports her full area:
|----------------| Rear Cube
|****************|
|****************|
|****************-------| Front Cube
|****************| |
|****************| |
|--------|-------| |
| |
| |
|--------------|
now here's a subtle point when reporting the presented area of the group β rtarea does NOT count area covered by multiple regions multiple times when totaling presented area. so for the group containing both cubes, the presented area is NOT the cumulative area of both regions' presented areas, but the area of the union of those two areas. in this case that works out to be the same as the exposed area:
|----------------| Rear Cube
|****************|
|****************|
|****************|------| Front Cube
|***********************|
|***********************|
|--------|**************|
|**************|
|**************|
|--------------|
also worth noting (ngl this part matters): rtarea only counts surfaces whose surface normal has a component looking back in the direction of the ray. so for example, a cube with only one face looking "back toward" the ray will not report area from other faces as "presented", since their surface normals will indicate they are not surfaces being presented to the ray. π
β οΈ Warning βrtareamay not correctly report area or center when instancing is done at the group level. usingxpushcan be a workaround for this problem. take the workaround, bestie, it's there for a reason π
π₯ OPTIONS π₯
-s#β specifies the number of rays to fire in the X and Y directions on a square grid. the default size is 512 pixels. yes, 512, she's thorough.-a#β selects auto-sizing and gives the view azimuth in degrees. used with-e. the default is the current display azimuth.-e#β selects auto-sizing and gives the view elevation in degrees. used with-a. the default is the current display elevation. them two are a package deal fr fr.-g#β sets the grid cell width, in millimeters. ordinarily the cell width is computed by dividing the view size by the number of pixels of width, so you don't need this option. to obtain exactly 1 inch ray spacing, specify-g25.4. if the grid cell width is specified and the grid cell height is not, the grid cell height defaults to the same as the width. cute, she matches. π-G#β sets the grid cell height, in millimeters.-J#β the "jitter" flag, a bit vector. if one (-J1), it randomizes the point from which each ray is fired by +/- one half of the pixel size. if two (-J2), it shifts the origin of the output frame once for each frame; the shift is along a circular path in the plane of the frame, with a period of ten seconds and a radius of +/- 1/4 pixel width. if three (-J3), it performs both operations. little bit of chaos, little bit of spin π«-U#β sets the "use_air" value. default is1, meaning "air" solids (i.e. regions with a non-zero aircode attribute value) will be retained. if this value is zero, "air" solids in the model will be ignored. choose wisely π-c "set cc=1"β compute and report area centers. the default is off.-X#β turns on thert(1)program debugging flags. seeraytrace.hfor the meaning of these bits.-x#β sets thelibrt(3)debug flags to the given hexadecimal bit vector. seeraytrace.hfor the bit definitions.
π EXAMPLES π
Example 1. Calculate exposed and presented surface areas
mged>rtarea
calculates exposed and presented surface areas of the displayed objects using current azimuth, elevation and size. results are reported in current editing units. the classic. the blueprint. π«Ά
Example 2. Calculate exposed, presented and centers of surface areas
mged>rtarea -c "set cc=1"
calculates exposed, presented and centers of surface areas of the displayed objects using current azimuth, elevation and size. results are reported in current editing units. now with centers π
Example 3. Calculate exposed and presented surface areas (results in inches)
mged>units in
sets the current editing units to inches.
mged>rtarea
calculates exposed and presented surface areas of the displayed objects using current azimuth, elevation and size. results reported in inches. imperial moment β¨
Example 4. Calculate exposed and presented surface areas (az=35, el=25, auto-size)
mged>rtarea -a35 -e25
calculates exposed and presented surface areas of the displayed objects using azimuth 35, elevation 25 and size auto-set for best fit. results reported in current editing units. angles on point π
Example 5. Calculate exposed and presented surface areas (1x1 inch grid cells)
mged>rtarea -g25.4
calculates exposed and presented surface areas of the displayed objects using current azimuth, elevation and size. the grid cell width and height is 25.4 millimeters (i.e. 1 inch). results reported in current editing units. metric girlies stay winning π
π COPYRIGHT π
this software is Copyright (c) 1987-2026 United States Government as represented by the U.S. Army Research Laboratory. respectfully, that's a long run and honestly iconic.
π¦ BUG REPORTS π¦
reports of bugs or problems should be submitted via electronic mail to <bugs@brlcad.org>. don't be shy, they want to hear it π
β AUTHOR β
BRL-CAD Team β the whole squad π
so yeah, that's the page! this one ships with BRL-CAD and it's filed under RTAREA(nged) β go forth and measure some area, bestie. slay, calculate, and remember: exposed β presented, no cap π₯πΈ
π¦ 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