CPLstentline
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CPL/Closed Polygon Lists
Introduced first in SolidGeometry 4.8, Creation date: 2019-12-31, Last change: 2025-09-14
creates a sequence of boxes of different x-dimensions
See Also: PLsquare
, CPLsquareline
Example Illustration
Syntax
[CPL1,CPL2,CPLX]=CPLstentline([x,y,d])
Input Parameter
x: | | vector of x-dimension of squares |
y: | | scalar y-dimension of the squares |
d: | | distance between the squares |
Output Parameter
CPL1: | | CPL of the original x-dimension boxes separated by distance d for |
CPL2: | | CPL of the inbetween fitting boxes separated by distance d |
CPLX: | | CPL of the cutting pattern open |
Examples
CPLstentline([5 15 15 10 10 10 15 15 5],2,1);
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
Algorithm (Workflow)
This algorithm is designed to create a sequence of boxes with varying x-dimensions, separated by a specified distance. It is part of the SolidGeometry library and was introduced in version 4.8.
Input Parameters
- x: A vector representing the x-dimensions of the squares.
- y: A scalar representing the y-dimension of the squares.
- d: The distance between the squares.
Output Results
- CPL1: A closed polygon list (CPL) of the original x-dimension boxes separated by distance d.
- CPL2: A CPL of the in-between fitting boxes separated by distance d.
- CPLX: A CPL of the cutting pattern open.
Algorithm Steps
- Retrieve the input parameters x, y, and d using the
getfuncparams function, with default values if not provided.
- Determine the number of elements in the x vector,
n.
- Generate the first CPL,
CPL1, using the CPLsquareline function with inputs x, y, and d.
- Calculate the adjusted x-dimensions,
xx, from the output of CPLsquareline.
- Create the second CPL,
CPL2, using the adjusted x-dimensions, xx, y, and d.
- Translate
CPL2 horizontally by half the width of the first box plus distance d using PLtransP.
- Calculate bounding boxes for
CPL1 and CPL2 using BBofCPL.
- Create a cutting pattern,
CPLX, by generating squares based on the bounding boxes and translating them appropriately.
- Convert the polygon lists
CPL1, CPL2, and CPLX to closed polygon lists using CPLofPL.
- If no output arguments are specified, plot the CPLs using
SGfigure and CPSplot with different colors for each CPL.
Algorithm explaination created using ChatGPT on 2025-08-19 08:10. (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