CVLzremovearea

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

removes areas with a small distance to the opposite wall

Description

Uses CPLfindsmalldist


See Also: CPLfindsmalldist , CVLzaddauxpoints , CVLzofSGsliceauto , CVLzplotasCPS , CVLzplotui , CVLzseparate , CVLzsweep

Example Illustration

 missing image of CVLzremovearea(res)

Syntax

CVLN=CVLzremovearea([res])

Input Parameter

res: minimal required distance to survive as contour

Output Parameter

CVLN: CVL with removed areas the will creates problems during printing or SG reconstruction

Examples

SG=SGservosample(1); CVLz=CVLzofSGsliceauto(SG);
SGfigure; CVLzplotasCPS(CVLzseparate(CVLz,1),'r',1); shg; grid off
SGfigure; CVLzplotasCPS(CVLzremovearea(CVLzseparate(CVLz,1),0.3),'r',1); shg; grid off




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 algorithm is designed to remove areas from a closed polygon list (CVL) that have a small distance to the opposite wall, which could cause issues during printing or solid geometry (SG) reconstruction.

Input Parameters

Output

Algorithm Steps

  1. Retrieve the minimal required distance parameter res using getfuncparams. If not specified, default to 0.025.
  2. Initialize CVLN as a copy of the input CVL.
  3. Separate the CVL into different z-levels using CVLseparatez.
  4. Iterate over each z-level:
  5. If no output is requested, plot the original and modified contours:
Algorithm explaination created using ChatGPT on 2025-08-19 08:26. (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