SGbool5

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Boolean
Introduced first in SolidGeometry 4.1, Creation date: 2017-08-08, Last change: 2025-09-14

returns the correct result of a boolean operation on two closed elementary solids

Description

SGbool5 hast much less limitations than SGbool3 and SGBool4. All functions SGbool3-5 are now much faster.
Use CSGsample for testing.
Nevertheless, it should be clear that there are limitations even of closed surface models with SGbool3 and SGBool4:
1. Never have identical points in both surfaces
2. Never have identical lines in both surfaces
3. Never have indentical surface planes in both surfaces
If there is a risc, use SGgrow to grow before substraction or addition by 1e-4
It is possible to remove those problems one day by cutting tetrahedrons instead of triangles
A => A without B
B => B without A
+ => A combined with B
x => A intersected with B

BTW: CATIA LIMITS THE SPATIAL RESOLUTION TO 0.01mm, ie. 1e-2

See Also:

Example Illustration

 missing image of SGbool5(flag,A,B,thr)

Syntax

SGR=SGbool5(flag,A,B,[thr])

Input Parameter

flag: Boolean operator ('AB+x')
A: Solid A (VL/FL)
B: Solid B (VL/FL)
thr: threshold for grid; default is 1e-5

Output Parameter

SGR: resulting surface geometry

Examples


[A,B]=CSGsample(1); SGbool5('-',A,B);
[A,B]=CSGsample(2); SGbool5('-',A,B);
[A,B]=CSGsample(3); SGbool5('-',A,B);
[A,B]=CSGsample(4); SGbool5('-',A,B);
[A,B]=CSGsample(5); SGbool5('-',A,B);
[A,B]=CSGsample(6); SGbool5('-',A,B);
[A,B]=CSGsample(7); SGbool5('-',A,B);




Copyright 2017-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

Last html export of this page out of FM database by TL: 2025-09-21