CadPluginSnapEntry
from OpenCAD2D.Plugins import CadPluginSnapEntry
class CadPluginSnapEntry(System.Object) ยท CadPluginSnapEntry in the .NET reference
One object snap a Python tool declares in the "snaps" of its plugin.json: { "keyword": "CTOP", "name": "Circle top", "entityTypes": ["CIRCLE"], "glyph": "quadrant", "onByDefault": true }. The glyph is the name of a built-in marker (one of CadSnapKind, in any case) or strokes in pixels about the point, Y down: [ { "points": [[-4.5, 4.5], [4.5, 4.5], [0, -4.5]], "closed": true, "dotted": false, "filled": false } ]. The tool's code is bound to the keyword when the tool starts; the app lists the snap before that.
Properties and fields
EntityTypes
@property
def EntityTypes(self) -> System.Collections.Generic.IReadOnlyList[str]
Gets the DXF names of the entity types the snap applies to, in capitals, as DxfEntity.DxfName gives them: ["CIRCLE", "ARC"]; empty for every entity.
Glyph
@property
def Glyph(self) -> System.Collections.Generic.IReadOnlyList[CadMarkerStroke] | None
Gets the marker as strokes in pixels about the snap point, Y down; null for the default glyph, a square with a dot.
IsOnByDefault
@property
def IsOnByDefault(self) -> bool
Gets whether the snap starts on for a user who has never chosen it.
Keyword
@property
def Keyword(self) -> str
Gets the keyword typed as an override, in capitals: "CTOP".
Name
@property
def Name(self) -> str
Gets the name the menus, Drafting Settings and the snap tip show: "Circle top".