SGwriteVRML

by Tim Lueth & Alexandra Mercader, SG-Lib Toolbox: SolidGeometry 5.6 - Import/Export
Introduced first in SolidGeometry 4.4, Creation date: 2018-11-27, Last change: 2025-09-14

Writen an STL Geometry in a VRML File Format.

Description

This function was required by Alexandra Mercader, to use the3-Printer of 2006 in combination with the starch powder and colored binder liquids. This printer is not able to use OBJ or STL Files that support the "materialize color convention" for integration color information into the geometries.
The problem of using matlabs STL2vrml convter could be that this "materialize color convention" is may be not convertet. Therefor, the need could be to write the vrml exporter to integrate colors and many other features that are supported by VRML but not by STL such as separation of differeet solids.
Matlab's stl2vrml converter comes from humusoft that made the product orbisnap
On mac there is view3dscene-3.15.0-macosx available
Color bytes are expected in RGB order in Materialize Magics format. Color bytes are expected in BGR order in VisCAM/SolidView format

See Also: SGwriteSTL

Example Illustration

 missing image of SGwriteVRML(SG,FNAME,ONAME,vcol)

Syntax

fname=SGwriteVRML(SG,[FNAME,ONAME,vcol])

Input Parameter

SG: Solid Geoemtry
FNAME: Optional Filename
ONAME: optional Solid name; default is by username
vcol: optional Color for the solid

Output Parameter

fname:

Examples


A=SGbox([30,20,10]); A.col='g'; A.alpha=0.4; A
fname=SGwriteVRML(A)
openbydoubleclick(fname)




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

Last html export of this page out of FM database by TL: 2025-09-21