Syntax
SG=SGDIN912([M,L])
Input Parameter
M : | | Diameter metric |
L : | | Length metric mm |
Output Parameter
SG : | | Solid Geometry including Frames |
Examples
SGDIN912(2.5,8)
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, SGDIN912
, generates a solid geometry model of a screw according to the DIN 912 standard. The function takes two input parameters, M
and L
, which represent the diameter and length of the screw, respectively.
Input Parameters
- M: Diameter metric, default is 2.5 mm if not provided.
- L: Length metric in mm, default is 3 times the diameter
M
if not provided.
Output
- SG: Solid Geometry including frames.
Algorithm Steps
- Retrieve the diameter
M
and length L
from the input arguments, using default values if not specified.
- Load the DIN 912 standard data using the
DIN912
function.
- Adjust the radius for the hexagon using the
dofn
function.
- Find the relevant table line
TL
for the given diameter M
using the DINfindinTab
function.
- Set an overlap
ol
of 0.1 mm.
- Create the initial screw geometry using the
SGDIN13
function with the adjusted length L + ol
.
- Translate the geometry along the z-axis by
-L
using the SGtransP
function.
- Create additional geometry components
SGA
and SGB
using the SGofCPLz
function with circular profiles.
- Combine the geometries using
SGunion
and SGsubtract
functions to form the final screw model.
- Set transformation properties for the geometry using the
SGTset
function.
- Assign a stamp name to the geometry based on the diameter
M
.
- If no output is requested, plot the geometry using
SGfigure
, SGplotalpha
, and SGTframeplot
functions.
Algorithm explaination created using ChatGPT on 2025-08-19 07:42. (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