SGdimensioning

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - ENG-Dimensioning
Introduced first in SolidGeometry 4.0, Creation date: 2017-07-12, Last change: 2025-09-14

creates a drawing of the solid including dimensions



See Also: SGTdimensioning , viewdimensioning , PLdimensioning , CVLdimclassifier

Example Illustration

 missing image of SGdimensioning(SG,ang1,ang2,pnt)

Syntax

SGdimensioning(SG,[ang1,ang2,pnt])

Input Parameter

SG: Solid geometry
ang1: angle 1 similar to view
ang2: angle 2 similar to view
pnt: crossing point

Examples


A=SGbox([30,20,10])
SGdimensioning(A,0,0)
SGdimensioning(A,0,90)
SGdimensioning(A,90,0)




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

Algorithm (Workflow)

This function, SGdimensioning, is designed to create a drawing of a solid geometry (SG) including dimensions. It is part of the SG-Library and was introduced in SolidGeometry 4.0.

Input Parameters

Algorithm Steps

  1. Initialize ang1 to 0 and ang2 to 90. Check if these values are provided in varargin and update them accordingly.
  2. Initialize pnt to an empty string. If a value is provided in varargin, update pnt. If pnt is a scalar, convert it to a 3D point with [0 0 pnt]. If pnt is still empty, set it to the mean of the vertices list of the solid geometry.
  3. Retrieve additional function parameters using getfuncparams with a default accuracy of 0.1.
  4. Transform the solid geometry using SGofSG.
  5. Create a figure with ID 33 and plot the solid geometry using SGplotalpha with a white color and transparency of 0.1.
  6. Call viewdimensioning with ang1, ang2, and pnt to get the dimensioning view, and then close the figure with ID 33.
  7. If there are no output arguments, create a new figure and call PLdimensioning with the dimensioning view and accuracy. Set the title of the figure using the caller's title and the angles.
Algorithm explaination created using ChatGPT on 2025-08-19 07:12. (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