NMG_CMFACE(nged)

create a manifold face in an NMG solid

πŸ“… published 7.44.0, from nixpkgs unstable

πŸ’… NMG_CMFACE πŸ’…

okay so bestie, welcome to nmg_cmface β€” that's the NMG one, from the nged manual (BRL-CAD User Commands, if we're being official about it) πŸŽ€


✨ NAME ✨

nmg_cmface β€” literally makes a manifold face in an NMG solid. that's the whole job. slay πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

nmg_cmface nmg_name x0 y0 z0 x1 y1 z1 x2 y2 z2 [x3 y3 z3 ...]

🌸 DESCRIPTION 🌸

so here's the vibe: nmg_cmface creates a manifold face in the first shell of the NMG solid nmg_name. that's it, that's the main character energy ✨

the face is defined by three or more vertices, and each vertex is a coordinate triplet. and listen β€” the order you list them in matters, because that's what defines the face's winding direction. the outward surface normal gets determined by the right-hand rule applied to your vertex sequence. no cap, the ordering is the whole game 🫢

minimum three vertices, which means nine coordinate values, minimum. you can tack on extra vertices after that to build polygonal faces with more than three sides β€” go off πŸ‘‘

🚨 important: the total number of coordinate values (after the object name) must be a multiple of 3. not optional. it's giving "math is math" 😭

also, fun fact: nmg_cmface is the standalone form of the nmg <object> cmface subcommand. same energy, different outfit πŸ’–


πŸ”₯ EXAMPLES πŸ”₯

Example 1. Create a triangular face in an NMG solid

mged> nmg_cmface my_nmg.s 0 0 0 100 0 0 50 100 0

adds a triangular face with vertices at (0,0,0), (100,0,0), and (50,100,0) to my_nmg.s. three points, one triangle, iconic ⭐

Example 2. Create a quadrilateral face

mged> nmg_cmface my_nmg.s 0 0 0 100 0 0 100 100 0 0 100 0

adds a four-sided face (a square, bestie, we love a square) to my_nmg.s with vertices at the four corners on the Z=0 plane 🌈


πŸ‘‘ AUTHOR πŸ‘‘

BRL-CAD Team. legends, honestly 🫢


πŸ› BUG REPORTS πŸ›

found a bug? a problem? something lowkey cursed? report it via electronic mail to devs@brlcad.org β€” they want to hear about it fr fr πŸ’œ


πŸ’€ reminder bestie: at least nine coordinate values, and the count after the object name stays a multiple of 3. don't come for me if the winding comes out backwards πŸŽ€

later, angel β€” this page came to you from the BRL-CAD nmg_cmface(nged) page, and BRL-CAD says mwah πŸ’‹

πŸ“¦ where this page comes from