PLchamfer2side

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - PL/Point Lists
Introduced first in SolidGeometry 5.0, Creation date: 2021-01-02, Last change: 2025-09-15

two sided version of PLchamfer



See Also: PLchamfer , SGofCPLz , SGofCPLextrude

Example Illustration

 missing image of PLchamfer2side(z,x,sh,d)

Syntax

PL=PLchamfer2side([z,x,sh,d])

Input Parameter

z: z or [z_left z-right]
x: x or [x_left x-right]
sh: shape or {shape_left, shape_right}
d: delta or [delta_left delta-right]

Output Parameter

PL: Point list for SGofCPLextrude

Examples


PLchamfer2side(10,10,{'mattheck','circ'},[0 6])
PLchamfer2side(10,10,{'mattheck','line'},[0 6])
PLchamfer2side(10,10,{'mattheck','circ2'},[0 6])
PLchamfer2side(10,10,{'mattheck','circ3'},[0 6])
PLchamfer2side(10,10,{'circ3','mattheck'},[0 6])




Copyright 2021-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, PLchamfer2side, is designed to create a point list for a two-sided chamfered polygon. It is part of the SolidGeometry library and is used for generating closed polygon lists.

Input Parameters

Algorithm Steps

  1. Retrieve and process input parameters using getfuncparams to ensure they are in the correct format (vectors or cell arrays).
  2. Call the PLchamfer function twice to generate point lists for the left and right sides using the respective parameters z(1), x(1), sh{1} and z(2), x(2), sh{2}.
  3. Check the orientation of the point lists PL1 and PL2. If necessary, flip them using flipud to ensure a consistent order.
  4. Combine the two point lists into a single list PL by adjusting the positions with the delta values d(1) and d(2).
  5. Remove duplicate rows from the combined point list PL while maintaining the order using unique.
  6. If no output is requested, plot the resulting polygon using SGfigure and CPLplot.

Output

The function returns a point list PL that can be used for further processing in the SGofCPLextrude function.

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