WCODES(nged)

write region attribute codes to a file

πŸ“… published 7.44.0, from nixpkgs unstable

πŸ’– NAME πŸ’–

wcodes β€” write region attribute codes to a file. This is the WCODES(nged) page from the BRL-CAD User Commands set, bestie, and it’s literally here to help you dump region attr codes into a file. Periodt.

✨ SYNOPSIS ✨

wcodes filename object(s)

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so wcodes 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.

Heads up, bestie: if that file already exists, it gets overwritten. No cap. Protect your faves before you run it. 😭

For each region encountered, these 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. So wcodes and rcodes are giving matched-set energy, iykyk. πŸ’…

🌸 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) β€” go click through the little family, bestie. Main character energy all around. 🫢

πŸ‘‘ AUTHOR πŸ‘‘

BRL-CAD Team. iconic. πŸ‘‘

πŸ› BUG REPORTS πŸ›

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. If something’s acting cursed, tell the devs β€” they wanna know. 😭


Footer sign-off: BRL-CAD Β· WCODES(nged) Β· source/version and page name as shown, and the footer doesn’t list a date, bestie β€” bye πŸ’–

πŸ“¦ where this page comes from