CPLisstraightline

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Geometric Queries
Introduced first in SolidGeometry 5.5, Creation date: 2025-08-15, Last change: 2025-09-15

returns wether a CPL is a straigt line with area zero


Use carefully: The 'CPLisstraightline' function has not yet been extensively tested

Description

Sometimes polyshape use fails in 2024b in case of straigt lines. For instance in CPLisccwcorrected
This function should help to analyze this case

See Also: PLangle , CPLisccwcorrected , CPLremstraightAmin , CVLremstraight , PLremstraight

Example Illustration

 missing image of CPLisstraightline(CPL)

Syntax

log=CPLisstraightline(CPL)

Input Parameter

CPL: SINGLE CPL to analyze

Output Parameter

log: logical result; true if straight line

Examples


CPLisstraightline([0 0; 10 10; 20 20; 30 30]) % straight line
CPLisstraightline([0 0; 10 10; 20 21; 30 30]) % includes a kink




Copyright 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