Syntax
[SG,h,L]=SGmodelNode([D,L,R,CPL,ez])
Input Parameter
D : | | Diameter of the post; default is 10 |
L : | | Height of the post; default is 15 |
R : | | Rotation matrix; default is eye(3) |
CPL : | | Contour of the post; default is PLstar(D,16); |
ez : | | Orientation vector; [0 0 1]; [0 -1 0] etc. |
Output Parameter
SG : | | Solid Geoemtry |
h : | | height of solid |
L : | | |
Examples
Show the rotation of the posts:
SGmodelNode('','',rot(pi/6,0, 0));
SGmodelNode('','',rot(0,pi/6, 0));
SGmodelNode('','',rot(0, 0, pi/6));
Copyright 2016-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, SGmodelNode, generates a solid geometry of a post with specified parameters. It is part of the SG-Library and was created by Tim Lueth in December 2016.
Input Parameters
- D: Diameter of the post. Default is 10 mm.
- L: Height of the post. Default is 15 mm.
- R: Rotation matrix. Default is the identity matrix (eye(3)).
- CPL: Contour of the post. Default is generated by PLstar(D,16).
- ez: Orientation vector. Examples include [0 0 1] or [0 -1 0].
Output Results
- SG: Solid Geometry of the post.
- h: Height of the solid geometry.
- L: Height of the post (same as input L).
Algorithm Steps
- Initialize default values for D, L, R, CPL, and ez.
- Check if input arguments are provided and update the default values accordingly.
- If D is a single value, set CPL using PLstar with D/2 and 16 points. Otherwise, use D as CPL.
- Create a transformation matrix T using the rotation matrix R and the height L.
- Generate the solid geometry SG using the contour CPL and transformation T with the function SGofCPLT.
- Calculate the bounding box of the solid geometry using BBofVL and determine the height h.
- If no output is requested, visualize the solid geometry using SGfigure and SGT functions.
Example Usage
To demonstrate the rotation of the posts, the function can be called with different rotation matrices:
- SGmodelNode('', '', rot(pi/6, 0, 0));
- SGmodelNode('', '', rot(0, pi/6, 0));
- SGmodelNode('', '', rot(0, 0, pi/6));
Algorithm explaination created using ChatGPT on 2025-08-19 07:13. (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