Manifold MissingPositionProperties Error

Diagnostic signature

MissingPositionProperties

The MissingPositionProperties diagnostic in Manifold indicates that an input mesh lacks the mandatory three leading property channels needed to define spatial vertex positions. It is emitted when constructing geometry from a mesh wrapper containing insufficient coordinate data.

What it means

This diagnostic is an explicit error state (`Manifold::Error::MissingPositionProperties`) indicating that a provided mesh object does not supply enough basic vertex properties to define a spatial shape in 3D space. In the Manifold toolchain, geometry vertex data is supplied as an interleaved sequence array. Every vertex mapped by this array must feature at least three contiguous properties representing the primary X, Y, and Z Euclidean spatial coordinates. If the specified property count per vertex drops below this fundamental baseline, the kernel refuses to process the mesh layout and transitions to an errored state, preventing downstream operations.

Why it happens

The engine sets this status flag when a `manifold::Manifold` instance is explicitly instantiated from a `MeshGL` (or double-precision `MeshGL64`) object where the member variable `numProp` has been assigned a value of less than 3. The library uses the `numProp` field as a stride parameter to parse the flat `vertProperties` array. Without a minimum of three properties defining position vectors, internal evaluations like topological checks, Boolean intersections, and Minkowski operations cannot execute. Passing such a malformed mesh struct triggers a safe `MissingPositionProperties` state block instead of a segmentation fault.

Minimal reproduction

#include <manifold.h>
#include <iostream>
#include <vector>

using namespace manifold;

int main() {
    MeshGL mesh;
    mesh.numProp = 2; // Invalid: Must be >= 3
    
    // Tetrahedron vertices but completely missing Z spatial components
    mesh.vertProperties = {
        0.0f, 0.0f,
        1.0f, 0.0f,
        0.0f, 1.0f,
        0.0f, 0.0f
    };
    
    mesh.triVerts = {
        0, 2, 1, 
        0, 1, 3, 
        1, 2, 3, 
        2, 0, 3
    };

    Manifold m(mesh);
    
    if (m.Status() == Manifold::Error::MissingPositionProperties) {
        std::cerr << "Diagnostic reproduced: MissingPositionProperties" << std::endl;
    }
    
    return 0;
}

How to fix it

Rectify the input mesh configuration by assigning an appropriate stride value for `numProp` (minimum of 3) and ensuring the vertex property array accurately defines all three dimensional spatial values per vertex.

```cpp
#include <manifold.h>
#include <iostream>
#include <vector>

using namespace manifold;

int main() {
    MeshGL mesh;
    mesh.numProp = 3; // Correct: Exceeds or meets baseline geometry requirement
    
    // Complete tetrahedron coordinates including X, Y, and Z
    mesh.vertProperties = {
        0.0f, 0.0f, 0.0f,
        1.0f, 0.0f, 0.0f,
        0.0f, 1.0f, 0.0f,
        0.0f, 0.0f, 1.0f
    };
    
    mesh.triVerts = {
        0, 2, 1, 
        0, 1, 3, 
        1, 2, 3, 
        2, 0, 3
    };

    Manifold m(mesh);
    
    if (m.Status() == Manifold::Error::NoError) {
        std::cout << "Valid 2-manifold configured correctly without errors." << std::endl;
    }
    
    return 0;
}
```

Step 1

Step 2

Step 3

Step 4

Upstream references

Manifold: MeshGLP Struct Template Reference

SplitByPlane() doesn't handle empty Manifold objects · Issue #1515