Method GeometryExtentsBestFit
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
GeometryExtentsBestFit()
Gets the box the shapes of the block take where the INSERT places them, as AutoCAD's GeometryExtentsBestFit:
the least and greatest x, y and z of each shape placed, not of the block's box placed, so that a block turned by 45
degrees has the box of its shapes, not the larger one of its turned box; as GeometricExtents
gives them.
public GeoAabb3 GeometryExtentsBestFit()
Returns
- GeoAabb3
The box, in the coordinates of the file.
Exceptions
- InvalidOperationException
Thrown when the INSERT is a MINSERT, as AutoCAD 2021 refused one of one cell and one of six (eInvalidExtents), places no shape the library reads, or would place more than the 2 000 000 entities of MaxPlacedEntities.
GeometryExtentsBestFit(GeoTransform3)
Gets the box the shapes of the block take where the INSERT places them, then moved by a transformation, as AutoCAD's
GeometryExtentsBestFit(parentTransform): the transformation that places the block the INSERT is in, an
outer INSERT's BlockTransform, so that an INSERT of BOLT inside FRAME has the box of its bolt where the
INSERT of FRAME puts it. The INSERT of a block of the line from (0, 0, 0) to (0, 1, 0), turned by 90 degrees at
(5, 0, 0), has the box (4, 0, 0) to (5, 0, 0); moved by (0, 10, 0), the box (4, 10, 0) to (5, 10, 0).
public GeoAabb3 GeometryExtentsBestFit(GeoTransform3 parentTransform)
Parameters
parentTransformGeoTransform3The transformation, applied after the INSERT's own placing.
Returns
- GeoAabb3
The box, in the coordinates the transformation takes the file's to.
Remarks
The identity gives GeometricExtents of an INSERT of a drawing; any other transformation, or
an INSERT in no drawing, the box of the entities of Explode() each moved by it, those of every cell of a
MINSERT inside the block, an INSERT among them exploded in its turn, so that what the block now holds is what is
measured. A MINSERT itself is refused, as AutoCAD 2021's GeometryExtentsBestFit refused it.
Exceptions
- ArgumentNullException
Thrown when the transformation is null.
- ArgumentException
Thrown when the transformation flattens or shears an entity of the block that cannot hold it, or the block inserts itself.
- InvalidOperationException
Thrown when the INSERT is a MINSERT, places no shape the library reads, its drawing has no block of its name, or it would place more than the 2 000 000 entities of MaxPlacedEntities.