PoseofCPLcutui

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - 4Bar/Linkages
Introduced first in SolidGeometry 4.9, Creation date: 2020-08-16, Last change: 2025-09-14

allows the interactive shaping and move of poses of contours

Description

This function is helpful if you want to cut out from a background
used first in exp_2019_01_27_chair


See Also: Poseofimageui , Poseorderchange , Posetransui , PoseofCPLui

Example Illustration

 missing image of PoseofCPLcutui(CPL,CPLW)

Syntax

PS=PoseofCPLcutui(CPL,[CPLW])

Input Parameter

CPL: Effektor contour
CPLW: Background Contour

Output Parameter

PS: Pose Struct include A, B, CPLE, CPLB, CPLW

Examples


CPL=PLcircle(70,'','',80); CPLW=PLcircle(60,'','',70); CPL=[CPL; nan nan; CPLW];
PoseofCPLcutui (CPL,CPLW); PS=ans




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

Algorithm (Workflow)

This function, PoseofCPLcutui, is designed to interactively shape and move poses of contours, specifically for cutting out an effector contour from a background contour. It is part of the SolidGeometry library and was introduced by Tim Lueth.

Input Parameters

Output Results

Algorithm Steps

  1. Retrieve the background contour CPLW from the input parameters using getfuncparams.
  2. Initialize a new figure using SGfigure and plot the effector contour CPL in red using CPLplot.
  3. Create a polygon shape from CPL using polyshape and plot it in blue with CPSplot.
  4. Plot the background contour CPLW in red.
  5. Add an annotation to the figure to guide the user in defining a contour to cut out the effector from the background.
  6. Split the contour CPL into background and effector parts using CPLsplitbool, resulting in CPLB and CPLE.
  7. Clear the current plot and re-plot CPLE in green and CPLB in black.
  8. Store CPLW, CPLB, and CPLE in the output structure PS.
  9. Attempt to call PoseofCPLui with CPLE, CPLB, and CPLW to further process the contours. If an error occurs, it is caught and ignored.
  10. Ensure CPLB and CPLW are stored in PS after the attempt.
Algorithm explaination created using ChatGPT on 2025-08-19 07:00. (Please note: No guarantee for the correctness of this explanation)

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