### Install Subsurface via Pip Source: https://github.com/softwareunderground/subsurface/blob/main/README.rst Installs the subsurface Python package using pip, the standard package installer for Python. Ensure Python and pip are installed and configured correctly. ```console pip install subsurface ``` -------------------------------- ### Install Subsurface via Conda Source: https://github.com/softwareunderground/subsurface/blob/main/README.rst Installs the subsurface Python package using Conda, a popular package and environment management system. This command installs from the conda-forge channel. ```console conda install -c conda-forge subsurface ``` -------------------------------- ### Git Repository Dependency Source: https://github.com/softwareunderground/subsurface/blob/main/requirements/requirements_wells.txt Specifies a dependency installed directly from a Git repository, often used for development versions or forks. This format is commonly used in Python package management. ```git git+https://github.com/Leguark/striplog.git ``` -------------------------------- ### REX File Header Block Specification Source: https://github.com/softwareunderground/subsurface/blob/main/subsurface/modules/writer/to_rex/doc/rex-spec-v1.md Details the fixed header block at the beginning of a REX file, including magic string, version, CRC32 checksum, number of data blocks, start of the first data block, and the total size of all data blocks. ```APIDOC REX File Header Block: | **size [bytes]** | **name** | **type** | **description** | |------------------|----------------|----------|---------------------------| | 4 | magic | string | REX1 | | 2 | version | uint16 | file version | | 4 | CRC32 | uint32 | crc32 (auto calculated) | | 2 | nrOfDataBlocks | uint16 | number of data blocks | | 2 | startData | uint16 | start of first data block | | 8 | sizeDataBlocks | uint64 | size of all data blocks | | 42 | reserved | - | reserved | ``` -------------------------------- ### Subsurface Writer Module Source: https://github.com/softwareunderground/subsurface/blob/main/docs/source/code-writer.rst Documentation for the main subsurface.writer module. This module serves as the entry point for various file writing operations within the subsurface library. ```APIDOC .. automodule:: subsurface.writer :no-inheritance-diagram:writer ``` -------------------------------- ### Development Requirements Source: https://github.com/softwareunderground/subsurface/blob/main/requirements/requirements_all.txt Lists the Python packages and tools required for development, testing, and building the subsurface project. ```requirements.txt -r requirements_dev.txt ``` -------------------------------- ### Core Project Requirements Source: https://github.com/softwareunderground/subsurface/blob/main/requirements/requirements_all.txt Lists the fundamental Python packages required for the subsurface project. ```requirements.txt -r requirements.txt ``` -------------------------------- ### Subsurface Writer to Binary Source: https://github.com/softwareunderground/subsurface/blob/main/docs/source/code-writer.rst API documentation for writing data to binary file formats. This section details the functions and classes responsible for binary serialization. ```APIDOC .. automodapi:: subsurface.writer.to_binary :no-inheritance-diagram:writer ``` -------------------------------- ### Subsurface Writer to REX Source: https://github.com/softwareunderground/subsurface/blob/main/docs/source/code-writer.rst API documentation for writing data to the REX file format. This covers various sub-modules related to REX file generation, including common structures, data encoding, and utilities. ```APIDOC .. automodule:: subsurface.writer.to_rex :no-inheritance-diagram:writer ``` ```APIDOC .. automodapi:: subsurface.writer.to_rex.common :no-inheritance-diagram:writer ``` ```APIDOC .. automodapi:: subsurface.writer.to_rex.data_struct :no-inheritance-diagram: ``` ```APIDOC .. automodapi:: subsurface.writer.to_rex.gempy_to_rexfile :no-inheritance-diagram:writer ``` ```APIDOC .. automodapi:: subsurface.writer.to_rex.material_encoder :no-inheritance-diagram:writer ``` ```APIDOC .. automodapi:: subsurface.writer.to_rex.mesh_encoder :no-inheritance-diagram: ``` ```APIDOC .. automodapi:: subsurface.writer.to_rex.rex_api :no-inheritance-diagram:writer ``` ```APIDOC .. automodapi:: subsurface.writer.to_rex.to_rex :no-inheritance-diagram:writer ``` ```APIDOC .. automodapi:: subsurface.writer.to_rex.utils :no-inheritance-diagram: ``` -------------------------------- ### Supported Data Block Types Source: https://github.com/softwareunderground/subsurface/blob/main/subsurface/modules/writer/to_rex/doc/rex-spec-v1.md Lists the currently supported data block types, their IDs, descriptions, and availability in C, Go, and C#. ```APIDOC Supported Data Block Types: ID | Type | Description | C | Go | C# ---|----------------|-----------------------------------------------------------------|------------|------------|---------- 0 | LineSet | A list of vertices which get connected by line segments | Supported | Supported | Supported 1 | Text | A position information and the actual text | Supported | Supported | Supported 2 | PointList | A list of 3D points with color information (e.g. point cloud) | Supported | Supported | Supported 3 | Mesh | A triangle mesh datastructure | Supported | Supported | Supported 4 | Image | A single of arbitrary format can be stored in this block | Supported | Supported | Supported 5 | MaterialStandard | A standard (mesh) material definition | Supported | Supported | Supported 6 | SceneNode | A wrapper around a data block which can be used in the scenegraph | Not Supported | Supported | Not Supported 7 | Track | A track is a tracked position and orientation of an AR device | Not Supported | Supported | Not Supported ``` -------------------------------- ### Subsurface Profiles Core API Source: https://github.com/softwareunderground/subsurface/blob/main/docs/source/code-reader.rst API documentation for core profile data handling. This module provides fundamental functionalities for reading and processing profile data, such as seismic traces or well logs. ```APIDOC subsurface.reader.profiles.profiles_core - Automodapi directive for the profiles_core module within subsurface.reader.profiles. - Focuses on the core logic for reading and managing profile data. ``` -------------------------------- ### Subsurface Petrel Reader API Source: https://github.com/softwareunderground/subsurface/blob/main/docs/source/code-reader.rst API documentation for reading Petrel files. This module is designed to interface with data formats commonly used by Schlumberger's Petrel software. ```APIDOC subsurface.reader.petrel - Automodapi directive for the petrel module. - Contains functionalities for reading and processing Petrel-specific data formats. ``` -------------------------------- ### Subsurface Surfaces API Source: https://github.com/softwareunderground/subsurface/blob/main/docs/source/code-reader.rst API documentation for subsurface surface data access. This module likely provides a unified API for interacting with various surface data representations. ```APIDOC subsurface.reader.mesh.surfaces_api - Automodapi directive for the surfaces_api module within subsurface.reader.mesh. - Offers high-level functions for accessing and managing surface data. ``` -------------------------------- ### Jinja2 Website Layout with Dynamic Menu Source: https://github.com/softwareunderground/subsurface/blob/main/docs/source/_templates/layout.html This Jinja2 template defines a website layout structure. It extends a base layout and includes a navigation menu that dynamically displays links if the 'menu_links' variable is present. The menu iterates through a list of text-link pairs. ```Jinja2 {% extends "!layout.html" %} {% block menu %} {{ super() }} {% if menu_links %} {{ menu_links_name }} {% for text, link in menu_links %}* [{{ text }}]({{ link }}) {% endfor %} {% endif %} {% endblock %} ``` -------------------------------- ### Plotting Requirements Source: https://github.com/softwareunderground/subsurface/blob/main/requirements/requirements_all.txt Lists the Python packages specifically needed for data visualization and plotting functionalities within the subsurface project. ```requirements.txt -r requirements_plot.txt ``` -------------------------------- ### Subsurface Geo Object API Source: https://github.com/softwareunderground/subsurface/blob/main/docs/source/code-reader.rst API documentation for subsurface geo objects. This module likely defines common geometric objects and their associated methods used across the subsurface library. ```APIDOC subsurface.reader.geo_object - Automodapi directive for the geo_object module. - Expected to define base classes or utilities for geological objects. ``` -------------------------------- ### Meshing Requirements Source: https://github.com/softwareunderground/subsurface/blob/main/requirements/requirements_all.txt Lists the Python packages required for mesh generation and manipulation in the subsurface project. ```requirements.txt -r requirements_mesh.txt ``` -------------------------------- ### Python Package Dependencies Source: https://github.com/softwareunderground/subsurface/blob/main/requirements/requirements_wells.txt Lists the Python packages required for the subsurface project. These are typically used in environment management files like requirements.txt or setup.py. ```python welly == 0.4.8 openpyxl ``` -------------------------------- ### Subsurface Wells Utilities API Source: https://github.com/softwareunderground/subsurface/blob/main/docs/source/code-reader.rst API documentation for utility functions related to wells. This module contains helper functions that support various operations on well data. ```APIDOC subsurface.reader.wells.wells_utils - Automodapi directive for the wells_utils module within subsurface.reader.wells. - Offers utility functions for well data processing and manipulation. ``` -------------------------------- ### Subsurface Surface Reader API Source: https://github.com/softwareunderground/subsurface/blob/main/docs/source/code-reader.rst API documentation for reading surface mesh data. This module handles the parsing and interpretation of surface geometries, often represented as meshes. ```APIDOC subsurface.reader.mesh.surface_reader - Automodapi directive for the surface_reader module within subsurface.reader.mesh. - Provides functionalities to read and process surface mesh data. ``` -------------------------------- ### Subsurface Topography Core API Source: https://github.com/softwareunderground/subsurface/blob/main/docs/source/code-reader.rst API documentation for core topography data handling. This module provides essential functions for reading and processing topographical data, like elevation models. ```APIDOC subsurface.reader.topography.topo_core - Automodapi directive for the topo_core module within subsurface.reader.topography. - Contains the primary functions for reading and processing topography data. ``` -------------------------------- ### Trace Analysis Requirements Source: https://github.com/softwareunderground/subsurface/blob/main/requirements/requirements_all.txt Lists the Python packages required for analyzing seismic traces or similar data in the subsurface project. ```requirements.txt -r requirements_traces.txt ``` -------------------------------- ### Subsurface Volume Utilities API Source: https://github.com/softwareunderground/subsurface/blob/main/docs/source/code-reader.rst API documentation for utility functions related to volume data. This module offers helper functions for processing and manipulating volume data read by the library. ```APIDOC subsurface.reader.volume.volume_utils - Automodapi directive for the volume_utils module within subsurface.reader.volume. - Contains utility functions that support volume data operations. ``` -------------------------------- ### Subsurface Welly Reader API Source: https://github.com/softwareunderground/subsurface/blob/main/docs/source/code-reader.rst API documentation for reading data using the Welly library. This module integrates with Welly to read and process well log data. ```APIDOC subsurface.reader.wells.welly_reader - Automodapi directive for the welly_reader module within subsurface.reader.wells. - Specifically designed for reading well data via the Welly library. ``` -------------------------------- ### REX General File Structure Specification Source: https://github.com/softwareunderground/subsurface/blob/main/subsurface/modules/writer/to_rex/doc/rex-spec-v1.md Outlines the overall structure of a REX file, which begins with a fixed header block, followed by a coordinate system block, and then a series of data blocks containing various types of information. ```APIDOC REX General File Structure: | **name** | **description** | |-------------------------|---------------------------------------| | File header block | header information (meta-data) | | Coordinate system block | coordinate system for all stored data | | Data block 1 | data | | Data block 2 | data | | ... | ... | | Data block n | data | ``` -------------------------------- ### Subsurface Reader Data API Source: https://github.com/softwareunderground/subsurface/blob/main/docs/source/code-reader.rst Provides API documentation for subsurface reader data functionalities. This section details the core components and methods for accessing and manipulating reader data within the subsurface library. ```APIDOC subsurface.reader.readers_data - Automodapi directive to generate API documentation for the readers_data module. - Likely includes classes and functions for managing reader data structures. ``` -------------------------------- ### Subsurface Volume Reader API Source: https://github.com/softwareunderground/subsurface/blob/main/docs/source/code-reader.rst API documentation for reading volume data. This module handles the reading and interpretation of volumetric data, such as seismic cubes or geological models. ```APIDOC subsurface.reader.volume.read_volume - Automodapi directive for the read_volume module within subsurface.reader.volume. - Provides functions specifically for reading volume data. ``` -------------------------------- ### Subsurface Wells API Source: https://github.com/softwareunderground/subsurface/blob/main/docs/source/code-reader.rst API documentation for accessing and managing well data. This module offers a comprehensive interface for working with well information within the subsurface project. ```APIDOC subsurface.reader.wells.wells_api - Automodapi directive for the wells_api module within subsurface.reader.wells. - Provides high-level functions for well data operations. ``` -------------------------------- ### Volume Processing Requirements Source: https://github.com/softwareunderground/subsurface/blob/main/requirements/requirements_all.txt Lists the Python packages necessary for processing volumetric data in the subsurface project. ```requirements.txt -r requirements_volume.txt ``` -------------------------------- ### Geospatial Requirements Source: https://github.com/softwareunderground/subsurface/blob/main/requirements/requirements_all.txt Lists the Python packages needed for handling and processing geospatial data within the subsurface project. ```requirements.txt -r requirements_geospatial.txt ``` -------------------------------- ### Subsurface NetCDF Reader API Source: https://github.com/softwareunderground/subsurface/blob/main/docs/source/code-reader.rst API documentation for reading NetCDF files. This module provides functionalities to parse and extract data from NetCDF formatted files, commonly used in geoscience applications. ```APIDOC subsurface.reader.read_netcdf - Automodapi directive to generate API documentation for the read_netcdf module. - Expected to contain functions for reading various types of NetCDF data. ``` -------------------------------- ### Subsurface Pandas to Welly API Source: https://github.com/softwareunderground/subsurface/blob/main/docs/source/code-reader.rst API documentation for converting Pandas DataFrames to Welly objects. This module facilitates the integration of well data stored in Pandas with the Welly library. ```APIDOC subsurface.reader.wells.pandas_to_welly - Automodapi directive for the pandas_to_welly module within subsurface.reader.wells. - Focuses on the conversion of well data from Pandas format to Welly objects. ``` -------------------------------- ### Geological Formats API Documentation Source: https://github.com/softwareunderground/subsurface/blob/main/docs/source/code-geological-formats.rst API documentation for the geological_formats module and its submodules. This includes details on boreholes, faults, SEGY readers, and seismic data handling. The documentation is generated using Sphinx's automodapi directive, implying Python-based APIs. ```APIDOC subsurface.geological_formats - Main module for geological formats. subsurface.geological_formats.boreholes - API documentation for borehole data structures and operations. subsurface.geological_formats.fault - API documentation for fault representation and manipulation. subsurface.geological_formats.segy_reader - API documentation for reading and processing SEGY seismic data files. subsurface.geological_formats.seismic - API documentation for seismic data handling and analysis. ``` -------------------------------- ### Subsurface Well Files Reader API Source: https://github.com/softwareunderground/subsurface/blob/main/docs/source/code-reader.rst API documentation for reading various well data files. This module provides functionalities to parse different file formats containing well information. ```APIDOC subsurface.reader.wells.well_files_reader - Automodapi directive for the well_files_reader module within subsurface.reader.wells. - Handles reading well data from diverse file types. ``` -------------------------------- ### Subsurface Faults Reader API Source: https://github.com/softwareunderground/subsurface/blob/main/docs/source/code-reader.rst API documentation for reading fault data. This module is responsible for handling the reading and processing of geological fault information from various sources. ```APIDOC subsurface.reader.faults.faults - Automodapi directive to generate API documentation for the faults module within subsurface.reader.faults. - Focuses on reading and interpreting fault geometry and properties. ``` -------------------------------- ### Coordinate System Structure Source: https://github.com/softwareunderground/subsurface/blob/main/subsurface/modules/writer/to_rex/doc/rex-spec-v1.md Defines the structure for spatial reference system information, including its identifier, authentication name, and global offsets. ```APIDOC Coordinate System Structure: srid (uint32): spatial reference system identifier authName (string): name of the used system offsetX (float): global x-offset offsetY (float): global y-offset offsetZ (float): global z-offset ``` -------------------------------- ### Data Header Structure Source: https://github.com/softwareunderground/subsurface/blob/main/subsurface/modules/writer/to_rex/doc/rex-spec-v1.md Specifies the general header block for data blocks, containing type, version, size, and a unique data identifier. ```APIDOC Data Header Structure: type (uint16): data type version (uint16): version for this data block size (uint32): data block size (without header) dataId (uint64): id which is used in the database Total header size: 16 bytes. ``` -------------------------------- ### DataType LineSet Structure Source: https://github.com/softwareunderground/subsurface/blob/main/subsurface/modules/writer/to_rex/doc/rex-spec-v1.md Details the structure for a LineSet data type, including color channels, vertex count, and vertex coordinates. ```APIDOC DataType LineSet (ID 0): red (float): red channel green (float): green channel blue (float): blue channel alpha (float): alpha channel (1.0 means fully opaque) nrOfVertices (uint32): number of vertices x0 (float): x-coordinate of first vertex y0 (float): y-coordinate of first vertex z0 (float): z-coordinate of first vertex x1 (float): x-coordinate of second vertex ... ``` -------------------------------- ### Standard Material Data Block Source: https://github.com/softwareunderground/subsurface/blob/main/subsurface/modules/writer/to_rex/doc/rex-spec-v1.md Specifies the standard material properties for geometry. This includes ambient, diffuse, and specular color components, texture IDs, specular exponent, and alpha transparency. ```APIDOC DataType DataMaterialStandard (5): Structure for standard material properties. Parameters: Ka red: float (4 bytes) - RED component for ambient color. Ka green: float (4 bytes) - GREEN component for ambient color. Ka blue: float (4 bytes) - BLUE component for ambient color. Ka textureId: uint64 (8 bytes) - dataId of the referenced texture for ambient component. Kd red: float (4 bytes) - RED component for diffuse color. Kd green: float (4 bytes) - GREEN component for diffuse color. Kd blue: float (4 bytes) - BLUE component for diffuse color. Kd textureId: uint64 (8 bytes) - dataId of the referenced texture for diffuse component. Ks red: float (4 bytes) - RED component for specular color. Ks green: float (4 bytes) - GREEN component for specular color. Ks blue: float (4 bytes) - BLUE component for specular color. Ks textureId: uint64 (8 bytes) - dataId of the referenced texture for specular component. Ns: float (4 bytes) - Specular exponent (0 to 1000). alpha: float (4 bytes) - Alpha value between 0..1 (1 means full opaque). Notes: If no texture is available, `textureId` is set to `0x7fffffffffffffffL`. Ns value determines the tightness of the specular highlight. Render results may vary based on shader implementations. ``` -------------------------------- ### Mesh Header Structure Source: https://github.com/softwareunderground/subsurface/blob/main/subsurface/modules/writer/to_rex/doc/rex-spec-v1.md Defines the fixed-size header for mesh data blocks, containing metadata about the geometry and pointers to data sections. The header size is 128 bytes. ```APIDOC MeshHeader: lod: uint16 - Level of detail for the given geometry. maxLod: uint16 - Maximal level of detail for the given geometry. nrOfVtxCoords: uint32 - Number of vertex coordinates. nrOfNorCoords: uint32 - Number of normal coordinates (can be zero). nrOfTexCoords: uint32 - Number of texture coordinates (can be zero). nrOfVtxColors: uint32 - Number of vertex colors (can be zero). nrTriangles: uint32 - Number of triangles. startVtxCoords: uint32 - Start offset of the vertex coordinate block (relative to mesh block start). startNorCoords: uint32 - Start offset of the vertex normals block (relative to mesh block start). startTexCoords: uint32 - Start offset of the texture coordinate block (relative to mesh block start). startVtxColors: uint32 - Start offset of the colors block (relative to mesh block start). startTriangles: uint32 - Start offset of the triangle block for vertices (relative to mesh block start). materialId: uint64 - ID referring to the corresponding material block. If 0x7fffffffffffffffL, no material is available. string size: uint16 - Size of the following name string. name: string (variable size) - Name of the mesh (user-readable). The actual size is determined by 'string size' field. ``` -------------------------------- ### Colors Block Structure Source: https://github.com/softwareunderground/subsurface/blob/main/subsurface/modules/writer/to_rex/doc/rex-spec-v1.md Defines the structure for color components, typically used for vertex colors. Each component (red, green, blue) is represented as a 4-byte float. ```APIDOC Colors Block: Structure for defining color components. Parameters: red: float (4 bytes) - Red component of the first vertex. green: float (4 bytes) - Green component of the first vertex. blue: float (4 bytes) - Blue component of the first vertex. red: float (4 bytes) - Red component of the second vertex. ... Notes: Repeats for subsequent vertices. ``` -------------------------------- ### Image Data Block Source: https://github.com/softwareunderground/subsurface/blob/main/subsurface/modules/writer/to_rex/doc/rex-spec-v1.md Defines the structure for image or texture data. It includes a compression type identifier and the raw image data. The total block size accounts for both compression and data. ```APIDOC DataType Image (4): Structure for image or texture data. Parameters: compression: uint32 (4 bytes) - ID for the supported compression algorithm. data: bytes - The actual content data of the file. Supported Compression: ID 0: Raw24 (RGB 24 bit) ID 1: Jpeg ID 2: Png Notes: If a texture is stored, the 3D mesh refers to it via `dataId`. ``` -------------------------------- ### SceneNode Data Structure Definition Source: https://github.com/softwareunderground/subsurface/blob/main/subsurface/modules/writer/to_rex/doc/rex-spec-v1.md Defines the structure for a scene node within a scene graph. It wraps specific data blocks and places them into a scene graph, supporting instancing of geometry. The total size is 80 bytes, including geometry ID, name, translation, rotation (quaternion), and scale. ```APIDOC DataType SceneNode: Description: Describes a scene node embedded into a scene graph. Can be used to instance geometry data. Total Size: 80 bytes Fields: geometryId (uint64): Id of the data block containing geometry (can be zero). name (string): Name of the node (can be empty). tx (float): Translation X coordinate (in meters). ty (float): Translation Y coordinate (in meters). tz (float): Translation Z coordinate (in meters). rx (float): Rotation X component (quaternion). ry (float): Rotation Y component (quaternion). rz (float): Rotation Z component (quaternion). rw (float): Rotation W component (quaternion). sx (float): Scale X value (in meters). sy (float): Scale Y value (in meters). sz (float): Scale Z value (in meters). Transformation Order: T * R * S (Scale, then Rotation, then Translation). Notes: geometryId zero indicates an intermediate node without geometry; leaf nodes must contain geometry. ``` -------------------------------- ### Track Data Structure Definition Source: https://github.com/softwareunderground/subsurface/blob/main/subsurface/modules/writer/to_rex/doc/rex-spec-v1.md Defines the structure for a 3D track, representing a sequence of 3D positions and orientations of an AR device. Orientation is stored as a normalized normal vector of the device's LookAt vector. Timestamps use UNIX time. ```APIDOC DataType Track: Description: Describes a 3D track, which is a sequence of 3D position and orientation of an AR device. Fields: nrOfPoints (uint32): Number of points in the track. timestamp (int64): Timestamp in UNIX time (seconds since January 1, 1970 UTC). x (float): X-coordinate of the first point. y (float): Y-coordinate of the first point. z (float): Z-coordinate of the first point. nx (float): X-coordinate of the first normal vector (orientation). ny (float): Y-coordinate of the first normal vector (orientation). nz (float): Z-coordinate of the first normal vector (orientation). confidence (float): Tracking confidence of the first point. x (float): X-coordinate of the second point (continues sequence). ... (additional points follow the same pattern) Orientation Representation: Normalized normal vector of the device's LookAt vector. ``` -------------------------------- ### Vertex Coordinates Block Source: https://github.com/softwareunderground/subsurface/blob/main/subsurface/modules/writer/to_rex/doc/rex-spec-v1.md Specifies the structure for storing vertex coordinates. Each vertex consists of three float components (x, y, z). The total number of vertices is indicated by nrOfVtxCoords in the MeshHeader. ```APIDOC VertexCoordinatesBlock: vertex_data: array of {x: float, y: float, z: float} - Each element represents the 3D coordinates of a vertex. ``` -------------------------------- ### UnstructuredData Structure Source: https://github.com/softwareunderground/subsurface/blob/main/subsurface/core/structs/README.rst Represents unstructured data, primarily a wrapper around xarray.Dataset. It defines required and optional data variables for vertex and cell information, facilitating compatibility with various data formats. ```APIDOC UnstructuredData: Description: Wrapper around xarray.Dataset for unstructured data. Constructor: __init__(self, vertex_data: xr.DataArray, cell_data: xr.DataArray, default_vertex_attr_name: str = "vertex_attr", default_cell_attr_name: str = "cell_attr", **kwargs) - Initializes UnstructuredData with core vertex and cell data. - Parameters: - vertex_data: xr.DataArray with dims ["points", "XYZ"] (Required) - cell_data: xr.DataArray with dims ["cell", "nodes"] (Required) - default_vertex_attr_name: Name for default vertex attributes (default: "vertex_attr") - default_cell_attr_name: Name for default cell attributes (default: "cell_attr") - **kwargs: Additional xr.DataArray variables. Must contain at least one dimension "cell" or "points". Attributes: vertex: xr.DataArray with dims ["points", "XYZ"] cell: xr.DataArray with dims ["cell", "nodes"] default_vertex_attr_name: str default_cell_attr_name: str Other data_vars: xr.DataArray instances as defined in **kwargs. ``` -------------------------------- ### Texture Coordinates Block Source: https://github.com/softwareunderground/subsurface/blob/main/subsurface/modules/writer/to_rex/doc/rex-spec-v1.md Specifies the structure for storing texture coordinates. Each texture coordinate consists of two float components (u, v). This block is optional and its presence is indicated by nrOfTexCoords in the MeshHeader. ```APIDOC TextureCoordinatesBlock: texture_data: array of {u: float, v: float} - Each element represents the 2D texture coordinates for a vertex. ``` -------------------------------- ### Triangle Block Structure Source: https://github.com/softwareunderground/subsurface/blob/main/subsurface/modules/writer/to_rex/doc/rex-spec-v1.md Specifies the format for triangle data, consisting of vertex indices. The orientation must be counter-clockwise (CCW). Each index is a 32-bit unsigned integer. ```APIDOC Triangle Block: Structure for defining triangles using vertex indices. Parameters: v0: uint32 (4 bytes) - First index of the first triangle. v1: uint32 (4 bytes) - Second index of the first triangle. v2: uint32 (4 bytes) - Third index of the first triangle. v0: uint32 (4 bytes) - First index of the second triangle. ... Notes: Triangle orientation must be counter-clockwise (CCW). Indices refer to the same normal and texture positions. ``` -------------------------------- ### StructuredData Structure Source: https://github.com/softwareunderground/subsurface/blob/main/subsurface/core/structs/README.rst Represents structured data, primarily a wrapper around a single xarray.DataArray. It is designed to hold primary data and associated metadata, allowing for flexible data representation. ```APIDOC StructuredData: Description: Wrapper around a primary xarray.DataArray for structured data. Constructor: __init__(self, data_array_name: xr.DataArray, **kwargs) - Initializes StructuredData with a primary data array. - Parameters: - data_array_name: The primary xr.DataArray (Required). Can be given a custom name upon construction. - **kwargs: Additional xr.DataArray variables that share dimensions with the primary data_array_name. Attributes: data_array_name: xr.DataArray (The primary data array) Other data_vars: xr.DataArray instances as defined in **kwargs. ``` -------------------------------- ### Normals Coordinates Block Source: https://github.com/softwareunderground/subsurface/blob/main/subsurface/modules/writer/to_rex/doc/rex-spec-v1.md Specifies the structure for storing normal vectors. Each normal consists of three float components (nx, ny, nz). This block is optional and its presence is indicated by nrOfNorCoords in the MeshHeader. ```APIDOC NormalsCoordinatesBlock: normal_data: array of {nx: float, ny: float, nz: float} - Each element represents the 3D normal vector for a vertex. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.