CPLsweep_simple

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CPL/Closed Polygon Lists
Introduced first in SolidGeometry 4.3, Creation date: 2018-11-05, Last change: 2025-08-19

1st sweep fnct


Will be removed (2025-09-21): Use 'CPLsweep' instead


See Also: CPLsweep , CPLsweep

Example Illustration

 missing image of CPLsweep_simple(CPL,w,cp)

Syntax

CPLN=CPLsweep_simple(CPL,[w,cp])

Input Parameter

CPL:
w:
cp:

Output Parameter

CPLN:




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

Algorithm (Workflow)

This algorithm is a function named CPLsweep_simple from the SolidGeometry library, designed to perform a sweep operation on a closed polygon list (CPL). The function is marked as obsolete and is suggested to be replaced by CPLsweep.

Input Parameters

Output Results

Algorithm Steps

  1. Retrieve the parameters w and cp using the getfuncparams function, with default values if not specified.
  2. Store the original CPL in CPLO.
  3. Translate the CPL by subtracting the center point cp.
  4. Calculate the bounding box radius r using sofBB and BBofVL.
  5. Determine the number of rotations n using nofrd with the radius r and angle w.
  6. Create a polyshape object pso from the translated CPL.
  7. Calculate the incremental rotation angle dw as w/(n-1).
  8. Initialize ps with pso.
  9. Iterate from 1 to n-1:
  10. Extract the vertices of the resulting polyshape into CPLN.
  11. Translate CPLN back by adding the center point cp.
  12. Create a polyshape ps from CPLN.
  13. If no output is requested, plot the results:
Algorithm explaination created using ChatGPT on 2025-08-19 07:51. (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