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

 missing image of CPLstentline(x,y,d)

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

Output Results

Algorithm Steps

  1. Retrieve the input parameters x, y, and d using the getfuncparams function, with default values if not provided.
  2. Determine the number of elements in the x vector, n.
  3. Generate the first CPL, CPL1, using the CPLsquareline function with inputs x, y, and d.
  4. Calculate the adjusted x-dimensions, xx, from the output of CPLsquareline.
  5. Create the second CPL, CPL2, using the adjusted x-dimensions, xx, y, and d.
  6. Translate CPL2 horizontally by half the width of the first box plus distance d using PLtransP.
  7. Calculate bounding boxes for CPL1 and CPL2 using BBofCPL.
  8. Create a cutting pattern, CPLX, by generating squares based on the bounding boxes and translating them appropriately.
  9. Convert the polygon lists CPL1, CPL2, and CPLX to closed polygon lists using CPLofPL.
  10. 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