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-8/

Mesh Property Recalculation Report

Implement a utility that loads an STL mesh, optionally drops degenerate facets, forces recalculation of geometry-derived data, and returns a structured summary.

Capabilities

Recomputes derived properties

  • Loads mesh from the provided STL path and refreshes per-facet normals, areas, and centroids before producing the summary. @test

Provides unit normals

  • Returns unit-length normals corresponding to the refreshed geometry for every retained facet. @test

Degenerate filtering

  • When degenerate facets (zero area or collinear vertices) are present and filtering is enabled, they are excluded from counts and outputs. @test

Bounding summary

  • Summary includes per-axis min/max bounds derived from the recalculated geometry. @test

Implementation

@generates

API

from typing import Dict, List, Sequence


def mesh_report(path: str, *, remove_degenerate: bool = True) -> Dict[str, object]:
    """
    Load an STL mesh file, refresh geometry-derived properties, and return a summary.

    Returns a dictionary with:
    - "triangles": int count of retained facets after optional filtering
    - "unit_normals": sequence of 3-float unit normals aligned with the refreshed geometry
    - "areas": sequence of facet areas ordered consistently with normals
    - "centroids": sequence of facet centroids ordered consistently with normals
    - "bounds": {"min": [x, y, z], "max": [x, y, z]} derived from refreshed vertices
    """
    ...

Dependencies { .dependencies }

numpy-stl { .dependency }

Provides mesh loading, geometry recalculation, and unit normal helpers.