Class MeshLabLauncher

java.lang.Object
org.web3d.x3d.jsail.MeshLabLauncher

public class MeshLabLauncher
extends java.lang.Object
Utility class for invoking and launching MeshLab via local operating system to perform a variety of conversion tasks. Note use of static methods.

See Also:
STL (file format), MeshLab, Wikipedia: MeshLab, SourceForge: meshlab in command-line?, SourceForge: Automating Meshlab conversion , GitHub: meshlabserver.txt command-line help, GitHub: TheNerdJedi/MeshlabAuto, Mr. P. MeshLab Tutorials: MeshLab Basics, Mr. P. MeshLab Tutorials: 3D Scanning pipeline, Mr. P. MeshLab Tutorials: Features, Mr. P. MeshLab Tutorials: Cleaning, StackOverflow: MeshLab, GitHub: MeshlabAuto, GitHub: issues, MeshLab References, Java Tutorials: Understanding (Static) Class Members, X3D Scene Authoring Hints
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static java.lang.String MESHLAB_PATH_DEFAULT_LINUX
    Default MeshLab path default for Linux operating system, possibly unneeded if meshlabserver is in path already.
    static java.lang.String MESHLAB_PATH_DEFAULT_MACOS
    Default MeshLab path default for macOS operating system, possibly unneeded if meshlabserver is in path already.
    static java.lang.String MESHLAB_PATH_DEFAULT_WINDOWS
    Default MeshLab path default for Windows 7 or 10 operating system, possibly unneeded if meshlabserver is in path already.
    static java.lang.String MESHLAB_URL
    MeshLab website URL
    static java.lang.String USAGE
    Usage: java [-classpath X3DJSAIL.*.jar] org.web3d.x3d.jsail.MeshLabLauncher sourceFile [-convert [resultFile]] [-home | -help | -properties fileName.properties | -MESHLAB_PATH directoryPath]
  • Constructor Summary

    Constructors 
    Constructor Description
    MeshLabLauncher()  
  • Method Summary

    Modifier and Type Method Description
    static void checkMeshLabPath()
    Check MeshLab local path and also executable name, reset to operating system defaults if necessary.
    static boolean convertModel​(java.lang.String inputFileName, java.lang.String outputFileName)
    Use meshLab to convert model from one file to another.
    static boolean convertModel​(java.lang.String path, java.lang.String inputFileName, java.lang.String outputFileName)
    Use meshLab to convert model from one file to another.
    protected static java.lang.String executeCommand​(java.lang.String command)
    Launch MeshLab in operating system and run command.
    static boolean exportModelToFile​(X3DObject modelToExport, java.lang.String path, java.lang.String fileName)
    TODO: Use MeshLab to export geometry to STL
    static boolean exportSTLtoFile​(X3DObject modelToExport, java.lang.String path, java.lang.String fileName)
    TODO: Use MeshLab to export geometry to file
    static java.lang.String getMeshLabAnalytics​(X3DObject modelOfInterest)
    TODO: Get MeshLab metrics for X3D model of interest.
    static MetadataSetObject getMeshLabAnalyticsX3dMetadataSet​(X3DObject modelOfInterest)
    TODO: Get MeshLab metrics as MetadataSet object.
    static java.lang.String getMeshLabPath()
    Get directory path for location of meshlabserver program.
    static java.lang.String getMeshLabServerExecutableName()
    Get directory path for location of meshlabserver program: meshlabserver.exe on Windows, meshlabserver otherwise.
    static java.lang.String getMeshLabVersion()
    Get MeshLab version.
    static java.lang.String getPriorMeshLabTraceLogContents()
    Get contents of MeshLab trace log file produced during most recent MeshLab operation.
    static java.lang.String getPriorMeshLabTraceLogFilePath()
    Get name of MeshLab trace log file produced during most recent MeshLab operation.
    static boolean hasMeshLab()
    Determine if MeshLab is locally available.
    static X3DObject importModel​(java.lang.String fileName)
    Use meshLab to import model to X3D.
    static X3DObject importModel​(java.lang.String path, java.lang.String fileName)
    Use meshLab to import model to X3D.
    X3DObject importSTL​(java.lang.String path, java.lang.String fileName)
    TODO: Use meshLab to import STL geometry as X3D model
    static void initialize()
    Initialize this MeshLabLauncher instance to default values.
    static void launchMeshLabWebPage()
    Open MeshLab page
    static void main​(java.lang.String[] args)
    Default main() method provided for test and debugging purposes, invoking run() method.
    static void run​(java.lang.String arguments)
    Utility run() method provided for test and debugging purposes, allowing invocation with a single String (rather than a String[] array).
    static void run​(java.lang.String[] args)
    Default run() method provided for test and debugging purposes, first initializing ConfigurationProperties then reading properties file (if any) and processing arguments.
    static void setMeshLabPath​(java.lang.String newValue)
    Set directory path for location of meshlabserver program.
    static void setMeshLabServerExecutableName​(java.lang.String newValue)
    Set meshLabServerExecutableName for alternate name of meshlabserver program.
    static void setPriorMeshLabTraceLogFilePath​(java.lang.String value)
    Set name of MeshLab trace log file produced during most recent MeshLab operation.
    static boolean wasPriorCommandSuccessful()
    Report whether prior command execution was successful.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait