SGplotsurfaces

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - User interface
Introduced first in SolidGeometry 4.1, Creation date: 2017-08-16, Last change: 2025-09-14

plots closed surface of the solids seperatly in different colors

Description

very similar to SGsurfaceplot, but more a clear plotting function


See Also: SGseparate , SGsurfacessort , SGsurfaces , SGplotcell

Example Illustration

 missing image of SGplotsurfaces(SG,col,Fs,si)

Syntax

h=SGplotsurfaces(SG,[col,Fs,si])

Input Parameter

SG: Solid Geoemtry
col: color force; default is '';
Fs: Font size for descriptors; default is 0
si: surface selectors

Output Parameter

h: handle to drawing

Examples


SGfigure; view(-30,30); SGplotsurfaces(SGsample(17))
SGfigure; view(-30,30); SGplotsurfaces(SGsample(17),'',16);
SGfigure; view(-30,30); SGplotsurfaces(SGsample(17),'m',16);






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, SGplotsurfaces, is designed to plot closed surfaces of solids separately in different colors. It is part of the SolidGeometry library and was introduced in version 4.1. The function is similar to SGsurfaceplot but focuses on clearer plotting.

Input Parameters

Output

Algorithm Steps

  1. The function begins by separating the solid geometry using SGseparate, which returns the separated geometry and a list of indices SIL.
  2. Default values are set for col, Fs, and si if they are not provided.
  3. The number of surfaces n is determined from the size of SIL.
  4. If si is empty, it is set to include all surfaces from 1 to n.
  5. The function iterates over each selected surface index in si:
  6. The handle h is updated with each plot and text label created.
Algorithm explaination created using ChatGPT on 2025-08-19 07:40. (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