Files
ViewDesignEngine/python/setup.py
T
茂之钳 e469ef75ef
CI / Build & Test (push) Failing after 35s
CI / Release Build (push) Failing after 41s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
feat(v5-M4): industrial formats + GPU acceleration + Python bindings
M4.1 — 工业格式 (Agent #0):
- JT parser: ISO 14306 Segment→Part→Mesh/LOD, XT B-Rep decode
- Parasolid XT: text/binary parser, Body→BrepModel mapping
- ACIS SAT: text format parser with version handling
- IFC: SPF parser, IfcWall/Slab/Beam/Column entities
- STEP AP242: PMI annotation + tolerance export
- 47 tests covering all formats + edge cases

M4.2 — GPU 加速 (Agent #1):
- CUDA kernels: mc_kernel, qem_cost_kernel, tri_intersect_kernel
- __constant__ memory for edge tables, atomic triangle collection
- CPU fallback when CUDA unavailable (seamless degradation)
- VDE_USE_CUDA CMake option, .cu compilation support
- 9 tests with CPU path validation

M4.3 — Python 绑定 (Agent #2):
- vde_brep: BrepModel, make_*, boolean, STEP/IGES, heal, validate
- vde_sdf: primitives, operations, to_mesh, gradient descent
- vde_cam: roughing/finishing/drilling, Tool, ToolLibrary
- vde_assembly: Assembly, AssemblyNode, interference, explode
- Version: 3.3.0 synced across pyproject/setup/__init__

13 files, ~5200 lines, 56+ tests
2026-07-26 21:34:44 +08:00

74 lines
2.2 KiB
Python

"""
ViewDesignEngine — CAD computational geometry engine.
Build and install:
pip install -e . # editable install
pip install . # regular install
Requires:
- CMake >= 3.16
- C++17 compiler
- Eigen3 (auto-fetched if not found)
"""
from setuptools import setup, find_packages
from pybind11.setup_helpers import Pybind11Extension, build_ext
import sys
from pathlib import Path
# ── Configure the native extension ──────────────────
ext_modules = [
Pybind11Extension(
"vde._vde",
sorted([
"src/bind_module.cpp",
"src/bind_core.cpp",
"src/bind_curves.cpp",
"src/bind_mesh.cpp",
"src/vde_brep.cpp",
"src/vde_sdf.cpp",
"src/vde_cam.cpp",
"src/vde_assembly.cpp",
]),
include_dirs=[
"../include", # vde headers
],
extra_compile_args=["-std=c++17"],
# Propagate Eigen3 (set up via CMake or system path)
cxx_std=17,
),
]
setup(
name="vde",
version="3.3.0",
author="ViewDesignEngine Contributors",
description="CAD computational geometry engine",
long_description=Path(__file__).parent.joinpath("..", "README.md").read_text(
encoding="utf-8"
) if Path(__file__).parent.joinpath("..", "README.md").exists() else "",
long_description_content_type="text/markdown",
url="https://github.com/ViewDesignEngine/ViewDesignEngine",
packages=find_packages(),
ext_modules=ext_modules,
cmdclass={"build_ext": build_ext},
python_requires=">=3.8",
install_requires=[
"pybind11>=2.11.0",
],
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: C++",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
],
zip_safe=False,
)