Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

stl2bem

Latest version: v0.1.1

Overview

Last scanned
23 Nov 2026
Published
23 Nov 2026
PyPI package Publisher: meoruu
0 Stars
0 Forks
2 Versions
115 Downloads
Python Repo language

Scan summary

stl2bem was last scanned on 23 Nov 2026 at version 0.1.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 2 versions, all published within 5 days (19–23 Nov 2026).
  • Findings: No rules fired in version 0.1.1.
  • Downloads: 115 downloads.

Versions

2 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.1.1 LATEST 23 Nov 2026 No rules fired
0.1.0 19 Nov 2026 No rules fired

No rules fired in 0.1.1

Findings

Findings for v0.1.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.1.1; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

stl2bem

PyPI tests

Computes the sound pressure on and around a rigid object from a closed STL mesh, with the boundary element method. It runs on a CPU or an NVIDIA GPU and writes tables over directions and frequencies, for example the response of every microphone on a device, as HDF5 or SOFA files.

stl2bem: an STL triangle mesh in, the sound pressure on its surface out

Plane waves passing six objects modeled in Fusion (3,800 to 12,000 triangles each): real part of the total pressure on a slice through each object, over one period. Surface pressure and cavity resonances of the same objects are in docs/validation.md.

Install

pip install stl2bem                  # NumPy, SciPy, h5py (CPU)
pip install "stl2bem[prep,sofa]"     # optional: merging CAD parts, SOFA export
pip install cupy-cuda12x             # optional GPU backend; pick the CuPy package of your CUDA version

The examples and figures need the repository: git clone https://github.com/Kwon-Junhyeong/stl2bem.

Quick start

stl2bem --stl device.stl --units mm --mics mics.csv --out out/ --dry_run   # check mesh, microphones, resources
stl2bem --stl device.stl --units mm --mics mics.csv --out out/             # 0-8 kHz, 1-degree direction grid
stl2bem --stl device.stl --units mm --mics mics.csv --out out/ --source_distance 0.5   # sources 0.5 m away

mics.csv has one x, y, z row per microphone, in the STL units; each microphone is moved to the closest point of the surface. Without --source_distance the sources are plane waves (far field). The dry run prints the distance 2D²/λ beyond which that holds for your body; closer sources need --source_distance. It also estimates the run time: the default grid of 65,160 directions takes minutes on a GPU but hours on a CPU, and --n_el 19 (10 degrees in elevation) makes a CPU run about eight times faster. stl2bem --help lists all options.

From Python:

import numpy as np
from stl2bem import build_mesh, surface_receivers, solve_table, spherical_doa_grid

mesh = build_mesh("device.stl", units="mm", recenter="none")
mics, weights, _ = surface_receivers(np.loadtxt("mics.csv", delimiter=",") / 1000, mesh)
doa, az, el = spherical_doa_grid(360, 19)                 # 1 deg azimuth, 10 deg elevation
freqs = np.linspace(0, 4000, 129)
solve_table(mesh.verts, mesh.tris, mesh.centroids, mesh.normals, mesh.areas, freqs, doa, "table.h5",
            receivers=mics, receiver_elements=weights)

The pressure on a plane through the body, as in the gallery:

from stl2bem.viz import plane_grid, field_on_points
pts, shape = plane_grid(center=(0, 0, 0), u=(1, 0, 0), v=(0, 0, 1), half=(0.2, 0.2), n=(241, 241))
field = field_on_points(mesh, 2000.0, doa=(1, 0, 0), points=pts).reshape(shape)   # NaN inside the body

The localization error that the body causes for a free-field SRP-PHAT:

from stl2bem.analysis import load_table, free_field, doa_error, summarize
body = load_table("table.h5", elevations=[0])
print(summarize(doa_error(body, free_field(body), band=(300, 3000), method="srp-phat", search="azimuth")))

Output

One HDF5 file per body:

dataset shape meaning
p (R, D, F) complex64 total pressure at receiver r for source d at frequency f, relative to the incident pressure at the origin
doa_grid (D, 3) unit vectors towards the sources; az x el grids are stored az-major (i_az * n_el + i_el)
source_positions (D, 3) point sources only: their positions (m)
freqs (F,) Hz
positions (R, 3) where p is evaluated (m, mesh frame); centroids is an older name for the same array
chief_points (N_c, 3) only when CHIEF is used: the interior points

Attributes hold the mesh report, the solver options and the convention. --sofa (or python -m stl2bem.sofa table.h5) also writes the table as a SOFA file (AES69, GeneralTF).

Convention. e^{+jωt}, incident wave exp(+jk d·r). For a source signal s(t) from direction d, the FFT/STFT bin (usual e^{-jωt} kernel) at microphone m is S(ω)·p[m, d, ω], so tables and FFT-domain signals combine directly without conjugation. The phase reference is the center of the bounding box (--recenter bbox); --recenter none keeps the CAD origin.

Accuracy

sphere field

Rigid sphere with 5,120 elements at ka = 3.7 against the exact solution: the median difference is 8.6 × 10⁻⁴ of the incident amplitude. The singular part of the integrals is evaluated exactly, and microphones on the surface are second-order accurate, also on edges and vertices.

cross-check

The six gallery meshes solved again with bempp-cl, which uses a different formulation (Burton-Miller, linear elements): the fields differ by 0.01-0.4 % (median) and the resonance frequencies by at most 0.5 %. One frequency with 6,840 directions takes 1 s for 4,800 elements and 11 s for 14,700 on an RTX 4060 Ti (8 GB).

Convergence, the comparison with the original code, resonances and timings: docs/validation.md. Equations and implementation: docs/method.md.

Preparing CAD

The solver needs one closed, consistently oriented surface. A single solid exported from CAD usually is one (all gallery models are); an assembly usually is not, because its parts overlap. stl2bem-prep merges the parts:

stl2bem-prep chassis.stl board.stl battery.stl --pitch 8 --units mm --out body.stl

It voxelizes the parts (pitch = element size), fills enclosed cavities and extracts a closed surface. Features smaller than the pitch disappear and thin plates become one pitch thick; --align_z keeps a flat microphone board flat. In Fusion, set the maximum edge length of the STL export to about λ/6 at the highest frequency; the mesh report prints the frequency limit from the longest element edge and warns when some elements are larger than λ/6 at the highest frequency (CAD exports are often non-uniform).

Limits

  • Rigid bodies in free space: no absorption, no vibrating surfaces, no floor or walls.
  • Dense matrices: for N elements the GPU needs about 2.5 GB + 20 bytes × N² (an 8 GB GPU handles about 15,000 elements) and the CPU about 1.5 GB + 55 bytes × N² of RAM; time grows with N³. The dry run prints both.
  • CHIEF points need room inside the body. Thin-walled objects (in the gallery, the bottle and the pipe) are solved with the CBIE alone, which is safe there: their irregular frequencies start near c / 2t for wall thickness t, far above the band the mesh resolves.
  • --formulation burton-miller is experimental: as accurate as the default away from resonances, but it damps sharp cavity resonances. See docs/method.md.

Used in

An earlier version of this solver computed the microphone responses of a robot body in:

License

MIT (see LICENSE).

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases stl2bem

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229