Syntax
CPL=CPLsocketscrewed([diam])
Input Parameter
diam : | | [max min #] ; default is [10 8.5 2] |
Output Parameter
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)
This algorithm is designed to generate a contour for an anti-rotation bushing using the function CPLsocketscrewed
. The function is part of the SolidGeometry library and was introduced in version 5.3. It takes a single input parameter, diam
, which is an array containing three elements: the maximum diameter, the minimum diameter, and a flag.
Input Parameters
- diam: An array with three elements [max, min, #]. The default value is [10, 8.5, 2].
Output
- CPL: The resulting contour.
Algorithm Steps
- Retrieve the input parameter
diam
using the function getfuncparams
. If not provided, use the default value [10, 8.5, 2].
- Assign the first element of
diam
to Da
(Diameter of Axis) and the second element to Dc
(Diameter of cutting edge).
- Assign the third element of
diam
to fl
.
- Use a switch statement to determine the operation based on the value of
fl
:
- Case 1: Call
CPLmotorshaft
with parameters Da
, Dc
, and 'Diameter' to generate the contour.
- Case 2: Calculate
d
as the difference between Da
and Dc
. Generate two contours, CPL1
and CPL2
, using CPLmotorshaft
with adjusted parameters. Intersect these contours using CPLintersect
and refine the result with CPLremstraightAmin
to remove straight lines shorter than 0.01 mm.
- Otherwise: Trigger an error if the third parameter is not 1 or 2.
- If no output is requested (
nargout==0
), plot the resulting contour using SGfigure
and CPLplot
. Annotate the plot with the diameters Da
and Dc
.
Algorithm explaination created using ChatGPT on 2025-08-19 00:41. (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