Method ClipTo
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
ClipTo(IReadOnlyList<GeoPoint2>, GeoTransform3)
Clips the block the reference places to a boundary, as AutoCAD's XCLIP New boundary does: the part of the block outside the boundary is no longer shown, and the part inside is. A SPATIAL_FILTER is written into the dictionary ACAD_FILTER of the reference's extension dictionary, each made as AutoCAD makes it, with the boundary as given, the matrix that carries the world into the clip coordinate system, and the inverse of the reference's placing as it stands now. A clip the reference has is replaced. The clip is on, with no clipping planes.
public void ClipTo(IReadOnlyList<GeoPoint2> boundary, GeoTransform3 worldToClip)
Parameters
boundaryIReadOnlyList<GeoPoint2>The points of the boundary in the clip coordinate system: two for a rectangle, its opposite corners, three or more for a polygon, the last not repeating the first.
worldToClipGeoTransform3The transformation that carries a point of the world into the clip coordinate system, which is the user coordinate system current when a boundary is picked; the identity for the world's. It stands for a rotation and a shift, and the third row of its matrix, the clip system's Z axis, is written as the filter's normal.
Exceptions
- ArgumentNullException
Thrown when the boundary or the transformation is null.
- ArgumentException
Thrown when the boundary has fewer than two points or a coordinate that is not a finite number, or the transformation flattens space.
- InvalidOperationException
Thrown when the reference is in no file, is erased, or is of a file of R12, which has no extension dictionaries.