Syntax
SG=SGEurtraccap
Output Parameter
SG : | | Solid Geometry of a 36mm x 32 mm x 40mm cap |
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 create a solid geometry cap for an EUTRAC 3Phase electric rail. The function SGEurtraccap
generates a 3D model of a cap with specified dimensions and properties.
Input Parameters
- w: Width of the cap, default is 36 mm.
- h: Height of the cap, default is 32 mm.
- l: Length of the cap, default is 40 mm.
- s: Slot size, default is 16 mm.
- t: Wall thickness, default is 1.2 mm.
Algorithm Steps
- Retrieve function parameters using
getfuncparams
, with default values [36, 32, 40, 16, 1.2].
- Create a square profile using
PLsquare
with dimensions [w, h].
- Generate a radial edge profile using
CPLradialEdges
from the square profile.
- Extrude the profile along the z-axis using
SGofCPLz
with length l
, wall thickness t
, and floor thickness t
.
- Subtract a box from the solid geometry using
SGsubtract
with dimensions [s, s, l+w+h], aligning it at the bottom and in front with specified offsets.
- Write the resulting solid geometry to an STL file named 'EUTRAC' using
SGwriteSTL
.
- If no output is requested, display the geometry using
SGfigure
and SGplotalpha
with a green color.
Algorithm explaination created using ChatGPT on 2025-08-19 06:53. (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