SGmirrorD

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Analytical Geometry
Introduced first in SolidGeometry 5.2, Creation date: 2022-06-08, Last change: 2025-09-15

Mirrors a solid in a distance to the maximal dimension in the specified direction



See Also: SGmirrorD , SGmirrorTxy

Example Illustration

 missing image of SGmirrorD(SG,T,D,centr)

Syntax

[SGN,C]=SGmirrorD([SG,T,D,centr])

Input Parameter

SG: Solid Geometry
T: 'x','y','z' or T matrix
D: distance in direction
centr: true if result is centered; default is true

Output Parameter

SGN: mirrored Solid
C: Both solids combined (and centered)

Examples


SGmirrorD(SGbox([30,2,10]),'x',19)
SGmirrorD(SGbox([30,2,10]),'y',19)
SGmirrorD(SGbox([30,2,10]),'z',19)




Copyright 2022-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, SGmirrorD, mirrors a solid geometry in a specified direction and distance. It is part of the Solid Geometry library and was introduced in version 5.2.

Input Parameters

Output Results

Algorithm Steps

  1. Retrieve input parameters using getfuncparams.
  2. If T is a character, convert it to a transformation matrix using TofPez and ezofchar.
  3. Transform the solid geometry SG using the inverse of T with SGtransT.
  4. Calculate the maximum dimension in the 'z' direction using zofBB and adjust D accordingly.
  5. Mirror the solid using SGmirrorTxy with the original transformation Torg and adjusted distance D.
  6. Combine the original and mirrored solids using SGconcat.
  7. If centr is true, center the combined solid using SGtrans0.
  8. If no output is requested, plot the combined and original solids using SGfigure and SGplotalpha.
Algorithm explaination created using ChatGPT on 2025-08-19 06:51. (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