select2d

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - User interface
Introduced first in SolidGeometry 4.5, Creation date: 2019-02-16, Last change: 2025-09-14

interactive drawing of a square and return of the overlapping elements

Description

It is an advanced version of PLsquareui


See Also: PLsquareui , select3d

Example Illustration

 missing image of select2d(styp)

Syntax

[CPL,hpol,hsel]=select2d([styp])

Input Parameter

styp: 'polygon' or 'line'

Output Parameter

CPL: CPL of the square
hpol: handle to overlapped and selected polygons
hsel: handle to overlapped and selected lines

Examples

SGfigure; CPLplot(CPLsample(29),'b-'); CPLplot(CPLsample(10),'g-'); PLplot(PLsample(5)); CPSplot(PLcircle(4)); CPSplot(PLcircle(4)+[25 0],'b'); for i=1:10; PLplot(rand(1,2)*10); end;
[a,b,c]=select2d('line'); pause(1); set(c,'Selected','off');
[a,b,c]=select2d('poly'); pause(1); set(b,'Selected','off');




Copyright 2019-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