CPLradialslots

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CPL/Closed Polygon Lists
Introduced first in SolidGeometry 5.4, Creation date: 2024-06-13, Last change: 2025-09-15

creates rotating circle segment contour for socket connectors



See Also: CPLcopyunionradial

Example Illustration

 missing image of CPLradialslots(Riw,ls,nmax,off)

Syntax

[CPLN,CPL,nn]=CPLradialslots([Riw,ls,nmax,off])

Input Parameter

Riw: [Ri Ro]
ls: length of the slot
nmax: maximum number of slots
off: offset angle

Output Parameter

CPLN: Complete Conotur
CPL: 1st Segment
nn:

Examples


CPLradialslots([28 29],10,5),1)




Copyright 2024-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, CPLradialslots, generates a rotating circle segment contour for socket connectors. It is part of the SolidGeometry library and is designed to create closed polygon lists.

Input Parameters

Output Results

Algorithm Steps

  1. Retrieve and sort the input parameters using getfuncparams. Default values are provided if not specified.
  2. Calculate the difference d between the outer and inner radii.
  3. Determine the maximum number of slots nn that can fit around the circle using the formula floor(2*pi*Ri/ls). If this exceeds nmax, set nn to nmax.
  4. Calculate the angular width w of each slot using 2*pi*ls/(2*pi*Ri).
  5. Set the offset angle off using getfuncparams, defaulting to -w/2.
  6. Create the contour CPL by generating two circles: one at radius Ri+d and another at Ri, with the specified width and offset.
  7. Generate the complete contour CPLN by copying and rotating the initial contour CPL using CPLcopyunionradial and CPLradialEdges.
  8. If no output arguments are specified, plot the results using SGfigure, CPSplot, CPLplot, and SGplotalpha.
Algorithm explaination created using ChatGPT on 2025-08-19 07:43. (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