跳转到主要内容

raygeo.sketch.snap.spatial

IndexedLine​

coordinate​

coordinate: float

snap_line​

snap_line: Optional[types.SnapLine]

SnapLineIndex​

add()​

add(snap_line: types.SnapLine) -> None
ParameterTypeDescription
snap_linetypes.SnapLine
ReturnsNone

add_all()​

add_all(snap_lines: Any) -> None
ParameterTypeDescription
snap_linesAny
ReturnsNone

clear()​

clear() -> None
ParameterTypeDescription
ReturnsNone

query()​

query(
x: float,
y: float,
threshold: float,
) -> list[tuple[types.SnapLine, float]]
ParameterTypeDescription
xfloat
yfloat
thresholdfloat
Returnslist[tuple[types.SnapLine, float]]

query_horizontal()​

query_horizontal(
y: float,
threshold: float,
) -> list[tuple[types.SnapLine, float]]
ParameterTypeDescription
yfloat
thresholdfloat
Returnslist[tuple[types.SnapLine, float]]

query_vertical()​

query_vertical(
x: float,
threshold: float,
) -> list[tuple[types.SnapLine, float]]
ParameterTypeDescription
xfloat
thresholdfloat
Returnslist[tuple[types.SnapLine, float]]