ViewDesignEngine  3.1.0
高性能 CAD 计算几何引擎
brep.h 文件参考

边界表示(B-Rep)核心数据结构 更多...

#include "vde/core/point.h"
#include "vde/core/aabb.h"
#include "vde/curves/nurbs_curve.h"
#include "vde/curves/nurbs_surface.h"
#include "vde/mesh/halfedge_mesh.h"
#include <vector>
#include <memory>
#include <string>
brep.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

struct  vde::brep::TopoVertex
 拓扑顶点 更多...
 
struct  vde::brep::TopoEdge
 拓扑边 更多...
 
struct  vde::brep::TopoLoop
 拓扑环(Loop) 更多...
 
struct  vde::brep::TopoFace
 拓扑面 更多...
 
struct  vde::brep::TopoShell
 拓扑壳 更多...
 
struct  vde::brep::TopoBody
 拓扑体 更多...
 
class  vde::brep::BrepModel
 B-Rep 模型 更多...
 

命名空间

 vde
 
 vde::brep
 

枚举

enum class  vde::brep::CurveType {
  vde::brep::Line , vde::brep::Circle , vde::brep::Bezier , vde::brep::BSpline ,
  vde::brep::Nurbs
}
 边曲线类型枚举 更多...
 

详细描述

边界表示(B-Rep)核心数据结构

B-Rep(Boundary Representation)是 CAD 系统中最常用的实体表示方法, 通过拓扑层次结构描述三维几何体的边界。

拓扑层次结构

Body (体) — 一个或多个封闭壳(含名称)
└─ Shell (壳) — 一组面的连续集合
└─ Face (面) — 曲面上由环界定的区域
└─ Loop (环) — 封闭的边界曲线(外环 + 内环/孔)
└─ Edge (边) — 曲面的边界段
└─ Vertex (顶点) — 边的端点

实体引用关系

每个实体通过整数 ID 唯一标识。父实体通过 ID 向量引用子实体。 曲面(NURBS Surface)独立存储,由面通过 surface_id 引用。 曲线(NURBS Curve)作为边的几何定义存储。

使用模式

BrepModel model;
// 从顶点层开始构建
int v0 = model.add_vertex(Point3D(0, 0, 0));
int v1 = model.add_vertex(Point3D(1, 0, 0));
int e0 = model.add_edge(v0, v1);
int loop0 = model.add_loop({e0});
int s0 = model.add_surface(plane_surface);
int f0 = model.add_face(s0, {loop0});
int shell0 = model.add_shell({f0});
int body0 = model.add_body({shell0}, "MyPart");
foundation::Point3D Point3D
双精度三维点(重新导出)
Definition: point.h:31

更常见的方式是使用 modeling.h 中的高层 API(make_box, extrude 等)。

在文件 brep.h 中定义.