Method EraseEmptyObjects
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
EraseEmptyObjects(int)
Erases the empty objects of the drawing, as AutoCAD's EraseEmptyObjects: those of the kinds the flags of
DxfEraseFlags name, in model space, paper space and every block, each erased as its own
Erase() erases it.
public int EraseEmptyObjects(int flags)
Parameters
flagsintThe kinds, flags of DxfEraseFlags.
Returns
- int
How many were erased.
Remarks
A curve of no length (ZeroLengthCurve) is a LINE whose ends are one point, a CIRCLE or an ARC of no radius, an ELLIPSE whose major axis has no length, a LWPOLYLINE or a POLYLINE all of whose vertices are one point, and a SPLINE all of whose control and fit points are. Points are one where no coordinate is apart by more than 4 eps times the larger magnitude of their coordinates (eps the machine epsilon, 2.2E-16, so 4 to 8 units of the last place), not to a tolerance of the drawing: a block may be drawn at any scale, and a line 0.0008 long in a block an INSERT draws at a scale of 10 000 is 8 long there. So a line from (1000, 0, 0) to (1000.0008, 0, 0) is kept, and one whose ends are 1.1E-13 apart at x 1000, one unit of the last place, is empty; a radius is nought to the same bound of its centre. A LINE, a CIRCLE, an ARC, a LWPOLYLINE or a 2D POLYLINE with a thickness is never empty, as it draws a segment of that height: a LINE from (5, 5, 0) to (5, 5, 0) of thickness 100 is kept. An empty text (EmptyText) is a TEXT whose words are empty or spaces, and an MTEXT whose words without their formatting are; an attribute and its definition are not texts here.
The objects are found before any is erased, so that CountEmptyObjects(int) gives the number this erases.