Documentation of 'jvx.loader.PgStlbLoader' Java class
PgStlbLoader ("JavaView Reference Manual")
"JavaView? v5.03.003"
jvx.loader

Class PgStlbLoader

  • All Implemented Interfaces:
    PgLoaderIf


    public final class PgStlbLoader
    extends PgAbstractLoader
    Loader for geometry files given in STL file format. When loading, compare vertices to already loaded vertices and identify immediately.
    Author:
    Ulrich Reitebuch
    Version:
    09.03.15, 2.00 revised (kp) Moved to jvx.loader from dev.loader.
    12.03.14, 1.00 created (ur)
    • Constructor Detail

      • PgStlbLoader

        public PgStlbLoader()
        Constructor.
    • Method Detail

      • read

        public PgJvxSrc[] read(java.io.BufferedReader in)
        Read an STL geometry file and return an array of new geometries.

        The returned array of geometry may contain keyframes of an animation. This is checked with the method isAnimation().

        Alternatively, one may call load(BuffereredReader) followed by getGeometries() resp. getAnimations() to have a finer control about which information one wants to use from a source. For example, optional display information must be retrieve by a subsequent call getDisplayOption() if available.

        Specified by:
        read in interface PgLoaderIf
        Overrides:
        read in class PgAbstractLoader
        Parameters:
        in - BufferedReader to read textual data from.
        Returns:
        Array of JVX geometries.
        See Also:
        write(Writer, PgJvxSrc [])
        Author:
        Konrad Polthier
        Version:
        10.06.01, 1.10 revised (kp) Return an array instead a single geometry.
        26.02.01, 1.00 created (kp)
      • isAscii

        public static boolean isAscii(java.io.BufferedReader in)
                               throws java.io.IOException
        Determine if input file is ASCII by checking first word to be "solid". In case of STL file, decide by the first five characters whether to read as ASCII file or as binary file. The ASCII file would always begin with the word "solid", the binary file will never.

        Note, reader will return at same read position, typically at the beginning of file.

        Parameters:
        in - Buffered reader from current STL file
        Returns:
        true if file contains STL in ASCII format
        Throws:
        java.io.IOException
      • write

        public boolean write(java.io.Writer writer,
                             PgJvxSrc[] geomArr)
                      throws java.io.IOException
        Write a single element set into an output stream writer. Only the first element set of an array is exported.
        Specified by:
        write in interface PgLoaderIf
        Overrides:
        write in class PgAbstractLoader
        Parameters:
        writer - Write all data to this stream
        geomArr - Array with geometries to save
        Returns:
        true on success.
        Throws:
        java.io.IOException
        See Also:
        read(BufferedReader)
        Version:
        09.02.02, 1.10 revised (kp) Export floats in non-exponential form.
        10.06.01, 1.00 created (kp)
"JavaView? v5.03.003"

"

The software JavaView? is copyright protected. All Rights Reserved.
"

Ads help maintain this website.