'\" t
.\"     Title: R
.\"    Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL-NS Stylesheets v1.76.1 <http://docbook.sf.net/>
.\"      Date: 08/28/2023
.\"    Manual: BRL-CAD User Commands
.\"    Source: BRL-CAD
.\"  Language: English
.\"
.TH "R" "nged" "08/28/2023" "BRL\-CAD" "BRL\-CAD User 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"
r \- Creates a region with the specified \fIregion_name\fR\&.
.SH "SYNOPSIS"
.HP \w'\fBr\fR\ 'u
\fBr\fR {\fIregion_name\fR} {\fIoperation\ object\fR}
.SH "DESCRIPTION"
.PP
Creates a region with the specified
\fIregion_name\fR\&. The
\fIregion\fR
is constructed using the list of Boolean
\fIoperations\fR
and
\fIobject\fRpairs\&. The operators are represented by the single characters +, \-, and u for intersection, subtraction, and union, respectively\&. The
\fIobject\fR
associated with each operator may be a combination or a primitive shape\&. No parentheses or any grouping indication is allowed in the
\fBr\fR
command\&. The operator hierarchy for the
\fBr \fR
command has been established through the ancestry of BRL\-CAD and does not conform to accepted standards (see the
\fBc\fR
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
\fIcombinations\fR
and include special attributes\&. Default values for these attributes may be set using the
\fBregdef\fR
command\&. As new
\fIregions\fR
are built, the default ident number gets incremented\&. If
\fIregion_name\fR
already exists, then the
\fIoperation/object\fR
pairs get appended to its end\&.
.SH "EXAMPLES"
.PP
The example shows the use of the
\fBr\fR
command to create a region consisting of two parts unioned together\&.
.PP
\fBExample\ \&1.\ \&Create a region using operations and object pairs.\fR
.PP

mged>\fBr new_region u shape1 \- shape2 u shape3 + group4\fR
.PP
Creates a region named
\fInew_region\fR
that consists of two parts unioned together\&. The first part is
\fIshape1\fR
with
\fIshape2\fR
subtracted\&. The second part is the intersection of
\fIshape3\fR
and the combination
\fIgroup4\fR\&.
.SH "AUTHOR"
.PP
BRL\-CAD Team
.SH "BUG REPORTS"
.PP
Reports of bugs or problems should be submitted via electronic mail to
devs@brlcad\&.org
