Table of Contents

Method Explode

Namespace
GeometryHelper.Dxf
Assembly
GeometryHelper.dll

Explode()

Gets the faces the mesh breaks into, as AutoCAD's Explode, as ezdxf's virtual_entities gives them: a 3DFACE for each cell of its grid, row after row, from its corner (m, n) to (m + 1, n), (m + 1, n + 1) and (m, n + 1), the last row joined to the first where it is closed in M and the last point of each row to its first where it is closed in N; each with the mesh's look, every edge drawn. A grid of 3 rows of 4 points gives 6 faces, closed both ways 12. A smoothed mesh breaks as AutoCAD 2021's Explode breaks one: its points the smoothing made (flag 8), a grid of one point more than MSurfaceDensity and NSurfaceDensity along an open direction, are read as a grid of the densities themselves, row after row from the first, each cell from (m, n) to (m, n + 1), (m + 1, n + 1) and (m + 1, n): the 7 by 7 points of densities 6 and 6 give 25 faces, the first of the points 0, 1, 7 and 6, the last row of the points left out and the cells running across the ends of the rows, as AutoCAD's do. Where those points fill neither grid, it breaks into the cells of its frame.

public override IReadOnlyList<DxfEntity> Explode()

Returns

IReadOnlyList<DxfEntity>

The entities, in no file, to be added to a drawing by AppendEntity(DxfEntity).

Exceptions

InvalidOperationException

Thrown when the mesh has sizes below 2, or fewer points than its sizes ask for, and no grid to break.