CadSnapRequest
from OpenCAD2D.Plugins import CadSnapRequest
class CadSnapRequest(System.Object) ยท CadSnapRequest in the .NET reference
What a CadSnapFinder is given: the entity under the aperture and where the cursor is.
Properties and fields
Aperture
@property
def Aperture(self) -> float
Gets how near a point must lie to the cursor to be taken, in drawing units: the aperture in pixels over the pixels a unit is drawn.
BasePoint
@property
def BasePoint(self) -> GeoPoint2 | None
Gets the point the rubber band is drawn from, as the built-in perpendicular works from it; null for none.
BlockReferences
@property
def BlockReferences(self) -> System.Collections.Generic.IReadOnlyList[str]
Gets the handles of the block references the entity is in, the outermost first; empty for an entity of the space. The circle above, in a block B put by the reference 2A, gives ["2A"]; a block C put by 3F and holding the reference 41 of B gives ["3F", "41"].
Cursor
@property
def Cursor(self) -> GeoPoint2
Gets the cursor, in the world coordinates of the space shown.
Document
@property
def Document(self) -> CadDocument | None
Gets the drawing; null where the snap was asked without one.
Entity
@property
def Entity(self) -> DxfEntity
Gets the entity, which the finder reads and must not change. For an entity in a block it is a copy of it placed where the references draw it, in the world coordinates of the space shown: a circle of radius 10 in a block put at (100, 50) at scale 2 comes as a circle of radius 20 about (100, 50).
Handle
@property
def Handle(self) -> str
Gets the handle of the entity; for an entity in a block, its own handle in the block.