SGisInterior

by MATLAB-CENTRAL, SG-Lib Toolbox: SolidGeometry 5.6 - Surfaces
, Creation date: 2020-01-07, Last change: 2025-09-14

returns the isInside Flag for a SG and a VL

Description

It is still a fast checking function for points that are on or not on the surface. Surface points belong to the inner points. Bugs appear if points are at the same position but different z axis. Could easily be solved. See mesh2mesh to learn how to improve VLFLinpolyhedron.

See Also: VLisInteriorofBB , mesh2mesh , VLFLinpolyhedron , VLcrossingSG , crossingfacets2VLFL , SGisconvex

Example Illustration

 missing image of SGisInterior(SG,VL)

Syntax

[VIL,Vin,Von]=SGisInterior(SG,VL)

Input Parameter

SG: Solid Geoemtry or cell list
VL: Vertex list to test or Frame T

Output Parameter

VIL: Vertex inside or surface
Vin: Vertex inside not on surface
Von: Vertex on surface not inside

Examples


SGplatesofSGML(SGbox([60,40,20]),1.5,PLcircle(4)); SG=ans;
[~,~,~,VL]=meshgridofBB(BBofSG(SG),50,50,50,0); SGisInterior(SG,VL);
A=SGbool('-',SGbox([30,20,10]),SGbox([26,16,6])); B=SGsphere(10);
SGisInterior(A,[A.VL;B.VL]);

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