crosspoints2F

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Geometric Queries
Introduced first in SolidGeometry 4.9, Creation date: 2020-01-28, Last change: 2025-09-14

This Fnct designed for SGbool6 returns all crossing points of 2 triangles

Description

In contrast to function cross2F of 2012 and cross2Fplanar, which are the origin and a step inbetween of this function, crosspoints2F is able to handle the following cases:
A) Two triangles are not in-plane or in-parallel as in cross2F of 2012
B) Two triangles are in-parallel but not in-plane and have no crossings
C) Two triangles are in-plane and have a lot of
Furthermore, the consideration for the inplane-case is not only the cross-points but also which point is inside of another triangle.
Furthermore, the constraint edge list for a delaunay triangulation is also returned

See Also: VLsampletriangles , cross2F

Example Illustration

 missing image of crosspoints2F(p1,p2,p3,pa,pb,pc,SHW)

Syntax

[XP,PinA,PinB,EL1,EL2]=crosspoints2F(p1,p2,p3,pa,pb,pc,[SHW])

Input Parameter

p1: Vertex 1 of A; or a VL=[p1;p2;p3;pa;pb;pc]
p2: Vertex 2 of A
p3: Vertex 3 of A
pa: Vertex 1 of B
pb: Vertex 2 of B
pc: Vertex 3 of B
SHW: show additional information if true

Output Parameter

XP: Crosspoints of Edges [edgeA edgeB X Y Z dir] similar to cross2F but handles also co-planar points
PinA: Additional Points in A if both traingles co-planar (may be not in XP)
PinB: Additional Points in B if both traingles co-planar (may be not in XP)
EL1: Edges between additional points in A (MAGENTA)
EL2: Edges between additional points in B (CYAN)

Examples


VLsampletriangles(3); VL=ans; crosspoints2F(VL(1,:),VL(2,:),VL(3,:),VL(4,:),VL(5,:),VL(6,:))
crosspoints2F([-10 -5 -5],[10 -5 5],[-1 -5 5],[-5 -5 0],[5 -5 0],[5 -5 20]);




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