feat(v6.2): Blender addon + .NET/C# bindings + developer docs + plugin system
v6.2.1 — Blender Integration Addon: - 5 files, 1,732 lines: __init__, operators (9 ops), panels (4 panels) - preferences, vde_bridge (subprocess CLI bridge) - Import/Export STEP, primitives, boolean, SDF→Mesh v6.2.2 — .NET/C# Bindings (VdeSharp): - 8 files: NativeMethods (50+ P/Invoke), BrepModel, MeshData, SdfEngine, Assembly - C API extended with 20 new functions (STEP I/O, Boolean, SDF, Assembly) - vde_capi rebuilt as SHARED library - Example: import STEP → boolean → export v6.2.3 — Developer Docs + Plugin System: - 7 docs: architecture, contributing, API overview, building, testing, plugin-system - plugin_system.h/.cpp: PluginInterface, PluginManager, dlopen/LoadLibrary - README.md updated with v6 features - Syntax-check passed (GCC 10.2.1, -Wall -Wextra -Wpedantic)
This commit is contained in:
@@ -588,6 +588,90 @@ VdeMeshHandle vde_body_to_mesh(VdeHandle ctx, VdeBodyHandle body, double deflect
|
||||
*/
|
||||
void vde_body_free(VdeBodyHandle body);
|
||||
|
||||
/** @brief 深拷贝 B-Rep 实体 */
|
||||
VdeBodyHandle vde_body_clone(VdeHandle ctx, VdeBodyHandle body);
|
||||
|
||||
// ── B-Rep STEP/IGES I/O ──
|
||||
|
||||
/** @brief 从 STEP 文件导入 B-Rep 实体列表。返回数量,每个 body 写入 out_bodies */
|
||||
int vde_body_load_step(VdeHandle ctx, const char* path, VdeBodyHandle** out_bodies);
|
||||
|
||||
/** @brief 从 IGES 文件导入 B-Rep 实体列表 */
|
||||
int vde_body_load_iges(VdeHandle ctx, const char* path, VdeBodyHandle** out_bodies);
|
||||
|
||||
/** @brief 将 B-Rep 实体列表导出为 STEP 文件。成功返回 1 */
|
||||
int vde_body_save_step(VdeHandle ctx, VdeBodyHandle* bodies, int count, const char* path);
|
||||
|
||||
/** @brief 将 B-Rep 实体列表导出为 IGES 文件 */
|
||||
int vde_body_save_iges(VdeHandle ctx, VdeBodyHandle* bodies, int count, const char* path);
|
||||
|
||||
// ── B-Rep Boolean ──
|
||||
|
||||
/** @brief B-Rep 布尔运算。op: 0=Union, 1=Intersection, 2=Difference (A\B) */
|
||||
VdeBodyHandle vde_body_boolean(VdeHandle ctx, VdeBodyHandle a, VdeBodyHandle b, int op);
|
||||
|
||||
// ── Mesh face data access ──
|
||||
|
||||
/** @brief 获取网格面的顶点索引。返回顶点数,out_indices 需调用 vde_free_buffer 释放 */
|
||||
int vde_mesh_get_face(VdeMeshHandle mesh, size_t face_idx, int** out_indices);
|
||||
|
||||
// ═══════════════════════════════════════════════════════════
|
||||
// SDF 建模
|
||||
// ═══════════════════════════════════════════════════════════
|
||||
|
||||
/** @brief SDF 节点句柄(不透明) */
|
||||
#ifndef VDE_SDF_HANDLE_DEFINED
|
||||
typedef struct VdeSdfNode* VdeSdfHandle;
|
||||
#endif
|
||||
|
||||
/** @brief 创建 SDF 球体节点 */
|
||||
VdeSdfHandle vde_sdf_sphere(VdeHandle ctx, double radius);
|
||||
|
||||
/** @brief 创建 SDF 盒子节点 */
|
||||
VdeSdfHandle vde_sdf_box(VdeHandle ctx, double hx, double hy, double hz);
|
||||
|
||||
/** @brief 创建 SDF 圆柱节点 */
|
||||
VdeSdfHandle vde_sdf_cylinder(VdeHandle ctx, double radius, double height);
|
||||
|
||||
/** @brief SDF 布尔并集 */
|
||||
VdeSdfHandle vde_sdf_union(VdeHandle ctx, VdeSdfHandle a, VdeSdfHandle b);
|
||||
|
||||
/** @brief SDF 布尔交集 */
|
||||
VdeSdfHandle vde_sdf_intersection(VdeHandle ctx, VdeSdfHandle a, VdeSdfHandle b);
|
||||
|
||||
/** @brief SDF 布尔差集 */
|
||||
VdeSdfHandle vde_sdf_difference(VdeHandle ctx, VdeSdfHandle a, VdeSdfHandle b);
|
||||
|
||||
/** @brief SDF 转网格 */
|
||||
VdeMeshHandle vde_sdf_to_mesh(VdeHandle ctx, VdeSdfHandle sdf, int resolution);
|
||||
|
||||
/** @brief 释放 SDF 节点 */
|
||||
void vde_sdf_free(VdeSdfHandle sdf);
|
||||
|
||||
// ═══════════════════════════════════════════════════════════
|
||||
// 装配体
|
||||
// ═══════════════════════════════════════════════════════════
|
||||
|
||||
/** @brief 装配体句柄 */
|
||||
#ifndef VDE_ASSEMBLY_HANDLE_DEFINED
|
||||
typedef struct VdeAssembly* VdeAssemblyHandle;
|
||||
#endif
|
||||
|
||||
/** @brief 创建装配体 */
|
||||
VdeAssemblyHandle vde_assembly_create(VdeHandle ctx, const char* name);
|
||||
|
||||
/** @brief 向装配体根节点添加零件 */
|
||||
int vde_assembly_add_part(VdeAssemblyHandle assembly, const char* name, VdeBodyHandle body);
|
||||
|
||||
/** @brief 获取装配体零件数量 */
|
||||
int vde_assembly_part_count(VdeAssemblyHandle assembly);
|
||||
|
||||
/** @brief 释放装配体(不释放其中的 body,调用方自行管理) */
|
||||
void vde_assembly_free(VdeAssemblyHandle assembly);
|
||||
|
||||
/** @brief 释放 body 句柄数组(由 load_step/load_iges 返回) */
|
||||
void vde_body_free_array(VdeBodyHandle* bodies, int count);
|
||||
|
||||
// ═══════════════════════════════════════════════════════════
|
||||
// 序列化
|
||||
// ═══════════════════════════════════════════════════════════
|
||||
|
||||
Reference in New Issue
Block a user