SGselect3d

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

Interactive slection of a point, vertex, or facet in a axis



See Also: select3d , SGhelptext , SGselect3dPL , SGselect3Dsurface

Example Illustration

 missing image of SGselect3d(SG,tx)

Syntax

[p,v,vi,f,fi,haxis]=SGselect3d([SG,tx])

Input Parameter

SG: Solid geometry; if empty gca is used
tx: optional menue header

Output Parameter

p: point
v: vertex
vi: vertex index
f: facet
fi: facet index
haxis: gca

Examples


SGselect3d(SGsample(25),'test')
SGselect3d(SGofSG(SG)), TofPcam(ans)





Copyright 2018-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, SGselect3d, is designed for interactive selection of a point, vertex, or facet in a 3D axis. It is part of the SolidGeometry library and was introduced in version 4.4.

Input Parameters

Output Results

Algorithm Steps

  1. Retrieve the solid geometry (SG) and optional text (tx) from the input parameters using getfuncparams.
  2. If SG is not empty, create a new figure using SGfigure, plot the solid geometry with SGplot in green, and set the view to a specific angle (-30, 30).
  3. Display a help text using SGhelptext to guide the user through rotating the view and selecting a point or facet.
  4. Pause the execution to allow user interaction.
  5. Display another help text to prompt the user to select a point or facet.
  6. Enable camera lighting with camlightTL.
  7. Wait for a mouse input using ginput(1) and then call select3d to get the selected point, vertex, vertex index, facet, facet index, and axis handle.
  8. Clear the help text and adjust the axis position to fill the figure window.
  9. If no output arguments are specified, plot the selected facet and vertex using VLFLplot and VLplot, and enable 3D rotation with rotate3d on.
Algorithm explaination created using ChatGPT on 2025-08-19 06:57. (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