PLFLofCPLpoly

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Analytical Geometry
Introduced first in SolidGeometry 1.1, Creation date: 2014-01-06, Last change: 2025-09-14

Utilizes the poly2fv fnct for VLFL-LIb

Description

The point list is 2D and sorted by increasing y, contour by contour, so that the facets of different segments do not mix. The tessellation is a simple increasing order triangle segmentation, less efficient than DelaunayTri. For 3D solids, it makes sense to retessellate the contours by PLELofCPL.

See Also: FLofCPL , PLFLofCPLdelaunay , PLELofCPL , FLofPLEL

Example Illustration

 missing image of PLFLofCPLpoly(CPL)

Syntax

[PL,FL]=PLFLofCPLpoly(CPL)

Input Parameter

CPL: Contour points list

Output Parameter

PL: Point list
FL: Facet list

Examples


PL=PLcircseg(10,[],-pi/6,pi)
[VL,FL]=PLFLofCPLpoly(PL); VLFLplot (VL,FL); % Minimal points used




Copyright 2014-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, PLFLofCPLpoly, is designed to process a list of contour points (CPL) and generate a point list (PL) and a facet list (FL) for 2D geometrical shapes. It is part of the SG-Library and was developed by Tim Lueth.

Input Parameters

Output Results

Algorithm Steps

  1. Check if the input CPL is empty. If it is, return empty PL and FL.
  2. Ensure the contour points are in clockwise order using ispolycw and poly2cw. This is important for consistent facet orientation.
  3. Use the poly2fv function to convert the contour points into a facet list (FL) and a point list (PL).
  4. Check the orientation of the facets using sizePLFL. If any facet has a negative orientation, flip the order of the second and third points in those facets to correct the orientation.
  5. If no output arguments are specified, plot the generated points and facets using VLFLplot within a new figure window.

Example Usage

An example is provided where a circular segment is created using PLcircseg, and then processed by PLFLofCPLpoly to generate and plot the points and facets.

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