SGTconnect

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Surfaces
Introduced first in SolidGeometry 4.7, Creation date: 2019-07-14, Last change: 2025-09-14

connects the geometries of two solids based on surfaces that are identified by frame names

Description

Simplified Frame Name Based version of SGconnect2FS


See Also: SGTconnect , SGtransrelSG

Example Illustration

 missing image of SGTconnect(SGA,SGB,TNA,TNB,d)

Syntax

SGC=SGTconnect(SGA,SGB,TNA,TNB,[d])

Input Parameter

SGA: Solid A
SGB: Solid B
TNA: Frame Name A
TNB: Frame Name B
d: distance in z

Output Parameter

SGC: Final solid with copied frame names

Examples


SGsample(17); A=ans; SGTset(A,'M',[1 0 0]); A=ans; SGTset(A,'B',[-1 0 0]); A=ans
SGtorquefuse; B=ans
SGTconnect(A,B,'M','B',10); C=ans;
SGTconnect(C,B,'F','B',10);




Copyright 2019-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, SGTconnect, connects the geometries of two solids based on surfaces identified by frame names. It is a simplified version of SGconnect2FS and is part of the SolidGeometry library.

Input Parameters

Output

Algorithm Steps

  1. Retrieve the distance d and a boolean rf from the optional parameters using getfuncparams.
  2. Get the transformation matrix TA for Solid A using SGTget with frame name TNA.
  3. Transform Solid A to the origin using SGtransrelT with the inverse of TA.
  4. Align Solid B to Solid A using SGtransrelSG with the transformation that includes the frame names TNB and TNA, and a translation by d in the z-direction.
  5. Connect the two solids using SGconnect2FS with the frame names and the boolean rf.
  6. Transform the resulting solid back using SGtransT with the transformation matrix TA.
  7. If no output is requested, plot the resulting solid using SGTplot in a new figure with a specific view angle.
Algorithm explaination created using ChatGPT on 2025-08-19 07:31. (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