SGhook4rail

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Surfaces
Introduced first in SolidGeometry 4.9, Creation date: 2020-08-01, Last change: 2025-09-14

returns a solid for a rail hook looking to face

Description

Can be used for a Motorcycle helmet at an 30mm IKEA Rail - Printing Time 4h

See Also: SGbitISO1173

Example Illustration

 missing image of SGhook4rail(DR,WS,DL)

Syntax

SG=SGhook4rail([DR,WS,DL])

Input Parameter

DR: Diameter of Rail; default is 30mm
WS: Wall size; default is DR/3
DL: Elongation for hook; default is DR/2

Output Parameter

SG: Hook for a Rail

Examples


SGhook4rail(30,6,'','Biker''s Dream'); SG=ans




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 algorithm generates a solid model of a rail hook using specified parameters. The function SGhook4rail is designed to create a hook that can be used for applications such as hanging a motorcycle helmet on a 30mm IKEA rail.

Input Parameters

Algorithm Steps

  1. Retrieve input parameters using getfuncparams function, with default values if not provided.
  2. Calculate the outer diameter DO as DR + 2 * WS.
  3. Create the inner contour of the hook using PLcircleoval with a radius of DR/2 and a length of 2*DR + DL.
  4. Create the outer contour using PLcircleoval with a radius of DO/2 and the same length.
  5. Combine the inner and outer contours into a single contour list CPL.
  6. Remove the opening from the contour using PLsquare and CPLsubtract.
  7. Adjust the edges of the contour using CPLradialEdges.
  8. Create the solid model of the hook using SGofCPLzchamfer with the contour list and a chamfer radius of DR/2.
  9. If a name NM is provided, create a text solid using SGoftext and transform it using SGtransrelSG.
  10. Concatenate the text solid with the hook solid using SGconcat.
  11. If no output is specified, plot the hook using SGfigure, CPSplot, and SGplotalpha.
Algorithm explaination created using ChatGPT on 2025-08-19 08:25. (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