[CPLA,CPLB,CPLC]=CPLsplitui(CPLA)
CPLA : | Original Contour |
CPLA : | contour left after removal (BLUE) | |
CPLB : | removed contour (RED) | |
CPLC : | contour used to cut (DASHED) |
imreadlastchanged;I=ans; CPLofimage(I); CPL=ans; CPLsplitui(CPL);
This function, CPLsplitui
, is designed to split a closed polygon list (CPL) interactively into two separate CPLs. It is part of the SolidGeometry library and was introduced in version 4.5.
CPLsplitui
is called with the original contour CPLA
as input.CPLsplitbool
is called twice. The first call is with CPLsub
and varargin
to obtain CPLsub
, CPLxor
, and CPLC
.CPLsplitbool
is with CPLA
to obtain CPLB
, CPLA
, and CPLC
.nargout==0
), a new figure is created using SGfigure
.CPLplot
is used to plot CPLC
as a dashed red line.CPLplotasPS
is used to plot CPLB
with a red face color, followed by CPLplot
to plot it as a solid red line with a thickness of 2.CPLplotasPS
is used to plot CPLA
with a blue face color, followed by CPLplot
to plot it as a solid blue line with a thickness of 2.An example of how to use this function is provided:
imreadlastchanged; I = ans; CPLofimage(I); CPL = ans; CPLsplitui(CPL);
This example reads the last changed image, converts it to a CPL, and then splits it using CPLsplitui
.