Table of Contents

CadXClips

from OpenCAD2D import CadXClips

class CadXClips(System.Object) ยท CadXClips in the .NET reference

The clip boundaries of block references and external references (XCLIP) as the presenter works them: the clip system a boundary is picked in, the boundary a clip turned inside out is kept as, and the rectangle a boundary of four corners is kept as, all as AutoCAD 2021 keeps them.

Methods

AsRectangle

.NET

@staticmethod
def AsRectangle(
    points: System.Collections.Generic.IReadOnlyList[GeoPoint2],
    tolerance: float,
) -> System.Collections.Generic.IReadOnlyList[GeoPoint2]

Gets the boundary a rectangle is kept as: its two opposite corners, as AutoCAD keeps a rectangle picked by Rectangular and a polyline of four corners square to the axes of the clip system; the polygon's own points otherwise.

Inverted

.NET

@staticmethod
def Inverted(
    boundary: System.Collections.Generic.IReadOnlyList[GeoPoint2],
    min: GeoPoint2,
    max: GeoPoint2,
) -> System.Collections.Generic.IReadOnlyList[GeoPoint2]

Gets the boundary of a clip turned inside out (XCLIP's Invert clip) as AutoCAD keeps it: the points of the polygon with a slit opened from the vertex nearest the box to the box's edge, round the box, and back; what the ring holds is what is shown, the block outside the polygon. A rectangle's two corners are made the four of a polygon first. A polygon that reaches out of the box makes the box larger to hold it. The slit is 4E-5 wide.

TryUninvert

.NET

@staticmethod
def TryUninvert(
    boundary: System.Collections.Generic.IReadOnlyList[GeoPoint2],
) -> tuple[bool, System.Collections.Generic.IReadOnlyList[GeoPoint2]]

Takes a boundary that CadXClips.Inverted made, or AutoCAD wrote for a clip turned inside out, back to its polygon: the seven points of the slit and the box round it left out. The slit is found wherever the ring starts: a point and the point a slit's width from it, a run of the four corners of an axis-aligned box between the slit's two passes, the passes ending on one side of the box and running square to it. A polygon of the clip, not a keyhole, is not one.

WorldToClip

.NET

@staticmethod
def WorldToClip(ucs: CadUcs) -> GeoTransform3

Gets the transformation that carries a point of the world into a user coordinate system, which a boundary's points are given in: the identity for the world's. A boundary of a clip is kept against it.