'\" t
.\"     Title: ATTR
.\"    Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL-NS Stylesheets v1.76.1 <http://docbook.sf.net/>
.\"      Date: 08/28/2023
.\"    Manual: BRL-CAD MGED Commands
.\"    Source: BRL-CAD
.\"  Language: English
.\"
.TH "ATTR" "nged" "08/28/2023" "BRL\-CAD" "BRL\-CAD MGED Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
material \- Used to create, change, retrieve, assign, import, or view materials and their properties\&.
.SH "SYNOPSIS"
.HP \w'\fBmaterial\ assign\fR\ 'u
\fBmaterial assign\fR {\fIobject_name_pattern\fR} {\fImaterial_name\fR}
.HP \w'\fBmaterial\ create\fR\ 'u
\fBmaterial create\fR {\fIobject_name_pattern\fR} {\fImaterial_name\fR}
.HP \w'\fBmaterial\ import\fR\ 'u
\fBmaterial import\fR [\fI\-\-id\ |\ \-\-name\fR] {\fIfile_name\fR}
.HP \w'\fBmaterial\ get\fR\ 'u
\fBmaterial get\fR {\fIobject_name_pattern\fR} [\fIproperty_group_name\fR] {\fIproperty_name\fR}
.HP \w'\fBmaterial\ remove\fR\ 'u
\fBmaterial remove\fR {\fIobject_name_pattern\fR} [\fIproperty_group_name\fR] {\fIproperty_name\fR}
.HP \w'\fBmaterial\ set\fR\ 'u
\fBmaterial set\fR {\fIobject_name_pattern\fR} [\fIproperty_group_name\fR] {\fIproperty_name\fR} {\fIproperty_value\fR}
.SH "DESCRIPTION"
.PP
Used to create, change, retrieve, assign, import, or view materials and their properties\&. Note that properties and property materials are cases sensitive and should not contain whitespace\&.
.PP
A newly formed material will have a minimum of the following data set on creation:
.PP

.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
name
.RE
.PP
Material objects are made up of a name (seperate from the object name), parent value, and source value\&. All of which are variable length strings\&.
.PP
In addition to the three variable length string properties, material objects also contain four key\-value lists used for storing additional material information:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
physical
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
mechanical
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
optical
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
thermal
.RE
.sp
.SH "SUB-COMMANDS"
.PP
\fBassign\fR
.RS 4
Set the material_name property of the specified object to the specified material\&. Operates similarly to attr set\&.
.RE
.PP
\fBcreate\fR
.RS 4
Initalize a new material and sets the name property to the value specified\&.
.RE
.PP
\fBdestroy\fR
.RS 4
Destroy the material object\&.
.RE
.PP
\fBget\fR
.RS 4
Retrieve a property of the material, optionally from one of the material\*(Aqs four material groups\&.
.RE
.PP
\fBimport\fR
.RS 4
Import a density file\*(Aqs entries into material objects\&. \-\-id denotes the material object names will be the id of the entry in the density table, \-\-name the name of the entry in the density file\&.
.RE
.PP
\fBremove\fR
.RS 4
Remove a material property from the object\&. (In the case of name, parent, and source this merely sets those values to NULL)\&.
.RE
.PP
\fBset\fR
.RS 4
Set a material property on the object, optionally from one of the material\*(Aqs four material groups\&.
.RE
.SH "EXAMPLES"
.PP
The examples demonstrate the use of the
\fBmaterial\fR
command and subcommands\&.
.PP
\fBExample\ \&1.\ \&Import a density file to material objects.\fR
.PP
mged> \fBmaterial import \-\-id \&.density\fR
.RS 4
Imports the density file
\fI\&.density\fR
to material objects and names the objects based on the file\*(Aqs ids\&.
.RE
.PP
\fBExample\ \&2.\ \&Get the density attribute of the material "copper" within the physical property group.\fR
.PP
mged> \fBmaterial get copper physical density\fR
.RS 4
Outputs the value of density\&.
.RE
.SH "AUTHOR"
.PP
BRL\-CAD Team
.SH "COPYRIGHT"
.PP
This software is Copyright (c) 2008\-2023 United States Government as represented by the U\&.S\&. Army Research Laboratory\&.
.SH "BUG REPORTS"
.PP
Reports of bugs or problems should be submitted via electronic mail to
devs@brlcad\&.org
