isinsideEL

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 1.0, Creation date: 2012-11-12, Last change: 2025-09-14

returns an index list of all edges that exist in two direction

Example Illustration

 missing image of isinsideEL(EL)

Syntax

ind=isinsideEL(EL)

Input Parameter

EL: Edge list

Output Parameter

ind: index of the inside edges

Examples

find outer contour
ind=isinsideEL(EL);
EL(ind,:) % contains all internal edges
EL(~ind),:) % contains all external edges




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

Algorithm (Workflow)

This function, isinsideEL, is designed to identify edges in a given edge list that exist in both directions, effectively determining internal edges.

Input Parameters

Output Results

Algorithm Explanation

The function uses the following steps to determine internal edges:

  1. It applies the fliplr function to the edge list EL. This function flips the order of elements in each row, effectively reversing the direction of each edge.
  2. It then uses the ismember function with the 'rows' option to compare the original edge list EL with its reversed version. This checks for each edge in EL if its reverse also exists in the list.
  3. The result is a logical array ind, where each element is true if the corresponding edge in EL is internal (exists in both directions) and false otherwise.

Example Usage

To find the outer contour of a shape represented by the edge list EL, you can use the function as follows:

ind = isinsideEL(EL);
internalEdges = EL(ind, :);  % Contains all internal edges
externalEdges = EL(~ind, :); % Contains all external edges

This example demonstrates how to separate internal and external edges using the logical index array ind.

Algorithm explaination created using ChatGPT on 2025-08-18 21:54. (Please note: No guarantee for the correctness of this explanation)

Last html export of this page out of FM database by TL: 2025-09-21