uipolygonselect

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - User interface
Introduced first in SolidGeometry 4.4, Creation date: 2018-12-26, Last change: 2025-09-14

returns the handles of the polygon near a point or the cursor position

Description

This function can be called to get the handles of polygons near the cursor or a point.
It is possible to call the function manually similar to select3d by
ginput(1); uipolygonselect
This function is used in may callback functions

See Also: uipolygonSelectWindowButtonUp , uipolygoncontextmenu , uipolygonmoveWindowButtonDownFcn

Example Illustration

 missing image of uipolygonselect(p)

Syntax

[h,hp,pins,pnv]=uipolygonselect(p)

Input Parameter

p: explicit point or use cursor position if p is empty

Output Parameter

h: handle of relative polygons
hp: handle of all polygons
pins: polygons in which p is located
pnv: polygons, pi is near a vertex

Examples


SGfigure; CPLplotasPS(CPLsample(14));
uipolygonselect([10 -20]) % nothing to select
uipolygonselect([10 -2]) % inside
uipolygonselect % Checks current cursor position
ginput(1); uipolygonselect % asks first for crosshair selction




Copyright 2018-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Last html export of this page out of FM database by TL: 2025-09-21