crossingfacets2VLFL

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Boolean
Introduced first in SolidGeometry 1.0, Creation date: 2012-08-04, Last change: 2025-09-14

Fundamental fnct to return an index list of the facets of solid A intersected by solid B

Description

This function was accelerated by factor 40 on 2017-08-01 by using collofBBs. Procedure to calculate an index for all facets of solid A that is intersected by the solid B

% NEED TO SWITCH FROM cross2F TO crosspoints2F

This procedcure uses cross2F for calculation
The format of XIL is
1 facet number of A
2 facet number of B
3-5 percentage of edge e1a, e2a, e3a
6-8 percentage of edge e1b, e2b, e3b
09 intrusion vector of e1a into B
10 intrusion vector of e2a into B
11 intrusion vector of e3a into B
12 intrusion vector of e1b into A
13 intrusion vector of e2b into A
14 intrusion vector of e3b into A

See Also: , cross2F , intersectstriangle , mesh2mesh , VLFLinpolyhedron , SGisInterior , VLcrossingSG

Example Illustration

 missing image of crossingfacets2VLFL(VLA,FLA,VLB,FLB,first,pwarn)

Syntax

[XIA,XIL,XIB]=crossingfacets2VLFL(VLA,FLA,VLB,FLB,[first,pwarn])

Input Parameter

VLA: Vertex list A
FLA: Facet list A
VLB: Vertex list B
FLB: Facet list B
first: if true; function stops after the first crossing; default is false
pwarn: if true; functions warns in case of in-plane surfaces

Output Parameter

XIA: Crossed facets from Solid A
XIL: Crossing / intersection index matrix
XIB: Crossed facets from Solid B

Examples


A=SGsample(5); B=SGbox([30,20,10]);
crossingfacets2VLFL(B.VL,B.FL,A.VL,A.FL) % finds all
crossingfacets2VLFL(B.VL,B.FL,A.VL,A.FL,true) % finds first
VLA=[0 0 0; 7 7 0; -7 7 0]; VLB=[-4 2 0; 4 2 0; 0 10 0]; FLA=[3 2 1]; FLB=[1 2 3];
crossingfacets2VLFL(VLA,FLA,VLB,FLB,'',true);
VLA=[0 0 1; 7 7 0; -7 7 0]; VLB=[-4 2 0; 4 2 0; 0 10 0]; FLA=[3 2 1]; FLB=[1 2 3];
crossingfacets2VLFL(VLA,FLA,VLB,FLB,'',true)




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