PLcirctrapezoid

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CPL/Closed Polygon Lists
Introduced first in SolidGeometry 5.2, Creation date: 2022-06-11, Last change: 2025-09-15

creates a trapezoid contour with a predefied angle

Description

for self tapping screws

See Also: PLcircle , SGmotorshaftcoupling

Example Illustration

 missing image of PLcirctrapezoid(bh,al,wz)

Syntax

PL=PLcirctrapezoid([bh,al,wz])

Input Parameter

bh: [diameter/width and height]; default is [4 0]
al: rotation of CPL; default is 0
wz: default is 51 degree; used to calculate the height

Output Parameter

PL: PL to replace a circular solid using

Examples


PLcirctrapezoid(1.6/2)
PLcirctrapezoid(DIN13(3,'Core_Diameter_Bolt')/2)




Copyright 2022-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, PLcirctrapezoid, generates a trapezoidal contour for self-tapping screws. It is part of the SolidGeometry library and was introduced in version 5.2.

Input Parameters

Output

Algorithm Steps

  1. Retrieve input parameters using getfuncparams function with default values.
  2. Calculate the original base diameter borg as twice the first element of bh.
  3. Set b and h as twice the elements of bh.
  4. Calculate the scaling factor m as 1/cos(pi/8).
  5. Scale b and h by m.
  6. Convert al from degrees to radians.
  7. If h is zero, calculate h as b * tan(al).
  8. Create the trapezoid points PL as a matrix with four points.
  9. If wz is not zero, rotate PL using PLtransR function.
  10. If no output is requested, plot the trapezoid and a reference circle using SGfigure and PLplot.

Example Usage

Examples of calling the function:

Algorithm explaination created using ChatGPT on 2025-08-19 01:28. (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