CPLfilmhinge

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CPL/Closed Polygon Lists
Introduced first in SolidGeometry 5.3, Creation date: 2023-08-01, Last change: 2025-09-15

creates a simple bar contour with rounded edges


Use carefully: The 'CPLfilmhinge' function has not yet been extensively tested

Description

depuseString CPLfilmhinge
NOT USED YET

See Also: PLsquare , PLradialEdges , CPLintersect

Example Illustration

 missing image of CPLfilmhinge(L,B,R)

Syntax

PL=CPLfilmhinge([L,B,R])

Input Parameter

L: Length
B: Widht/Height must be smaller than L
R: Radius at the end

Output Parameter

PL: final Point list

Examples


CPLfilmhinge(10,0.5,1)




Copyright 2023-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, CPLfilmhinge, generates a closed polygon list representing a simple bar contour with rounded edges. It is part of the SolidGeometry library and was introduced in version 5.3. The function has not been extensively tested, so it should be used with caution.

Input Parameters

Output

Algorithm Steps

  1. Retrieve the input parameters L, B, and R using the getfuncparams function. Default values are used if parameters are not provided.
  2. Create an initial point list PL that defines a rectangle with rounded edges. The rectangle is defined with a length of 10 times the sum of R and B, and a width of B.
  3. Apply the PLradialEdges function to PL to round the edges with the specified radius R.
  4. Create a new point list PL1 by intersecting PL with a square defined by PLsquare with dimensions [10*(B+R), B+2*R].
  5. Create a mirrored version of PL1 called PL2 by negating the x-coordinates.
  6. Create another square PL3 with dimensions [L, B] using PLsquare.
  7. Combine PL3 and PL1 using CPLunion with the 'alignleft' option to form a new polygon.
  8. Combine the result with PL2 using CPLunion with the 'alignright' option to complete the bar contour.
  9. If no output is requested, plot the resulting polygon using SGfigure and CPSplot with a red line style.
Algorithm explaination created using ChatGPT on 2025-08-19 00:42. (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