Observed since 20 Oct, 17:37 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
abs-hdf5
A Python + C++ toolkit for reading CAD B-Rep data from HDF5, sampling surfaces/curves, and generating blue-noise point clouds.
ABS-HDF5 reads B-Rep geometry from HDF5 files as a standard half-edge data structure, allowing you to navigate topology (faces, edges, halfedges, loops), sample points directly from continuous parametric surfaces and curves, and evaluate normals and derivatives. It supports user-specified tasks, and provides fast Poisson-disk downsampling for blue-noise point cloud generation.
HDF5 files are produced by steptohdf5, a companion converter that turns STEP/STP CAD files into the format ABS reads.
pip install abs-hdf5
read_parts loads the full B-Rep structure into memory as linked Python objects.
from abs import read_parts
parts = read_parts('model.hdf5')
face = parts[0].faces[1]
adjacent_faces = face.find_adjacent_faces()
loop = face.loops[0]
sample_parts generates points on parametric surfaces and curves and passes them to your callbacks. Each callback receives the topological entity and the sampled points, and returns whatever per-point values your task needs including labels, normals, primitive types, etc.
from abs import read_parts, sample_parts
import numpy as np
def face_func(face, points):
return np.zeros(points.shape[0])
def edge_func(edge, points):
return np.ones(points.shape[0])
parts = read_parts('model.hdf5')
face_points, face_labels, edge_points, edge_labels = sample_parts(
parts, num_samples=5000, face_func=face_func, edge_func=edge_func
)
Normals are evaluated directly from the underlying parametric surfaces.
def get_normals(face, points):
return face.normal(points)
face_points, face_normals, _, _ = sample_parts(
parts, num_samples=5000, face_func=get_normals
)
The mesh is stored independently from the B-Rep topology. get_mesh concatenates all per-face triangulations into a single consistent mesh.
from abs.utils import read_meshes, get_mesh
meshes = read_meshes('model.hdf5')
V, F = get_mesh(meshes)
For a full set of worked examples, loading models, traversing topology, computing normals, primitive segmentation, and mesh extraction, see the abs/use_cases.ipynb notebook.
The dataset comprises over one million B-Rep models converted from two large-scale public CAD collections:
Each model is stored in HDF5 as a collection of parts, where every part contains its geometry, topology, and an optional triangular mesh. Once converted, no CAD kernel is required to read or process the data.
The dataset can be downloaded here: [link coming soon]
To convert your own STEP files, please refer to the steptohdf5 repository.
Contributions are welcome. Please open an issue before submitting larger changes.
MIT
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
numpyEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.8",
"evaluation": "NOT_EVALUATED"
} | numpy | runtime |
scipyEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.8",
"evaluation": "NOT_EVALUATED"
} | scipy | runtime |
h5pyEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.8",
"evaluation": "NOT_EVALUATED"
} | h5py | runtime |
meshioEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.8",
"evaluation": "NOT_EVALUATED"
} | meshio | runtime |
geomdlEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.8",
"evaluation": "NOT_EVALUATED"
} | geomdl | runtime |
bdist_wheel · 4,095.69 KB · Python cp310
bdist_wheel · 4,074.74 KB · Python cp310
bdist_wheel · 4,094.26 KB · Python cp310
bdist_wheel · 5,030.34 KB · Python cp310
bdist_wheel · 5,101.45 KB · Python cp310
bdist_wheel · 4,016.45 KB · Python cp310
bdist_wheel · 4,033.43 KB · Python cp310
bdist_wheel · 4,097.09 KB · Python cp311
bdist_wheel · 4,078.19 KB · Python cp311
bdist_wheel · 4,094.47 KB · Python cp311
bdist_wheel · 5,030.63 KB · Python cp311
bdist_wheel · 5,102.24 KB · Python cp311
bdist_wheel · 4,017.74 KB · Python cp311
bdist_wheel · 4,034.17 KB · Python cp311
bdist_wheel · 4,095.85 KB · Python cp39
bdist_wheel · 4,075.08 KB · Python cp39
bdist_wheel · 4,094.54 KB · Python cp39
bdist_wheel · 5,030.51 KB · Python cp39
bdist_wheel · 5,101.52 KB · Python cp39
bdist_wheel · 4,016.58 KB · Python cp39
bdist_wheel · 4,034.8 KB · Python cp39
sdist · 412.64 KB · Python source
Observed since 20 Oct, 17:37 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:05e70f4cb0e4eec8dff7bda6b8b472e3783652206ae7dbcf01ce4d21c2c98529