Syntax
PL=PLwedgeoncircle([R,h,w])
Input Parameter
R : | | Radius; default is 20 |
h : | | [wedge-height-above wedge-below-circle] |
w : | | angle segment of wedge; default is 2*pi / 16 |
Output Parameter
Examples
PLwedgeoncircle(5,[1 .3],2*pi/16)
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, PLwedgeoncircle
, is designed to create a wedge shape on a circular path. It is part of the SolidGeometry library and was introduced in version 5.4. The function takes several input parameters and returns a polygon list representing the wedge contour.
Input Parameters
- R: Radius of the circle. The default value is 20 if not specified.
- h: A two-element vector representing the wedge height above and below the circle. The default is [2, 1].
- w: The angle segment of the wedge. The default value is 2*pi/16.
Output
- PL: The contour of the wedge.
- dx: The x-offset of the wedge.
- dy: The y-offset of the wedge.
Algorithm Steps
- Retrieve the radius
R
from the input parameters, defaulting to 20 if not provided.
- Retrieve the height vector
h
, defaulting to [2, 1]. Assign ho
to h(1)
and hi
to h(2)
.
- Retrieve the angle segment
w
, defaulting to 2*pi/16.
- Calculate the sine and cosine of half the angle segment
w
to determine the offsets dx
and dy
.
- Define the base contour
CPLB
of the wedge using the calculated offsets and heights.
- Create circles
CPLR
, CPLO
, and CPLC
with radii R
, R+ho+ho
, and R+ho
respectively.
- Cut the inner circle
CPLX
with radius R-hi
from the base contour CPLB
using CPLsubtract
.
- Assign the resulting contour to
PL
.
- If no output is requested, plot the circles and wedge using different colors for visualization.
Algorithm explaination created using ChatGPT on 2025-08-19 01:29. (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