PLcrossCPLline

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Geometric Queries
Introduced first in SolidGeometry 2.7, Creation date: 2015-09-22, Last change: 2025-09-14

return the crossing point of a single CPL and a line

Description

Checks on crossings or touch (selected by parameter).
In future can deliver the full crossing list on demand

See Also: PLcross2Lines , iscrossingCPL , crossC2P

Example Illustration

 missing image of PLcrossCPLline(CPL,pa,pb,touch,full)

Syntax

[CP,k,k1,kb,ka]=PLcrossCPLline(CPL,pa,pb,[touch,full])

Input Parameter

CPL: Closed Polygon List
pa: line start point
pb: line end point
touch: check on touch instead of cross; default is false
full: return a full crossing point list; default is false

Output Parameter

CP: Crossing Point
k: index in PL
k1: subsequent index in PL
kb: distance from pa
ka: distance from pb

Examples


PLcrossCPLline(PLcircle(10,8),[0 0 ],[15 15])
PLcrossCPLline(PLcircle(10,8),[-15 -15 ],[15 15])
PLcrossCPLline(PLcircle(10,8),[-15 -15 ],[15 15],'',true)

PL=PLsplitpointsofCPL(CPLsample(45)); [a,b,c]=PLcrossCPLline(CPLsample(45),PL,PL,true) % first point
PL=PLsplitpointsofCPL(CPLsample(45)); [a,b,c]=PLcrossCPLline(CPLsample(45),PL,PL,true,true) % all points




Copyright 2015-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