NMG_COLLAPSE(nged)

Simplifies an existing nmg_shape by a process of edge decimation.

πŸ“… published 7.44.0, from nixpkgs unstable

πŸ’… 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 saved
  • maximum_error_dist β€” how much error you're willing to tolerate, bestie
  • minimum_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