or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/numpy-stl@3.2.x
tile.json

tessl/pypi-numpy-stl

tessl install tessl/pypi-numpy-stl@3.2.0

Library to make reading, writing and modifying both binary and ascii STL files easy.

Agent Success

Agent success rate when using this tile

85%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.39x

Baseline

Agent success rate without this tile

61%

task.mdevals/scenario-5/

Mesh Validity Summary

Build a small utility that reports whether an STL mesh is watertight and convex, providing both a quick closure signal and a stricter, tolerance-aware closure pass.

Capabilities

Load and summarize

  • Given the path to a watertight tetrahedron STL, it returns a summary where closed_quick, closed_exact, and convex are all True. @test
  • Given the path to an STL missing one face, it returns a summary where closed_quick and closed_exact are False, and convex is False. @test

Tolerance-aware exact check

  • When provided a tolerance, a mesh with tiny paired edge gaps reports closed_exact as True while closed_quick remains False. @test

Reporting shape

  • The returned summary is a mapping with keys closed_quick, closed_exact, convex, and exact_method (describing how the exact check was performed); all keys are always present. @test

Implementation

@generates

API

from typing import Optional, TypedDict

class MeshValiditySummary(TypedDict):
    closed_quick: bool
    closed_exact: bool
    convex: bool
    exact_method: str

def analyze_mesh(path: str, tolerance: Optional[float] = None) -> MeshValiditySummary:
    """
    Load an STL file, perform quick and exact closure checks (optionally tolerance-aware),
    and report convexity in a structured summary.
    """

Dependencies { .dependencies }

numpy-stl { .dependency }

Provides STL mesh loading and validity analysis utilities.