SGchamfer

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

chamfers the edges of a 2.5D Solid Geometry

Description

ATTENTION reduce radius first if the result is unexpected, start with .1
Optimized in Dakhla, Marocco. It does not returns as perfect edges as SGofCPLzchamfer! Used first with negative values by Samuel Detzel!
if r>0; r must be larger than abs(ph)*1.5
ATTENTION: If r is reduced automatically by tangentcirc, ph can be only r/1.5, or r must be zero!

See Also: PLchamfer , SGofCPLzchamfer , SGof2CPLzheurist , CPLradialEdges

Example Illustration

 missing image of SGchamfer(SG,ph,ed,r,stype,posit,shape,holeph,ed,r,stype,posit,shape,hole)

Syntax

SGN=SGchamfer(SG,[ph,ed,r,stype,posit,shape,holeph,ed,r,stype,posit,shape,hole])

Input Parameter

SG: Solid Geometry with just two different z values
ph: edge/phase size default is 0.3; [r z], [r zs ze] is also valid
ed: curved edges; default is true
r: radius for radial edges; default is ph*1.5
stype: default is 'angle'; see SGof2CPLzheurist
posit: 'both', 'start', 'end' or calculated from ph
shape: PL or 'line' (default), 'circ', see PLchamfer for all values
holeph: "norm", "outw", "hole", see CPLgrow for all values

Output Parameter

SGN: Solid with chamfered edges

Examples


SGchamfer(SGsample(2))
SGchamfer(SGofCPLz(PLcircleoval(10,'',20,5),10))
SGchamfer(SGofCPLz(PLstar(10),10),0.3,'')
SGchamfer(SGofCPLz(PLstar(10),10),0.3,'',2)
SGchamfer(SGofCPLz(PLstar(10),10),0.3,'',-0.5)
SGchamfer(SGofCPLz(PLstar(10),10),-1)
SGchamfer(SGlinkage(5,30,10),0.3)
SGchamfer(SGsample(10),-2,false,0)
SGchamfer(SGsample(10),-2,true,0)
SGchamfer(SGsample(10),-2,true,0,'center')
A=SGchamfer(SGsample(2)); SGfigure; view(-30,30); h=SGplot(A); setplotlight(h,'r',0.9); camlightTL




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

Last html export of this page out of FM database by TL: 2025-09-21