VLof2VLnonmanifold

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Surfaces
Introduced first in SolidGeometry 4.1, Creation date: 2017-08-25, Last change: 2025-09-14

returns vertex list and indices of non manifold vertices on TWO DIFFERENT vertex lists

Description

This function is able to detect potential problems in SGbool before execution

See Also: VLmindxyz , VLofcorruptedFL

Example Illustration

 missing image of VLof2VLnonmanifold(VLA,VLB)

Syntax

[NML,nma,nmb]=VLof2VLnonmanifold(VLA,VLB)

Input Parameter

VLA: Vertex list A
VLB: Vertex list B

Output Parameter

NML: Non manifold vertices; identical points used in both solids
nma:
nmb:

Examples


[A,B]=CSGsample(12); VLof2VLnonmanifold(rounddiv(A.VL,1e-4),rounddiv(B.VL,1e-4))




Copyright 2017-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, VLof2VLnonmanifold, identifies non-manifold vertices between two vertex lists, VLA and VLB. It is designed to detect potential issues in solid geometry operations before execution.

Input Parameters

Output Results

Algorithm Steps

  1. Check if VLA and VLB are solid geometry objects using isSG. If true, convert them to vertex lists using VLFLofSG.
  2. Remove duplicate vertices from VLA and VLB using unique with the 'rows' option, resulting in matrices X and Y.
  3. Use ismember to find common vertices between X and Y. This function returns logical indices nma and nmb indicating the presence of each vertex in the other list.
  4. Extract the non-manifold vertices from X using the indices nma and store them in NML.
  5. If no output arguments are specified, visualize the vertices using SGfigure and VLplot to plot X, Y, and NML in different colors.

Example Usage

To use this function, you can call it with two vertex lists obtained from a sample CSG operation:

[A,B]=CSGsample(12); 
VLof2VLnonmanifold(roundn(A.VL,1e-4),roundn(B.VL,1e-4))

This example rounds the vertex lists to a precision of 1e-4 before checking for non-manifold vertices.

Algorithm explaination created using ChatGPT on 2025-08-19 00:27. (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