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
- SGA: Solid A
- SGB: Solid B
- TNA: Frame Name A
- TNB: Frame Name B
- d: Distance in the z-direction (optional)
Output
- SGC: Final solid with copied frame names
Algorithm Steps
- Retrieve the distance
d
and a boolean rf
from the optional parameters using getfuncparams
.
- Get the transformation matrix
TA
for Solid A using SGTget
with frame name TNA
.
- Transform Solid A to the origin using
SGtransrelT
with the inverse of TA
.
- 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.
- Connect the two solids using
SGconnect2FS
with the frame names and the boolean rf
.
- Transform the resulting solid back using
SGtransT
with the transformation matrix TA
.
- 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