PLELpushin

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - PLEL/Point List/Edge List
Introduced first in SolidGeometry 1.1, Creation date: 2013-12-28, Last change: 2025-09-14

pushes points of contour B into contour A

Description

For Boolean operations of plane surfaces, it is important to make sure that NO point of a contour B is on a point or edge of contour A. Otherwise the result of a Delaunay-Triangulation is unpredictable incorrect. To solve this problem, we move all points of B that are on the contour of A inside(!) contour A. Therefor, it is necessary that the edge list of A is complete and sorted using the right hand rule.
Please use ELreconnect and ELflip to make sure that all contours of A are definitely in correct order
WORK under progress. SLOW AND DIRTY AT THE MOMENT

Example Illustration

 missing image of PLELpushin(PLA,ELA,PLB,thr)

Syntax

PLB=PLELpushin(PLA,ELA,PLB,[thr])

Input Parameter

PLA: Point list A
ELA: Edge list of A (right hand order)
PLB: Point list B to test and shift
thr: shift value; default = 1e-12

Output Parameter

PLB: Shifted point list




Copyright 2013-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 adjust the points of contour B so that they do not lie on the points or edges of contour A. This is crucial for Boolean operations on plane surfaces to ensure accurate Delaunay Triangulation results.

Input Parameters

Output

Algorithm Steps

  1. Initialize the threshold thr to 1e-12, unless a different value is provided.
  2. Iterate over each point pc in PLB.
  3. For each point pc, iterate over each edge in ELA.
  4. For each edge, calculate the points pa and pb from PLA using the indices from ELA.
  5. Compute the parameter k to determine if pc lies on the line segment between pa and pb.
  6. Check if k indicates that pc is on the edge, considering the threshold thr.
  7. If pc is on the edge, calculate a perpendicular direction pd to the edge and shift pc by -pd.
  8. Continue until all points in PLB are processed.
Algorithm explaination created using ChatGPT on 2025-08-19 08:13. (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