Library to make reading, writing and modifying both binary and ascii STL files easy.
85
Evaluation — 85%
↑ 1.39xAgent success when using this tile
A small utility that wraps the package-provided STL command-line converters to standardize ASCII/BINARY outputs, mesh naming, and cleanup without reimplementing STL parsing.
@generates
Use the dependency's CLI executables for all format conversions and mesh naming; assume they are available on the PATH.
from typing import Optional, Dict, Any
def to_ascii(src_path: str, dest_path: str, mesh_name: Optional[str] = None, remove_empty: bool = False) -> Dict[str, Any]:
"""
Convert an STL file to ASCII using the dependency's command-line converter.
Returns a summary containing keys: format ("ascii"), triangles (int), mesh_name (str).
"""
def to_binary(src_path: str, dest_path: str, use_speedups: bool = True) -> Dict[str, Any]:
"""
Convert an STL file to binary using the dependency's command-line converter.
Returns a summary containing keys: format ("binary"), triangles (int), mesh_name (str).
"""
def cleanup_and_dual_export(src_path: str, ascii_path: str, binary_path: str, mesh_name: str, remove_empty: bool = True) -> Dict[str, Any]:
"""
Auto-detect input format, remove empty/degenerate triangles, rename the mesh, export ASCII and binary outputs,
and return a summary containing triangle counts for input and cleaned outputs plus the applied mesh_name.
"""Command-line utilities for STL format conversion, header naming, speedup toggling, and empty-triangle removal.
Install with Tessl CLI
npx tessl i tessl/pypi-numpy-stlevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10