Syntax
[SG,PL]=SGmotorshaft([D,L,r,ol])
Input Parameter
D : | | Diamater, default is 0.25 |
L : | | Length, default is D |
r : | | Undercut, default is .25 |
ol : | | Step, default is r |
Output Parameter
SG : | | Solid Geometry including Frames |
PL : | | Point List |
Examples
SGmotorshaft(2.5,4,0.1,[0 4])
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 function, SGmotorshaft
, generates a solid geometry for a motor shaft with an undercut. It is part of the SG-Library and was created by Tim Lueth.
Input Parameters
- D: Diameter of the shaft. Default value is 0.25.
- L: Length of the shaft. Default value is equal to D.
- r: Undercut radius. Default value is 0.25.
- ol: Step offset. Default value is equal to r.
Output Results
- SG: Solid Geometry including frames.
- PL: Point List.
Algorithm Steps
- Retrieve input parameters using
getfuncparams
function. If not provided, use default values:
D
is set to 2.5 if not specified.
L
is set to D
if not specified.
r
is set to 0.25 if not specified.
ol
is set to r
if not specified.
- Calculate the radius
R
as half of D
.
- If
ol
is a scalar, convert it to a two-element vector [0, ol]
.
- Assign
ox
to the second element of ol
and ol
to the first element.
- Define the point list
PL
for the motor shaft geometry.
- Mirror the point list
PL
to create PLU
and append it to PL
.
- Apply radial edges to
PL
using PLradialEdges
function.
- Remove successive identical points from
PL
using VLremsuccident
function.
- Generate the solid geometry
SG
by rotating the point list PL
using SGofCPLrot
.
- Set the transformation of
SG
using SGTset
with a rotation matrix.
- If no output is requested, plot the geometry using
SGfigure
, SGplotalpha
, and SGTframeplot
.
Algorithm explaination created using ChatGPT on 2025-08-19 07:24. (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