Syntax
SG=SGpinshaft([r,d,b])
Input Parameter
r : | | Radius per step |
d : | | distance between steps |
b : | | Radius for broken edges; see also PLradialEdges |
Output Parameter
Examples
SGpinshaft([6 3 6],[10 2 10],[.5 0])
Copyright 2021-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, SGpinshaft
, is designed to create a pin using the PLshaftrad
function. It is part of the SolidGeometry library and was introduced in version 5.1. The function takes several input parameters and returns a solid geometry object.
Input Parameters
- r: Radius per step. This parameter defines the radius for each step of the pin. It is retrieved using the
getfuncparams
function with a default value of [5 4 8]
.
- d: Distance between steps. This parameter specifies the distance between each step of the pin. It is also retrieved using
getfuncparams
with a default value of [10 20 30]
.
- b: Radius for broken edges. This parameter is used to define the radius for any broken edges on the pin. It is retrieved with a default value of
[0.5 0]
and is marked as a required parameter.
- ramp: A boolean parameter that determines whether ramps are used instead of corners. It is retrieved with a default value of
false
.
Algorithm Steps
- Calculate the cumulative sum of the distances
d
to determine the total height h
of the pin.
- Use the
PLshaftrad
function to create a profile line (PL) based on the input parameters r
, d
, b
, and ramp
.
- Generate the solid geometry
SG
by rotating the profile line using the SGofCPLrot
function.
- Set the top face of the solid geometry using
SGTset
with the transformation TofPez([0 0 h],[0 0 1])
.
- Set the bottom face of the solid geometry using
SGTset
with the transformation TofPez([0 0 0],[0 0 -1])
.
- If no output is requested, plot the profile line and the solid geometry using
SGfigure
, PLplot
, and SGTplotalpha
.
The function is designed to be flexible, allowing for the creation of various pin shapes by adjusting the input parameters. It is part of a larger library of functions for creating and manipulating solid geometries.
Algorithm explaination created using ChatGPT on 2025-08-19 07:25. (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