tessl install tessl/pypi-numpy-stl@3.2.0Library 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%
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.
closed_quick, closed_exact, and convex are all True. @testclosed_quick and closed_exact are False, and convex is False. @testclosed_exact as True while closed_quick remains False. @testclosed_quick, closed_exact, convex, and exact_method (describing how the exact check was performed); all keys are always present. @test@generates
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.
"""Provides STL mesh loading and validity analysis utilities.