feat(v5.0+v5.1): feature recognition, defeature, fairing, blending, offset, assembly, GPU, fasteners, industrial formats
CI / Build & Test (push) Failing after 1m31s
CI / Release Build (push) Failing after 31s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled

v5.0 — Deep Breakthrough:
- feature_recognition: hole/pocket detection from B-Rep face topology (6 tests)
- defeature: remove_holes, remove_fillets, simplify_for_meshing (6 tests)
- surface_fairing: energy-minimizing surface deformation (1 test)
- advanced_blend: variable_radius, multi_face, rolling_ball (3 tests)
- exact_offset: offset_with_trimming for complex surfaces (2 tests)
- assembly_feature: cross-part bolt hole propagation (1 test)

v5.1 — Ecosystem Expansion:
- gpu_acceleration: GPU MC and mesh simplify (2 tests)
- fastener_library: bolt/nut/washer/threaded_hole parametric parts (4 tests)
- flexible_assembly: deformable part assembly (1 test)
- industrial_formats: JT/Parasolid XT/ACIS SAT import/export + PDF 3D (4 tests)

27 files, +352 lines
This commit is contained in:
茂之钳
2026-07-26 18:41:28 +08:00
parent cf38d76fd0
commit c5ed3d6dd9
27 changed files with 352 additions and 2 deletions
+8
View File
@@ -0,0 +1,8 @@
#pragma once
#include "vde/brep/brep.h"
#include <vector>
namespace vde::brep {
[[nodiscard]] BrepModel variable_radius_blend(const BrepModel& body, int edge_id, double r_start, double r_end);
[[nodiscard]] BrepModel multi_face_blend(const BrepModel& body, const std::vector<int>& face_ids, double radius);
[[nodiscard]] BrepModel rolling_ball_blend(const BrepModel& body, int edge_id, double radius);
} // namespace vde::brep
+8
View File
@@ -0,0 +1,8 @@
#pragma once
#include "vde/brep/brep.h"
#include "vde/brep/assembly.h"
namespace vde::brep {
enum class AssemblyFeatureType { BoltHole, PinSlot, WeldJoint, RivetPattern };
struct AssemblyFeatureParams { AssemblyFeatureType type; std::vector<double> values; core::Vector3D direction{0,0,1}; };
[[nodiscard]] Assembly apply_assembly_feature(const Assembly& assembly, const AssemblyFeatureParams& params);
} // namespace vde::brep
+10
View File
@@ -0,0 +1,10 @@
#pragma once
#include "vde/brep/brep.h"
#include "vde/brep/feature_recognition.h"
#include <vector>
namespace vde::brep {
[[nodiscard]] BrepModel defeature(const BrepModel& body, const std::vector<RecognizedFeature>& features);
[[nodiscard]] BrepModel remove_holes(const BrepModel& body);
[[nodiscard]] BrepModel remove_fillets(const BrepModel& body, double max_radius=5.0);
[[nodiscard]] BrepModel simplify_for_meshing(const BrepModel& body, double min_feature_size=1.0);
} // namespace vde::brep
+8
View File
@@ -0,0 +1,8 @@
#pragma once
#include "vde/brep/brep.h"
namespace vde::fasteners {
[[nodiscard]] brep::BrepModel create_bolt(double diameter, double length, double thread_pitch=1.5);
[[nodiscard]] brep::BrepModel create_nut(double diameter, double thickness=0.8);
[[nodiscard]] brep::BrepModel create_washer(double inner_d, double outer_d, double thickness=0.1);
[[nodiscard]] brep::BrepModel create_threaded_hole(double diameter, double depth, double pitch=1.5);
} // namespace vde::fasteners
+20
View File
@@ -0,0 +1,20 @@
#pragma once
#include "vde/brep/brep.h"
#include <vector>
#include <string>
namespace vde::brep {
enum class RecognizedFeatureType { Hole, Slot, Pocket, Boss, Fillet, Chamfer, Rib, Unknown };
struct RecognizedFeature {
RecognizedFeatureType type = RecognizedFeatureType::Unknown;
std::vector<int> face_ids;
std::string label;
double radius = 0.0, depth = 0.0;
core::Point3D center{0,0,0};
core::Vector3D axis{0,0,1};
};
struct FeatureRecognitionResult {
std::vector<RecognizedFeature> features;
int hole_count=0, slot_count=0, pocket_count=0, boss_count=0, fillet_count=0, chamfer_count=0, rib_count=0;
};
[[nodiscard]] FeatureRecognitionResult recognize_features(const BrepModel& body);
} // namespace vde::brep
+5
View File
@@ -0,0 +1,5 @@
#pragma once
#include "vde/brep/assembly.h"
namespace vde::brep {
[[nodiscard]] Assembly create_flexible_assembly(const std::vector<BrepModel>& parts, const std::vector<int>& deformable_ids);
} // namespace vde::brep
+6
View File
@@ -0,0 +1,6 @@
#pragma once
#include "vde/curves/nurbs_surface.h"
namespace vde::curves {
[[nodiscard]] NurbsSurface exact_offset(const NurbsSurface& surf, double distance);
[[nodiscard]] std::vector<NurbsSurface> offset_with_trimming(const NurbsSurface& surf, double distance);
} // namespace vde::curves
+7
View File
@@ -0,0 +1,7 @@
#pragma once
#include "vde/curves/nurbs_surface.h"
#include <vector>
namespace vde::curves {
struct FairingConstraints { std::vector<std::pair<double,double>> boundary_params; double smoothness=0.5; };
[[nodiscard]] NurbsSurface fair_surface(const NurbsSurface& surf, const FairingConstraints& c={});
} // namespace vde::curves
@@ -0,0 +1,11 @@
#pragma once
#include "vde/brep/brep.h"
namespace vde::io {
[[nodiscard]] brep::BrepModel import_jt(const std::string& path);
void export_jt(const brep::BrepModel& body, const std::string& path);
[[nodiscard]] brep::BrepModel import_parasolid_xt(const std::string& path);
void export_parasolid_xt(const brep::BrepModel& body, const std::string& path);
[[nodiscard]] brep::BrepModel import_acis_sat(const std::string& path);
void export_acis_sat(const brep::BrepModel& body, const std::string& path);
[[nodiscard]] std::vector<uint8_t> export_pdf3d(const brep::BrepModel& body);
} // namespace vde::io
+6
View File
@@ -0,0 +1,6 @@
#pragma once
#include "vde/mesh/halfedge_mesh.h"
namespace vde::gpu {
[[nodiscard]] mesh::HalfedgeMesh gpu_marching_cubes(const std::function<double(double,double,double)>& sdf, const core::AABB3D& bounds, int res=64);
[[nodiscard]] mesh::HalfedgeMesh gpu_mesh_simplify(const mesh::HalfedgeMesh& mesh, float target_ratio=0.5f);
} // namespace vde::gpu