Syntax
patchupdateSG(h,SG,[FL])
Input Parameter
h : | | existing patch handle |
SG : | | Solid Geometry or VL |
FL : | | optional Faces List |
Copyright 2016-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, patchupdateSG
, updates an existing patch handle with new solid geometry data. It is part of the SG-Library and was created by Tim Lueth in 2016.
Input Parameters
- h: An existing patch handle that will be updated.
- SG: Solid Geometry or Vertex List (VL) that contains the new vertex data.
- FL (optional): A list of faces that can be provided to update the patch.
Algorithm Steps
- Initialize
FL
as an empty array. If a third argument is provided and is not empty, assign it to FL
.
- Check if
SG
is a structure:
- If true, perform the following:
- Retrieve the color data from the first vertex of the existing patch handle.
- Update the vertices of the patch handle with
SG.VL
.
- Replicate the color data for each new vertex.
- Update the faces of the patch handle with
SG.FL
.
- If false, perform the following:
- Clear the existing faces of the patch handle.
- Update the vertices of the patch handle with
SG
.
- If
FL
is not empty, update the faces of the patch handle with FL
.
Algorithm explaination created using ChatGPT on 2025-08-18 22:18. (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