SGtrapezoid

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

creates trapezoid pins for moulding forms



See Also: SGbox , SGcone , SGsphere , SGarrow , SGspherelink , SGcylinder

Example Illustration

 missing image of SGtrapezoid(r,h,rad,n)

Syntax

SG=SGtrapezoid([r,h,rad,n])

Input Parameter

r: [rin rout]
h: height
rad: radial edges radius
n: number of points on the rotation circle

Output Parameter

SG: Solid Geometry

Examples


SGtrapezoid(1);
SGtrapezoid([1 2]);
SGtrapezoid([2 1],'','',4);
SGtrapezoid([2 1],5,2);




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 function, SGtrapezoid, is designed to create trapezoid pins for molding forms. It is part of the SolidGeometry library and was introduced in version 4.8. The function takes several input parameters and returns a solid geometry object.

Input Parameters

Algorithm Steps

  1. Retrieve the input parameters using the getfuncparams function. This function checks the provided arguments and assigns default values if necessary.
  2. If the radius r is a scalar, convert it to a vector [r*0.8, r].
  3. Define the polygonal line (PL) for the trapezoid using the radii and height: PL = [0 0; r(1) 0; r(2) h/2; r(1) h; 0 h].
  4. Plot the initial polygonal line using PLplot(PL).
  5. Apply radial edges to the polygonal line using PLradialEdges(PL, rad).
  6. Create the solid geometry by rotating the polygonal line using SGofCPLrot(PL, n).
  7. If no output is requested, display the geometry using SGfigure, set the view angle, plot the geometry with transparency, and apply a metal material appearance.

Output

The function returns a solid geometry object SG representing the trapezoid pin.

Algorithm explaination created using ChatGPT on 2025-08-19 00:22. (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