Syntax
[PL,Rm]=PLwrench([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
PLwrench(10)
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)
The function PLwrench
is designed to generate a point list (PL) and a radius (Rm) for a polygonal shape, specifically a wrench shape, based on the given diameter and number of faces. It is part of the SolidGeometry library and is similar to the PLinbus
function.
Input Parameters
- D: Diameter of the wrench, not the radius. The default value is 1/4 inch, which is approximately 6.35 mm (25.4 mm / 4).
- n: Number of faces of the polygon. The default value is 6, which typically represents a hexagonal shape.
Output Results
- PL: A list of points that define the vertices of the polygonal shape.
- Rm: The radius of the circle that can circumscribe the polygon, useful for creating a circular representation.
Function Workflow
The function begins by checking the number of output arguments requested:
- If no output is requested (
nargout==0
), it calls the PLinbus
function with the provided arguments. This implies that the function is used for its side effects, such as plotting or displaying the shape.
- If output is requested, it calls
PLinbus
with the provided arguments and returns the point list and radius.
Example Usage
To generate a wrench shape with a diameter of 10 mm and the default number of faces (6), you would call:
PLwrench(10)
Related Functions
The function is related to other polygon and shape generation functions in the SolidGeometry library, such as PLhexalobular
, PLcircle
, and PLgearDIN
, among others.
Algorithm explaination created using ChatGPT on 2025-08-19 00:02. (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