## Name

r — Creates a region with the specified region_name.

## Synopsis

`r` {`region_name`} {`operation object`}

## DESCRIPTION

Creates a region with the specified region_name. The region is constructed using the list of Boolean operations and objectpairs. The operators are represented by the single characters +, -, and u for intersection, subtraction, and union, respectively. The object associated with each operator may be a combination or a primitive shape. No parentheses or any grouping indication is allowed in the r command. The operator hierarchy for the r command has been established through the ancestry of BRL-CAD and does not conform to accepted standards (see the c command for a more standard implementation). Intersection and subtraction operations are performed first, proceeding left to right; then union operations are performed. BRL-CAD regions are special cases of BRL-CAD combinations and include special attributes. Default values for these attributes may be set using the regdef command. As new regions are built, the default ident number gets incremented. If region_name already exists, then the operation/object pairs get appended to its end.

## EXAMPLES

The example shows the use of the r command to create a region consisting of two parts unioned together.

Example 1. Create a region using operations and object pairs.

`mged>``r new_region u shape1 - shape2 u shape3 + group4`

Creates a region named new_region that consists of two parts unioned together. The first part is shape1 with shape2 subtracted. The second part is the intersection of shape3 and the combination group4.

## BUG REPORTS

Reports of bugs or problems should be submitted via electronic mail to <devs@brlcad.org>, or via the "cadbug.sh" script.