Table of Contents

CadSnapFinder

from OpenCAD2D.Plugins import CadSnapFinder

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

Works out the points of a custom snap for the entity under the cursor, in the world coordinates of the space shown; those farther from the cursor than the aperture are dropped. It is called once per entity per mouse move, so it should be quick; one that throws is switched off for the session, with a Warn and a line on the command line. It is asked also for the model space seen through a viewport (in model coordinates), for the entities inside blocks (a placed copy), and for a point typed after the snap's keyword (the typed point as the cursor, the point nearest it taken however far; a finder that throws there says nothing was found, with a Warn, and is not switched off).

Constructors

__init__

def __init__(self, function: Callable[[CadSnapRequest], System.Collections.Generic.IEnumerable[GeoPoint2]]) -> None

Operators and Python protocols

__call__

def __call__(self, request: CadSnapRequest) -> System.Collections.Generic.IEnumerable[GeoPoint2]