PLinbus

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - PL/Point Lists
Introduced first in SolidGeometry 5.0, Creation date: 2020-12-01, Last change: 2025-09-15

similar as PLcircle but uses the wrench size



See Also: PLhexalobular , PLwrench , PLcircle , PLcircseg , PLevolvente , PLgearDIN , PLkidney , PLrand , PLspiral , PLsquare , PLstar

Example Illustration

 missing image of PLinbus(D,n)

Syntax

[PL,Rm]=PLinbus([D,n])

Input Parameter

D: DIAMETER NOT RADIUS! default is 1/4 Inch
n: number of faces; default is 6

Output Parameter

PL: Point list
Rm: Radius of circle for PLcircle

Examples


PLinbus(10)




Copyright 2020-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 MATLAB function named PLinbus that generates a closed polygon list representing a wrench shape, similar to a circle but with a specified number of faces. It is part of the SolidGeometry library.

Input Parameters

Output Results

Algorithm Steps

  1. Retrieve the diameter D and the number of faces n from the input parameters, using default values if not provided.
  2. If D is zero, return an empty point list and a radius of zero.
  3. Check if the number of faces n is less than 4. If so, raise an error because a polygon requires at least 4 edges.
  4. Calculate the radius R as half of the diameter D.
  5. Calculate the modified radius Rm using a function dofn(n), which adjusts the radius based on the number of faces.
  6. Generate the point list PL using the PLcircle function, which creates a polygon with the specified radius and number of faces.
  7. If no output arguments are specified, plot the polygon using SGfigure and PLplot functions, and annotate the plot with the diameter and radius.

Example Usage

To create a polygon with a diameter of 10 mm and the default number of faces (6), use the following command:

PLinbus(10)
Algorithm explaination created using ChatGPT on 2025-08-19 07:18. (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