SGsnaprivet
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Parametric Design
Introduced first in SolidGeometry 4.6, Creation date: 2019-05-02, Last change: 2025-09-14
returns a solid geometry for a snap rivet
Description
mainly the same as VLFLsnaprivet of 2013 July.
If there is no force specified, the snap ribved is designed only wrt geoemetric conditions
See Also: VLFLsnaprivet
, SGbending
, lofbendinggirder
, sofbendinggirder
, rofcircbend
, bofbendinggirder
, Fofbendinggirder
Example Illustration
Syntax
SG=SGsnaprivet([d,h,n,F,s,sl])
Input Parameter
d: | | diameter |
h: | | height (without base and snaps) of single unit |
n: | | number of units (multiplies height) |
F: | | Push force to open solid; def= 0 N |
s: | | base size; default is one |
sl: | | slot size |
Output Parameter
Examples
SGsnaprivet (10,10,1)
SGsnaprivet (10,10,2)
SGsnaprivet (10,10,2,0.5)
Copyright 2019-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 create a solid geometry for a snap rivet using the function SGsnaprivet. The function takes several input parameters and returns a solid geometry object.
Input Parameters
- d: Diameter of the snap rivet. Default is 6 mm.
- h: Height of a single unit of the snap rivet, excluding the base and snaps. Default is 10 mm.
- n: Number of units, which multiplies the height. Default is 1.
- F: Push force required to open the solid. Default is 0 N.
- s: Base size of the snap rivet. Default is 1 mm.
- sl: Slot size. Default is 0.3 mm.
Output
- SG: The resulting solid geometry of the snap rivet.
Algorithm Steps
- Retrieve input parameters using the
getfuncparams function, which assigns default values if parameters are not provided.
- Calculate the total height of the snap rivet as
n*h + sl.
- Call the
VLFLsnaprivet function with the calculated height, half the diameter, base size, and other parameters to generate the vertex list (SG.VL) and face list (SG.FL) of the solid geometry.
- Translate the solid geometry using
SGtransP to adjust its position by moving it down by the base size s.
- If no output is requested (
nargout == 0), plot the solid geometry using SGplot and adjust the view and lighting for better visualization.
Example Usage
SGsnaprivet(10, 10, 1): Creates a snap rivet with a diameter of 10 mm, height of 10 mm, and 1 unit.
SGsnaprivet(10, 10, 2): Creates a snap rivet with a diameter of 10 mm, height of 20 mm (2 units), and default force.
SGsnaprivet(10, 10, 2, 0.5): Creates a snap rivet with a diameter of 10 mm, height of 20 mm, and a push force of 0.5 N.
Algorithm explaination created using ChatGPT on 2025-08-19 08:03. (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