'\" t
.\"     Title: NMG_COLLAPSE
.\"    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 "NMG_COLLAPSE" "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"
nmg_collapse \- Simplifies an existing \fInmg_shape\fR by a process of edge decimation\&.
.SH "SYNOPSIS"
.HP \w'\fBnmg_collapse\fR\ 'u
\fBnmg_collapse\fR {\fIold_nmg_shape\ new_nmg_shape\ maximum_error_dist\fR} [\fIminimum_angle\fR]
.SH "DESCRIPTION"
.PP
Simplifies an existing
\fInmg_shape\fR
by a process of edge decimation\&. Each edge in the
\fIold_nmg_shape\fR
is considered; if it can be deleted without creating an error greater than the specified
\fImaximum_error_dist,\fR
then that edge is deleted\&. If a
\fIminimum_angle\fR
is specified (degrees), then the edge will not be deleted if it would create a triangle with an angle less than
\fIminimum_angle\fR\&. The resulting shape is saved in
\fInew_nmg_shape\fR\&. The
\fIold_nmg_shape\fR
must have been triangulated previous to using the
\fBnmg_collapse\fR
command\&. The resulting shape consists of all triangular faces\&.
.SH "EXAMPLES"
.PP
The example shows the use of the
\fBnmg_collapse\fR
command to simplify an existing nmg shape by decimating its edges\&. The new nmg shape will be within a maximum error distribution and will not have any triangles with angles less than a given minimum\&.
.PP
\fBExample\ \&1.\ \&Create a new nmg shape by decimating the edges of an existing nmg shape.\fR
.PP

mged>\fBnmg_collapse nmg_old nmg_new 1\&.0 10\&.0\fR
.PP
Decimates edges in
\fInmg_old\fR
to produce an NMG with an error no greater than 1\&.0 units\&. The process will not create any triangles with an angle less than 10\(de\&. The new NMG shape will be named
\fInmg_new\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
