Skip to main content

mini3d

纯 Python(仅标准库,零第三方依赖)实现的迷你 3D 模型工具箱。

功能

  • 几何体生成:立方体、球体、圆柱、圆锥、平面、圆环面
  • 几何变换:平移、绕 X/Y/Z 轴旋转、缩放
  • 文件读写:STL(二进制 + ASCII)、OBJ、PLY
  • 基础数学:三维向量、4×4 变换矩阵、网格法线、包围盒

安装

发布到 PyPI 后:

python3 -m pip install mini3d

从源码本地安装(在本目录下):

# 开发模式安装(改源码后立即生效,无需重装)
python3 -m pip install --user -e .

# 或普通安装(把代码复制进站点目录,与源码目录脱离)
python3 -m pip install --user .

快速上手

from mini3d import cube, sphere, rotate_z, translate, write_stl, write_obj, write_ply

m = cube(size=2.0)
rotate_z(m, 45)
translate(m, 0, 2, 0)

write_stl(m, "out.stl")
write_obj(m, "out.obj")
write_ply(m, "out.ply")

读取已有模型

from mini3d import read_stl, read_obj, read_ply

mesh = read_stl("some_model.stl")
print(mesh)  # Mesh(vertices=..., faces=...)

目录结构

mini3d/
├── core/      # Vector3、Matrix4x4、Mesh
├── geometry/  # 基本几何体生成器
├── ops/       # 平移 / 旋转 / 缩放
└── io/        # STL / OBJ / PLY 读写

许可证

MIT License,见 LICENSE。

Metadata

Release files for mini3d 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mini3d 0.1.0
File Size Uploaded Provenance Actions
mini3d-0.1.0.tar.gz 11.7 kB Without provenance Details for mini3d-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mini3d 0.1.0
File Interpreter ABI Platform Actions
mini3d-0.1.0-py3-none-any.whl Python 3 none any Details for mini3d-0.1.0-py3-none-any.whl

Total release size: 27.2 kB

Release files / mini3d-0.1.0.tar.gz

Download URL mini3d-0.1.0.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
527562fa7997e583ca2dd8104f8b01a0ed97bd7c096fd53c9421087d080c6aea
BLAKE2b-256 checksum
How to use checksums
d7866376303ed201f38e7f9c3033bf7c7346aee96d48a486ea0499d98f5459ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / mini3d-0.1.0-py3-none-any.whl

Download URL mini3d-0.1.0-py3-none-any.whl
Size 15.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9401af5e7cf51c27d54911a4750ebf43120f733c842d5fdcf0affbbb34d75b8
BLAKE2b-256 checksum
How to use checksums
6c77e0ea9d85a5b1b432f8d7e35f8f929f7d0673b20eee3434599d8fb968bb93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Security for mini3d 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page