@willsunagency/cad-brep-validator
v1.0.0
Published
Boundary Representation (B-Rep) topological manifold validator implementing the extended Euler-Poincaré formula for solid modeling.
Maintainers
Readme
@willsunagency/cad-brep-validator
Boundary Representation (B-Rep) topological manifold validator and Euler-Poincaré invariant checker for 3D computational geometry kernels.
Part of the open-source manufacturing infrastructure maintained by CADGuide.tools.
Theoretical Mathematical Foundation
In solid modeling systems (such as ACIS, Parasolid, Open CASCADE, and CGAL), 3D solids are bounded by orientable manifolds consisting of vertices, edges, loops, and faces. A watertight, non-self-intersecting solid with internal voids and through-holes must satisfy the extended Euler-Poincaré equation:
$$\text{Euler} = V - E + F - (L - F) - 2(S - G) = 0$$
Where:
V: Number of verticesE: Number of edgesF: Number of facesL: Total number of face-bounding loops (including inner void loops)S: Number of disconnected shellsG: Genus (topological handles / through-holes)
Failure to satisfy this topological invariant results in failed boolean operations, non-manifold geometry, and slicing crashes in CAM and 3D printing software.
Installation
npm install @willsunagency/cad-brep-validatorUsage Example
const { validateBRepManifold } = require('@willsunagency/cad-brep-validator');
// Validating a simple cube: 8 vertices, 12 edges, 6 faces
const cubeTopology = {
vertices: 8,
edges: 12,
faces: 6,
loops: 6,
shells: 1,
genus: 0
};
const result = validateBRepManifold(cubeTopology);
console.log('Is Watertight Manifold:', result.valid); // true
console.log('Euler Characteristic:', result.eulerCharacteristic); // 0Related Engineering Tooling & Diagnostic Portals
- CAD Software Comparison Matrix: Benchmark solid modeling kernels (Parasolid vs. ACIS vs. CGM vs. Open CASCADE) and compare 50+ professional 3D CAD platforms.
- CAD DWG Version Checker: Instant zero-cloud client-side verification of AutoCAD drawing headers (AC1015 through AC1032).
- Sheet Metal K-Factor Calculator: Interactive bending formula and neutral axis shift solver for precision press brakes.
- CAD Troubleshooting & Diagnostic Guides: In-depth technical articles covering non-manifold edge repair, STEP sewing failures, and assembly performance tuning.
- CADGuide Engineering Hub: The open technical knowledgebase for mechanical designers and AEC professionals.
License
MIT © CADGuide.tools Team
