SGsurfacedistance

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Analytical Geometry
Introduced first in SolidGeometry 5.0, Creation date: 2020-12-16, Last change: 2025-09-15

calculates the shift distance from a solid to the surface of another solid

Description

integrated also into SGtransrelSG

See Also: SGtransrelSG , VLprojection2SG , crosspointVLFL

Example Illustration

 missing image of SGsurfacedistance(A,B,ez)

Syntax

[d,NA]=SGsurfacedistance(A,B,[ez])

Input Parameter

A: Solid to move
B: Solid to be touched
ez: orientation i.e. shift vector

Output Parameter

d: distance
NA: Shifted Solid A

Examples


SGsurfacedistance(SGtransP(SGsphere(1),[5 0 15]),SGsample(50),[0 0 -1])
SGsurfacedistance(SGtransP(SGsphere(1),[8 0 15]),SGsample(50),[0 0 -1])
SGsurfacedistance(SGtransP(SGsphere(1),[8 0 15]),SGsample(50),ezofchar('-z'))




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