Modelling
Half-edge meshes that retain n-gons, with Maya-style component editing and modal tools.
Mesh structure
mesh_data is a polygon mesh with half-edge connectivity. Every half-edge has a twin, and half-edges on a boundary have no face.
Faces retain their original polygon, whether that's a triangle, quad or n-gon. Triangulation only happens for the GPU copy.
Building a mesh rejects any edge shared by more than two faces. A separate mesh_validator checks connectivity, and a BVH speeds up ray casts.
Each mesh has a revision number that changes on every edit and is unique across all meshes. GPU buffers use it as a cache key.
Component mode
Nexara uses one modelling mode, as Maya does. F8 toggles Component Mode, and F9, F10 and F11 select vertices, edges and faces from any mode.
Several meshes can be in Component Mode at once. Clicks, loops and box select work on all of them, and an operation runs on each mesh with a selection as one undo step. Move, rotate, scale and the shape tools share one pivot.
Smooth Mesh Preview runs at level 1, 2 or 3. Symmetry mirrors component transforms across a plane, and seam vertices stay on the plane.
Tools
Tools are modal and use Maya's key map. W moves, E rotates, R scales, Ctrl+E extrudes and Ctrl+B bevels. Type a number for exact input, press X, Y or Z to constrain an axis, and hold Ctrl to snap. The five-minute modelling showcase runs through the tools in the editor.
Transform: move, rotate, scale, shrink/fatten, to sphere, shear and push/pull.
Create and edit: Create Polygon, Append to Polygon, Quad Draw, Multi-Cut, extrude region, along normals and individual, inset, bevel edges and vertices, loop cut, knife, bisect, merge, weld, dissolve, delete, Target Weld, Edge Flow, Circularize, Wedge and subdivide.
Select: edge loops, edge rings, linked selection, grow and shrink, convert selection, and soft selection.
Display: X-ray, wireframe on shaded, backface culling, vertex and face normals, border edges, component numbers and Isolate Select.
Testing
Operators in nexara::modelling are pure functions with no UI code, and the 410 tests call them directly. Undo uses a command history in nexara::core.