SGrepairFLsimple

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

returns a solid with closed FL of the simpliest condition

Description

Simply uses FLrepair.
This fnctn closes obvious missing triangles in a facet list. It has clear limitations if a surface has edge facets with more than 90 degree angle.

See Also: FLrepair

Example Illustration

 missing image of SGrepairFLsimple(SG)

Syntax

SG=SGrepairFLsimple(SG)

Input Parameter

SG: Solid Geometry SG.VL,SG.FL

Output Parameter

SG: Repaired Solid

Examples


SGsphere(5); X=ans % Create a shpere
X.FL=X.FL([1:615,617:end],:) % remove facet 616
SGcheckmeshlab(X); % Analyze the error
SGrepairFLsimple(X); Y=ans % Close the facet




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

Algorithm (Workflow)

This function, SGrepairFLsimple, is designed to repair a solid geometry by closing obvious missing triangles in a facet list. It is part of the SolidGeometry library and was introduced in version 4.9. The function has limitations when dealing with surfaces that have edge facets with angles greater than 90 degrees.

Input Parameters

Output Results

Algorithm Steps

  1. Check if the input SG is empty using the function SGisempty. If it is empty, the function returns immediately without making any changes.
  2. Call the function FLrepair with SG.FL and SG.VL as arguments. This function attempts to repair the facet list by closing missing triangles.
  3. Check if the field SG.FC (Facet Colors) exists and if its number of rows is less than the number of rows in SG.FL. If so, extend SG.FC by appending rows with the default color [1 0 0] (red) to match the number of facets.
  4. If there are no output arguments (nargout==0), call the function SGcheckmeshlab to analyze the repaired solid geometry.

The function is designed to be simple and effective for basic repairs, but it may not handle complex geometries with high precision.

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