CPLmeltbool

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Boolean
Introduced first in SolidGeometry 4.3, Creation date: 2018-10-30, Last change: 2025-09-14

Merges a list of CPL by boolean add and sub - Similar to CPLunitesorted but splits the contour too

Description

Similar to CPLunitesorted, but the starting point of the contours differ
[a,b]=CPLsortinout(CPLsample(14))

CPL3=[PLcircle(11);nan nan;CPLsample(45)]; CPLmeltbool(flipud(CPL3)),CPLmeltbool(flipud(CPL3))

See Also: CPLunitecwccw , CPLunitesorted , CPLsortinout , CPLbool , CPLrecontour , CPLrepair , CPLadd

Example Illustration

 missing image of CPLmeltbool(CPL,fullstep)

Syntax

CPL1=CPLmeltbool(CPL,[fullstep])

Input Parameter

CPL: CPL
fullstep: if false, only two layers are processed; default is false

Output Parameter

CPL1: resulting contour

Examples


PLA=[PLcircle(4); nan nan; PLcircle(4)+3]; % Orientation doesnt matter
PLB=[PLcircle(4); nan nan; flipud(PLcircle(4)+3)]; % Orientation doesnt matter
CPLmeltbool(CPLsample(14)); % Single step analysis
CPLmeltbool(CPLsample(14),true); % Full step analysis
CPL3=[PLcircle(11);nan nan;PLcircle(12);nan nan;CPLsample(45)];
CPLmeltbool(CPL3), % Outer contour is ccw (correct)
CPLmeltbool(flipud(CPL3)) % Outer contour is ccw (correct)
CPLmeltbool(CPL3,true), % Outer contour is ccw (correct)
CPLmeltbool(flipud(CPL3),true) % Outer contour is ccw (correct)




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