CPLdullededges

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CPL/Closed Polygon Lists
Introduced first in SolidGeometry 5.1, Creation date: 2021-04-05, Last change: 2025-09-15

returns a CPL with dulled edges

Description

makes sense after CPLtransform

See Also: CPLbuffer , CPLradialEdges

Example Illustration

 missing image of CPLdullededges(CPL,d,typ)

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

CPLN: New CPL

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

Output

Algorithm Steps

  1. Retrieve the distance d using getfuncparams with a default value of 0.5.
  2. Retrieve the type typ using getfuncparams with a default value of 'miter'.
  3. 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.
  4. If no output is requested (nargout==0), plot the original CPL in green and the modified CPLN in red using CPLplot.

Edge Dulling Types

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