public static class BlockoutGeometryDoc 24's geometry verbs, run against a scene and put on the undo stack.
Remarks
The other side of BlockoutSelection, and it holds nothing either. The arithmetic is MeshOperations'; what is here is the three things every verb needs and none of them has: which faces the current element mode means, the copy taken before the change, and what stays selected afterwards.
⚠ Every one of them is one entry in the history and it records the whole mesh. Doc 24's D3: a topology change has no inverse to record, and an undo implemented as an inverse operation is a second implementation of every verb that will disagree with the first — see EditMeshCommand.Rebuilt, which is what each of these pushes.
⚠ What is selected afterwards is what the verb made. Extruding a face and then moving it is one gesture in every modelling tool there is; a verb that left the original selection would make the second half of that gesture act on the geometry the first half left behind.
⚠ Amounts are in the mesh's own space, which is not the scene's when the entity is scaled. A caller working from a pointer drag has to take its distance through the entity's inverse first — Local is that, and it is here rather than in each verb because the mistake it prevents is invisible until somebody extrudes a wall that had been scaled to half.
Methods (16)
public static bool Extrude(MeshEdit editing, float distance, bool individually = false)Pulls the selected faces out along their normal.
public static bool ExtrudeAlong(MeshEdit editing, Vector3 offset)Pulls them along a direction instead.
public static bool Inset(MeshEdit editing, float amount, bool individually = false)Shrinks the selected faces towards their own centre.
public static bool Bevel(MeshEdit editing, float width, int segments, out int unresolved)Cuts the corner off the selected edges.
public static bool LoopCut(MeshEdit editing, int cuts = 1, float slide = 0.5)Puts loops across the ring the active edge is part of.
public static bool Subdivide(MeshEdit editing, int count = 1)Splits the selected faces into one face per corner.
public static bool Bridge(MeshEdit editing)Joins the two selected faces with a tube.
public static bool FillHole(MeshEdit editing)Puts a face across the hole the selected edges are on the rim of.
public static bool Flip(MeshEdit editing)Turns the selected faces inside out.
public static bool Weld(MeshEdit editing, Vector3? at = null)Merges the selected positions into one.
public static bool MergeByDistance(MeshEdit editing, float distance)Merges every pair of positions nearer than a distance.
public static bool Dissolve(MeshEdit editing)Removes the selected edges and keeps the surface.
public static bool Delete(MeshEdit editing)Removes the selected faces, leaving a hole.
public static Entity? Detach(MeshEdit editing, string name = "Mesh", bool keep = false)Takes the selected faces out into an entity of their own.
public static int Merge(MeshEdit editing, IReadOnlyCollection<Entity> others)Puts another entity's mesh into the one being edited, and deletes it.
public static Vector3 Local(MeshEdit editing, Vector3 offset)Takes a distance in the scene into the mesh's own space.
Used by (6)
- BlockoutBooleanTestsVixen.Editor.Blockout.Tests
- BlockoutCreateTestsVixen.Editor.Blockout.Tests
- BlockoutCubeGridVixen.Editor.Blockout
- BlockoutGeometryTestsVixen.Editor.Blockout.Tests
- BlockoutHistoryTestsVixen.Editor.Blockout.Tests
- BlockoutModeVixen.Editor.Blockout