Description
Count integer voxel cells in the intersection of two half-open integer boxes; touching faces have zero cells and no physical-volume inference.
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 integer voxel cells in the intersection of two half-open integer boxes; touching faces have zero cells and no physical-volume inference.
When to use this tool
Use this tool to count integer voxel cells in the intersection of two half-open integer boxes; touching faces have zero cells and no physical-volume inference.
How to use the tool and how it works
- Enter leftLow, leftHigh, rightLow, rightHigh using the field definitions below.
- Run the operation. Correct input errors before interpreting an output.
- Read result.dimensions, result.count. Use the ordering, boundary rules and absence conditions described below.
For each axis, clamp min(highs) − max(lows) at zero. Return these overlap dimensions and their exact product as decimal text.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| leftLow | Inclusive low [x, y, z] integer corner of the named half-open box. | Dense list of at most 128 finite numbers; integer/shape constraints above also apply. |
| leftHigh | Exclusive high [x, y, z] integer corner of the named half-open box. | Dense list of at most 128 finite numbers; integer/shape constraints above also apply. |
| rightLow | Inclusive low [x, y, z] integer corner of the named half-open box. | Dense list of at most 128 finite numbers; integer/shape constraints above also apply. |
| rightHigh | Exclusive high [x, y, z] integer corner of the named half-open box. | Dense list of at most 128 finite numbers; integer/shape constraints above also apply. |
| Output field | Interpretation |
|---|---|
| result | Object containing the named fields below. |
| result.dimensions | Resulting three-axis cell dimensions. |
| result.count | Exact overlapping cell count as decimal text. |
{
"input": {
"leftLow": [
0,
0,
0
],
"leftHigh": [
3,
3,
3
],
"rightLow": [
2,
1,
0
],
"rightHigh": [
4,
2,
2
]
},
"output": {
"result": {
"dimensions": [
1,
1,
2
],
"count": "2"
}
}
} Limitations and assumptions
- Touching half-open faces have zero overlap volume.
- 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
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 Halo Cell Budget
Budget exact additional voxel cells for a symmetric integer halo around a supplied positive cuboid, counting edges/corners once; no boundary clipping or memory overhead.