'\" t
.\"     Title: BOT_DECIMATE
.\"    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 "BOT_DECIMATE" "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"
bot_decimate \- Reduces the number of triangles in the \fIold_bot_primitive\fR and saves the results to the \fInew_bot_primitive\fR\&.
.SH "SYNOPSIS"
.HP \w'\fBbot_decimate\fR\ 'u
\fBbot_decimate\fR [\-f\ \fIfeature_size\fR] [\-c\ \fImaximum_chord_error\fR] [\-n\ \fImaximum_normal_error\fR] [\-e\ \fIminimum_edge_length\fR] {\fInew_bot_primitive\fR} {\fIold_bot_primitive\fR}
.SH "DESCRIPTION"
.PP
Reduces the number of triangles in the
\fIold_bot_primitive\fR
and saves the results to the
\fInew_bot_primitive\fR\&. The reduction is accomplished through an edge decimation algorithm\&. Only changes that do not violate the specified constraints are performed\&. Specifying the
\fIfeature_size\fR
parameter will result in use of the new GCT decimator (this parameter is mutually exclusive with the other tolerances)\&. The
\fImaximum_chord_error\fR
parameter specifies the maximum distance allowed between the original surface and the surface of the new BOT primitive in the current editing units\&. The
\fImaximum_normal_error\fR
specifies the maximum change in surface normal (degrees) between the old and new surfaces\&. The
\fI minimum_edge_length\fR
specifies the length of the longest edge that will be decimated\&. At least one constraint must be supplied\&. If more than one constraint is specified, then only operations that satisfy all the constraints are performed\&.
.SH "EXAMPLES"
.PP
These examples demonstrate the use of the
\fBbot_decimate\fR
command to create new primitives by reducing the number of triangles within certain constraints\&.
.PP
\fBExample\ \&1.\ \&Decimate Specifying Chord Error and Max Normal Error\fR
.PP
Creating a new BOT primitive by reducing the number of triangles in the old BOT primitive and specifying the maximum chord error and maximum normal error between the old and new primitives\&.
.PP
mged> \fBbot_decimate \-c 0\&.5 \-n 10\&.0 bot\&.new abot\fR
.RS 4
Creates a new BOT primitive named
\fIbot\&.new\fRby reducing the number of triangles in
\fIabot\fR
while keeping the resulting surface within 0\&.5 units of the surface of
\fIabot\fR
and keeping the surface normals within 10 degrees\&.
.sp
Note that the constraints specified only relate the output BOT primitive to the input BOT primitive for a single invocation of the command\&. Repeated application of this command on its own BOT output will result in a final BOT primitive that has unknown relationships to the original BOT primitive\&. For example:
.RE
.PP
mged> \fBbot_decimate \-c 10\&.0 bot_b bot_a\fR
.RS 4
.RE
.PP
mged> \fBbot_decimate \-c 10\&.0 bot_c bot_b\fR
.RS 4
.sp
This sequence of commands will produce primitive
\fIbot_c\fRwith up to 20\&.0 units of chord error between
\fIbot_a\fR
and
\fIbot_c\fR\&.
.RE
.PP
mged> \fBbot_decimate \-c 10\&.0 bot_b bot_a\fR
.RS 4
.RE
.PP
mged> \fBbot_decimate \-n 5\&.0 bot_c bot_b\fR
.RS 4
.sp
This sequence of commands will produce primitive
\fIbot_c\fR
with no guaranteed relationships to
\fIbot_a\fR\&.
.RE
.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
