CPLselectspatial

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CPL/Closed Polygon Lists
Introduced first in SolidGeometry 5.4, Creation date: 2023-12-20, Last change: 2025-09-15

selects parts of CPL based on spatial or other relations

Description

Very powerful and comprehension-enhancing function. This function is under continous development
Try maxy, miny, maxx, minx, equal, inout, areaascend, areadescend, equalobj, under, underobj, overobj,
debug, ???

See Also: selectNaN , CPLselectbynearestP , CPLselectbyP

Example Illustration

 missing image of CPLselectspatial(CPL,rel,

Syntax

CPLA=CPLselectspatial(CPL,[rel,"object"])

Input Parameter

CPL: Closed Polygon List
rel: spatial or other relation
"object": if used objects instead of CPLs are used in general

Output Parameter

CPLA: Selected CPL

Examples


CPLbox('','A'); A=ans; CPLbox('','B'); B=ans; CPLbox('','C'); C=ans; CPLbox('','D'); D=ans;
CPLbox([10 3],'space'); S=ans; CPLbox([70 5],'table'); T=ans;
CPLarrange({A,B,C,S},T,'ontop',1,'add'); CPL=ans; SGfigure; CPSplot(CPL);
CPLselectspatial(CPL,'top','left',2)
CPLselectspatial(CPL,'object','top','left',2)
CPLselectspatial(CPL,'equalobj',C)
CPLselectspatial(CPL,'object','overobj',T,'equalobj',A); % Gibt es ein Object A oberhalb von Table
CPLselectspatial(CPL,'object','overobj',T,'left',2);
CPLselectspatial(CPL,'overobj',T,'left',2);
CPLselectspatial(CPL,'overobj',T,'left',2:200,'top',1);
CPLselectspatial(CPL,'object','overobj',T,'equalobj',A); XXX=ans; CPLN=CPLsubtract(CPL,XXX); SGfigure; CPSplot(CPLN)
YYY=CPLtransrelCPL(A,CPLselectspatial(CPL,'object','equalobj',B),'center','ontop',1); CPLunion(CPLN,YYY); CPLM=ans;
SG=SGofCPLextrude(CPLM,10,'y'); SGfigure(SG);




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