by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Parametric Design
Introduced first in SolidGeometry 5.3, Creation date: 2023-09-22, Last change: 2025-08-26
See Also: SGbookwedge
SGmedalsframe
This algorithm is designed to create a plate for presenting 60mm medals, in combination with a book wedge. Below is a detailed explanation of the algorithm and its parameters:
slfit('c'), which returns a clearance value slc.slc and a height of 4 using SGofCPLz(PLcircle(60/2+slc),4). This is stored in variable A.A in a 3x3 grid using SGcopypatternXYZ(A,[3 3 1],false), and store it in SG.dist of 3 and a 2D array XY with values [200, 200].SG into a bounding box defined by [XY 200] with a distance of dist using SGpacking(SG,[XY 200],dist), and store the result in SGN.SGN using CPLofSGhull(SGN), and store it in CPL0.CPL0 using CPLconvexhull(CPL0), and store it in CPLA.CPLA with a distance of dist using CPLbuffer(CPLA,dist), and store it in CPLB.CPLB to have radial edges using PLradialEdges(PLsquare(XY),dist).CPLB with a height of 1 using SGofCPLz(CPLB,1), and store it in SGA.CPL0 from CPLB with a height of 5 using SGofCPLz(CPLsubtract(CPLB,CPL0,'center'),5), and store it in SGB.SGA and SGB with an offset of -0.1 using SGconcat(SGA,SGB,'ontop',-0.1), and store the result in SGC.SGC using SGfigure(-30,30) and SGplotalpha(SGC).SGC to an STL file named 'SGmedalsframe' using SGwriteSTL(SGC,'SGmedalsframe').