CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-numpy-stl

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

85

1.39x

Evaluation85%

1.39x

Agent success when using this tile

Overview
Eval results
Files

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.

Install with Tessl CLI

npx tessl i tessl/pypi-numpy-stl

tile.json