Skip to content

Main content

Voxel Occupancy Surface Face Count

Count unit faces exposed by a deduplicated explicit voxel occupancy set, subtracting shared orthogonal faces; no meshing, physical scale or cavity exterior flood-fill.

Loading tool…

Description

Count unit faces exposed by a deduplicated explicit voxel occupancy set, subtracting shared orthogonal faces; no meshing, physical scale or cavity exterior flood-fill.

A voxel is a cell on a three-dimensional integer lattice. Coordinates use [x, y, z] order; a box uses an inclusive low corner and exclusive high corner, so its dimensions count cells rather than physical distance. Occupancy records can repeat the same cell without creating extra occupied space.

Count unit faces exposed by a deduplicated explicit voxel occupancy set, subtracting shared orthogonal faces; no meshing, physical scale or cavity exterior flood-fill.

When to use this tool

Use this tool to count unit faces exposed by a deduplicated explicit voxel occupancy set, subtracting shared orthogonal faces; no meshing, physical scale or cavity exterior flood-fill.

How to use the tool and how it works

  1. Enter coordinates using the field definitions below.
  2. Run the operation. Correct input errors before interpreting an output.
  3. Read result.exposedFaces. Use the ordering, boundary rules and absence conditions described below.

Deduplicate coordinates, then count each cell’s six orthogonal neighbors that are absent from the occupancy set. Sum the exposed unit faces.1

Input fieldMeaning and unitsAccepted input
coordinatesList of [x, y, z] occupied integer cell coordinates; duplicates are coalesced for occupancy operations.Dense list of at most 128 numeric rows, each at most 128 finite entries; required row shape is stated above.
Output fieldInterpretation
resultObject containing the named fields below.
result.exposedFacesNumber of exposed orthogonal unit-cell faces, including cavity-facing faces.
json
{
  "input": {
    "coordinates": [
      [
        0,
        0,
        0
      ],
      [
        1,
        0,
        0
      ],
      [
        1,
        0,
        0
      ]
    ]
  },
  "output": {
    "result": {
      "exposedFaces": 10
    }
  }
}

Limitations and assumptions

  • Faces bordering enclosed cavities count too; this is not an exterior-only surface or a physical area.
  • Voxel components are integers from −1,000,000,000 through 1,000,000,000; dimensions are three integers from 1 through 1,000,000. Counts or strides returned as decimal text use exact integer arithmetic. No physical voxel size is assumed.
  • Every declared top-level input field is required and unexpected fields are rejected. Ordinary strings are limited to 8,192 UTF-16 code units and lists to 128 entries, with tighter operation-specific bounds where stated. JSON text has bounded nesting and node counts.
  • Numeric outputs must be finite and no larger in absolute magnitude than the safe-integer limit; operations returning exact large integers use decimal text. Positions are zero-based and spans end exclusively unless the operation explicitly states a different convention.

Alternative or Complementary methods

Keep cell coordinates, storage order and physical scale separate. Use coordinate conversion for a different memory layout and a separate meshing or geometric model for rendered surfaces.

References

  1. Tool behavior and example: Voxel Occupancy Surface Face Count — tool.io

Similar or alternative tools

  • Voxel Box Boundary Cell Count

    Count distinct boundary voxel cells of a positive-size integer cuboid as total minus strictly interior; edges/corners count once.

  • Voxel Box Overlap Cell Count

    Count integer voxel cells in the intersection of two half-open integer boxes; touching faces have zero cells and no physical-volume inference.