SGofCPLzchamfer

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - SG/Solids
Introduced first in SolidGeometry 3.9, Creation date: 2017-05-30, Last change: 2025-09-14

returns a solid with chamfered edges

Description

Based on a comment of Florian Schleich. The body is divided into three planes. In order to ensure the calculation of the walls, the orientations of the contour are first adapted.
In SG-Lib 5.0 separated regions are supported such as CPLsample(12)
ATTENTION: If the number of collinear points on the edges is to small, the surface look and feel ugly

See Also: SGofCPLz , SGof2CPLsz

Example Illustration

 missing image of SGofCPLzchamfer(CPL,z,ph,ed);

Syntax

SG=SGofCPLzchamfer([CPL,z,ph,ed]);

Input Parameter

CPL: Closed Polygon line
z: Height z
ph: phase default is 0.3
ed: curved edges; default is true

Output Parameter

SG: Resulting solid

Examples


SGofCPLchamfer([CPLsample(21);NaN NaN;PLcircle(5)],10)
SGofCPLzchamfer(CPLsample(12),10)




Copyright 2017-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, SGofCPLzchamfer, generates a solid with chamfered edges based on a closed polygon line (CPL) and other parameters. Below is a detailed explanation of the algorithm and its parameters:

Input Parameters

Algorithm Steps

  1. Initialize default values for CPL, z, ph, and ed if they are not provided as input arguments.
  2. If ph is zero, call the function SGofCPLz to create a solid without chamfering and return.
  3. If CPL is a scalar, convert it to a circle using PLcircle.
  4. Ensure the CPL is correctly oriented using CPLofPL.
  5. If ph is greater than zero, proceed with chamfering:
  6. If no output is requested, plot the solid using SGfigure and SGplotalpha.

Output

The function returns a solid (SG) with chamfered edges based on the input CPL and parameters.

Algorithm explaination created using ChatGPT on 2025-08-18 18:52. (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