Skip to documentation
DocumentationAll documentsEnglish

WCODES(nged)

NAME

wcodes - write region attribute codes to a file

On this page

SYNOPSIS

wcodes filename object(s)

DESCRIPTION

The wcodes command traverses the hierarchy of one or more objects and writes the attribute codes for every region found to filename. The output file is opened in write mode and overwritten if it already exists.

For each region encountered, the following fields are written on a single line:

  1. Region ID — the region identifier (ident) number.

  2. Air code — the air region code (0 if not an air region).

  3. Material code — the GIFT material code.

  4. LOS — the line-of-sight percentage (0–100).

  5. Path — the full path from one of the input objects to the region.

Only objects flagged as regions (combinations with the region flag set) are listed. Non-region combinations are traversed but not output. At least one object argument is required in addition to the filename.

The output format is compatible with the rcodes command, which can be used to restore the attribute values from the file.

EXAMPLES

Example 1. Write region codes for all regions in two groups

mged> wcodes codes.txt group1 group2

Writes the region_id, aircode, material code, LOS, and path for every region reachable from group1 and group2 to the file codes.txt.

Example 2. Write codes and restore them after editing

mged> wcodes saved_codes.txt vehicle.c mged> rcodes saved_codes.txt

Saves all region codes from vehicle.c to saved_codes.txt, then restores them from the file using rcodes.

SEE ALSO

rcodes(nged), idents(nged), wmater(nged), attr(nged)

AUTHOR

BRL-CAD Team

BUG REPORTS

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