BREP_RANSAC
Part of the next.BREP.io Rust B-rep kernel: cargo add BREP_RANSAC · licence summary
BREP_RANSAC is the kernel-free analytic surface recognizer of the BREP crate
family. Its Rust library target is brep_ransac.
It recognizes plane, cylinder, cone, sphere, and torus carriers in neutral
indexed triangle meshes (Mesh: vertices, triangles, optional vertex normals
and source metadata). It supports generic recognition and, through
SurfaceHint, known-type fitting, initial guesses, constrained fitting, and
exact-candidate validation. Results contain neutral carrier parameters
(AnalyticSurface), supporting triangle indices, residual metrics, a
confidence score, and fit diagnostics (the fit path taken, refinement and
rejected competitors); they contain no BREP topology.
Build it from the repository root:
The main entry points are:
recognize_surfacesandrecognize_surfaces_with_unresolvedfor mesh-wide recognition (the latter returns aRecognitionResultthat also lists the unresolved triangles and diagnostics for metadata regions that stayed unresolved);recognize_surfaces_with_attempt_budget, which caps the number of hypothesis attempts and restricts the surface types tried;recognize_surfaces_with_candidates, which validates carriers another stage already fitted to whole connected components (ComponentCandidate);reconstruct_surface/reconstruct_surface_from_verticesfor a selected support (triangle or vertex indices) with aSurfaceHint;- the
constrain_*design-intent helpers (shared axis, coaxial cylinders, parallel/perpendicular/coplanar planes, concentric centers, equal radii, tangency), which turn neighbouring analytic geometry intoSurfaceHint::Constrainedvalues; export_debug_obj, which returns in-memory Wavefront OBJ and MTL text (DebugObjExport) with one coloured group per recognized region plus the unresolved triangles.
RecognitionOptions (with a Default) carries the distance, relative and
normal tolerances, minimum support, hypothesis and refinement limits, feature
angle, sampling mode, thread count and an optional deterministic seed.
The public package contains production sources, the manifest, README, and license.
Runtime dependencies are serde and web-time.
Licence
In plain words: the crates are free to use as they are, including in a commercial project. If you fix or change something in the kernel, send the change back as a pull request to github.com/mmiscool/next.BREP.io_RUST_BREP_KERNEL. If you do not want to share your changes, buy a commercial licence from Autodrop3d LLC; with it you never have to share your code back.
The exact terms are in LICENSE.md, shipped in the crate (license-file in the manifest) and at
LICENSE.md; if this summary and the file ever differ, the file wins.