Interface BoundaryReadHandler3D

    • Method Detail

      • facetDefinitionReader

        FacetDefinitionReader facetDefinitionReader​(GeometryInput in)
        Return a FacetDefinitionReader for reading raw facets from the given input stream.
        Parameters:
        in - input stream to read from
        Returns:
        facet definition reader instance
        Throws:
        java.lang.IllegalStateException - if a data format error occurs
        java.io.UncheckedIOException - if an I/O error occurs
      • facets

        java.util.stream.Stream<FacetDefinition> facets​(GeometryInput in)
        Return a Stream that can be used to access all facet information from the given input stream. The input stream is expected to contain data in the format supported by this handler.

        The underlying input stream is closed when the returned stream is closed. Callers should therefore use the returned stream in a try-with-resources statement to ensure that all resources are properly released.

          try (Stream<FacetDefinition> stream = handler.facets(in)) {
              // access stream content
          }
         

        The following exceptions may be thrown during stream iteration:

        • IllegalArgumentException if mathematically invalid data is encountered
        • IllegalStateException if a parsing or syntax error occurs
        • UncheckedIOException if an I/O error occurs
        Parameters:
        in - input stream to read from; this is not closed when the returned stream is closed
        Returns:
        stream providing access to the facet information from the given input stream
        Throws:
        java.io.UncheckedIOException - if an I/O error occurs during stream creation
      • readTriangleMesh

        TriangleMesh readTriangleMesh​(GeometryInput in,
                                      org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
        Read a triangle mesh from the given input. Implementations may throw runtime exceptions if mathematically invalid boundaries are encountered.
        Parameters:
        in - input stream to read from
        precision - precision context used for floating point comparisons
        Returns:
        triangle mesh containing the data from the given input stream
        Throws:
        java.lang.IllegalStateException - if a parsing or syntax error occurs
        java.io.UncheckedIOException - if an I/O error occurs