SGsupplement

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Boolean
Introduced first in SolidGeometry 5.0, Creation date: 2021-01-04, Last change: 2025-09-15

Boolean addition of the solid parts of B that are outside of the convex hull of A

Description

THIS IS DIFFERENT TO SGdesignSupplement
More or less SG=SGtransrelSG(SGA,SGB,[varargin,{'Supp'}]);


See Also: , SGtransrelSG , SGboolh , SGintersect , SGsubtract , SGunion , SGxor , SGconcat

Example Illustration

 missing image of SGsupplement(SGA,SGB,relpos)

Syntax

SG=SGsupplement(SGA,SGB,[relpos])

Input Parameter

SGA: Solid A
SGB: Solid B
relpos: list of relative positions for SGtransrelSG

Output Parameter

SG: Boolean Result of A+(B-convechullof(A))

Examples


SGA=SGofCPLz([PLcircle(10);nan nan;PLcircle(8)],12);
SGB=SGTremove(SGbox,'all');
SGB=SGtransrelSG(SGB,SGA,'center','right',-5)
SGsupplement(SGA,SGB);
SGtransrelSG(SGA,SGB,'supp'); % does the same





Copyright 2021-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, SGsupplement, performs a Boolean addition of the solid parts of B that are outside of the convex hull of A. It is part of the SG-Library and was introduced in SolidGeometry 5.0.

Input Parameters

Output Results

Algorithm Steps

  1. The function starts by appending the string 'supplement' to the list of additional arguments varargin.
  2. It then calls the function SGtransrelSG with the solids A and B, along with the modified list of arguments. This function performs the transformation and Boolean operation.
  3. If no output is requested (i.e., nargout == 0), the function proceeds to visualize the result:

Example Usage

The example provided demonstrates how to create solids A and B, transform B relative to A, and then use SGsupplement to perform the operation. It also shows that SGtransrelSG with the 'supp' option achieves the same result.

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