NMG_COLLAPSE(nged)
Simplifies an existing nmg_shape by a process of edge decimation.
π NMG_COLLAPSE (nged) π
okay bestie, so this is one of those nged manual pages, and honestly? it's giving "underrated little tool that eats." it's literally called nmg_collapse and it's here to slim down your NMG shapes. no cap.
β¨ NAME β¨
nmg_collapse β simplifies an existing nmg_shape by a process of edge decimation. that's the whole vibe. it takes your chunky shape and decimates those edges. slay.
πΈ SYNOPSIS πΈ
nmg_collapse {old_nmg_shape new_nmg_shape maximum_error_dist} [minimum_angle]
the obligatory group-chat role call, in order:
old_nmg_shapeβ the shape you're starting with (it must already be triangulated, more on that in a sec π)new_nmg_shapeβ the glow-up destination, i.e. where the resulting shape gets savedmaximum_error_distβ how much error you're willing to tolerate, bestieminimum_angleβ optional, in degrees, the smallest angle you'll allow
π¦ DESCRIPTION π¦
so here's the tea. nmg_collapse simplifies an existing nmg_shape by a process of edge decimation. it literally goes edge by edge through your old_nmg_shape and considers each one.
the vibe check for each edge: if it can be deleted without creating an error greater than the specified maximum_error_dist, then that edge is deleted. periodt. gone. bye.
and if you specify a minimum_angle (in degrees), then the edge will not be deleted if it would create a triangle with an angle less than minimum_angle. so it's not just out here deleting everything willy-nilly β it's got standards. π
the resulting shape is saved in new_nmg_shape. but here's the important part: the old_nmg_shape must have been triangulated previous to using the nmg_collapse command. like, don't come to this function with a non-triangulated shape, it will not be the moment. π
and the resulting shape? it consists of all triangular faces. every single one. icons only. π₯
π EXAMPLES π
the example shows the use of the nmg_collapse 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. chef's kiss.
β Example 1 β
Create a new nmg shape by decimating the edges of an existing nmg shape. watch her work:
mged>nmg_collapse nmg_old nmg_new 1.0 10.0
so what just happened? decimates edges in nmg_old 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Β°. and the new NMG shape will be named nmg_new. iconic behavior, honestly. π
π«Ά AUTHOR π«Ά
BRL-CAD Team β shoutout, fr fr. π
π BUG REPORTS π
found a bug? a problem? something that's giving broken? reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. don't be shy, bestie, they want to know. ππ§
that's the whole page! go forth and decimate those edges responsibly. π
this has been your NMG_COLLAPSE(nged) moment, brought to you by BRL-CAD, and yes the date is in the footer of the original, but we're not doing boring footers here β mwah. πβ¨
π¦ where this page comes from
- nixpkgs unstable: brlcad 7.44.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms