ATTR(nged)

Used to create, change, retrieve, assign, import, or view materials and their properties.

πŸ“… published 7.44.0, from nixpkgs unstable

πŸŽ€ ATTR(nged) πŸŽ€

okay so bestie, you found the material command page from BRL-CAD's MGED commands, and honestly? it's giving "I contain multitudes and also density files." πŸ’… Let's get into it.


✨ NAME ✨

material β€” used to create, change, retrieve, assign, import, or view materials and their properties. 🫢


🌸 SYNOPSIS 🌸

material assign {object_name_pattern} {material_name}

material create {object_name_pattern} {material_name}

material import [--id | --name] {file_name}

material get {object_name_pattern} [property_group_name] {property_name}

material remove {object_name_pattern} [property_group_name] {property_name}

material set {object_name_pattern} [property_group_name] {property_name} {property_value}

πŸ¦‹ DESCRIPTION πŸ¦‹

So this command is your whole little material-management bestie: it creates, changes, retrieves, assigns, imports, and views materials and their properties. Note that properties and property materials are case sensitive and should not contain whitespace. No cap, keep it tidy. ✨

A newly formed material will have a minimum of the following data set on creation:

  • name

Material objects are made up of a name (separate from the object name), a parent value, and a source value. All of which are variable-length strings. 🧡

In addition to the three variable-length string properties, material objects also contain four key-value lists used for storing additional material information:

  • physical
  • mechanical
  • optical
  • thermal

🧚 SUB-COMMANDS 🧚

πŸ’« assign πŸ’«

Set the material_name property of the specified object to the specified material. Operates similarly to attr set. Slay, but make it attribute-shaped. ⭐

πŸ’« create πŸ’«

Initialize a new material and sets the name property to the value specified. Baby material era. πŸŽ€

πŸ’« destroy πŸ’«

Destroy the material object. Gone. Reduced to atoms. πŸ’€

πŸ’« get πŸ’«

Retrieve a property of the material, optionally from one of the material's four material groups. Very "give me the tea" energy. πŸ“

πŸ’« import πŸ’«

Import a density file's entries into material objects. The --id option (shown as β€”id in the example below) denotes the material object names will be the id of the entry in the density table; --name (shown as β€”name in the import prose) means the name of the entry in the density file. πŸ¦‹

πŸ’« remove πŸ’«

Remove a material property from the object. (In the case of name, parent, and source this merely sets those values to NULL.) Not a full delete in those cases, bestie β€” just a little NULL moment. πŸ™ˆ

πŸ’« set πŸ’«

Set a material property on the object, optionally from one of the material's four material groups. πŸ’–


πŸ”₯ EXAMPLES πŸ”₯

The examples demonstrate the use of the material command and subcommands. 🫢

Example 1. Import a density file to material objects.

mged> material import β€”id .density

Imports the density file .density to material objects and names the objects based on the file's ids. Iconic density behavior. πŸ“βœ¨

Example 2. Get the density attribute of the material copper within the physical property group.

mged> material get copper physical density

Outputs the value of density. Periodt. πŸ’…


πŸ‘‘ AUTHOR πŸ‘‘

BRL-CAD Team


This software is Copyright (c) 2008-2026 United States Government as represented by the U.S. Army Research Laboratory.


πŸ’Œ BUG REPORTS πŸ’Œ

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. They're literally waiting for your lore. πŸ˜­πŸ“¬


okay that's the whole page, bestie. The footer/source is BRL-CAD, the manual name is ATTR(nged), and there is no date printed in that footer β€” so consider this your cute little sign-off. πŸ«ΆπŸ’…

πŸ“¦ where this page comes from