Syntax
SG=SGgearrackDIN([m,z,h0,b,tig,re])
Input Parameter
m : | | module |
z : | | number of teeth if integer or length if real |
h0 : | | base size |
b : | | width of rack / height of gear |
tig : | | false = gap; true= tooth |
re : | | rounded edges; default is false |
Output Parameter
Examples
SGgearrackDIN(1,5,'',5,false)
SGgearrackDIN(1,5,'',5,false,true)
Copyright 2018-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, SGgearrackDIN
, generates a gear rack based on the DIN standard. It is part of the SolidGeometry library and is used to create a 3D model of a gear rack.
Input Parameters
- m: The module of the gear, which is a measure of the size of the teeth. It is a critical parameter in gear design.
- z: Represents the number of teeth if it is an integer. If it is a real number, it represents the length of the gear rack.
- h0: The base size of the gear rack. If not specified, it defaults to an empty string, which implies a default calculation based on other parameters.
- b: The width of the rack or the height of the gear. If not specified, it defaults to six times the module (
m*6
).
- tig: A boolean parameter where
false
indicates a gap and true
indicates a tooth. It determines the profile of the gear rack.
- re: A boolean parameter that specifies whether the edges are rounded. The default value is
false
.
Algorithm Steps
- The function begins by retrieving the input parameters using the
getfuncparams
function. This function assigns default values if the parameters are not provided.
- The function
PLgearrackDIN
is called with the parameters m
, z
, h0
, tig
, and re
. This function generates a 2D profile of the gear rack.
- The 2D profile is then converted into a 3D solid geometry using the
SGofCPLz
function, with the width b
as the extrusion height.
- Optional transformations such as rotation and translation are commented out, indicating they are not applied in the current version of the function.
- If no output is requested (
nargout==0
), the function plots the 3D model using SGfigure
and SGplot
, with a specified view angle.
Algorithm explaination created using ChatGPT on 2025-08-19 00:28. (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