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
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
- SG: The solid geometry object that is to be dimensioned.
- ang1: The first angle, similar to a view angle. Default is 0 if not provided.
- ang2: The second angle, similar to a view angle. Default is 90 if not provided.
- pnt: The crossing point. If not provided, it defaults to the mean of the vertices list (VL) of the solid geometry.
Algorithm Steps
- Initialize
ang1 to 0 and ang2 to 90. Check if these values are provided in varargin and update them accordingly.
- 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.
- Retrieve additional function parameters using
getfuncparams with a default accuracy of 0.1.
- Transform the solid geometry using
SGofSG.
- Create a figure with ID 33 and plot the solid geometry using
SGplotalpha with a white color and transparency of 0.1.
- Call
viewdimensioning with ang1, ang2, and pnt to get the dimensioning view, and then close the figure with ID 33.
- 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