Syntax
CPLN=CPLdullededges(CPL,[d,typ])
Input Parameter
CPL : | | CPL |
d : | | distance between edges |
typ : | | miter (sharp edges) or square (alle egdes) or round (all edges)l default is miter |
Output Parameter
Examples
CPLdullededges(CPLsample(7))
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, CPLdullededges
, is designed to modify the edges of a closed polygon list (CPL) by dulling them. It is part of the SolidGeometry library and was introduced in version 5.1. The function takes in a CPL and optional parameters to determine the distance and type of edge dulling.
Input Parameters
- CPL: The closed polygon list that you want to modify.
- d: The distance between edges. This parameter is optional and defaults to 0.5 if not provided.
- typ: The type of edge dulling. It can be 'miter', 'square', or 'round'. The default is 'miter'.
Output
- CPLN: The new closed polygon list with dulled edges.
Algorithm Steps
- Retrieve the distance
d
using getfuncparams
with a default value of 0.5.
- Retrieve the type
typ
using getfuncparams
with a default value of 'miter'.
- Apply the
CPLbuffer
function twice to the CPL:
- First, buffer the CPL with a negative distance
-d
.
- Second, buffer the result with a positive distance
+d
and the specified type typ
.
- If no output is requested (
nargout==0
), plot the original CPL in green and the modified CPLN in red using CPLplot
.
Edge Dulling Types
- 'round': Rounds out the joints of the polygon.
- 'square': Squares off the joints of the polygon.
- 'miter': Preserves the joint angles of the polygon.
Algorithm explaination created using ChatGPT on 2025-08-19 00:05. (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