翼边几何存储结构

The Winged-Edge Data Structure

Perhaps the oldest data structure for a B-rep is Baumgart's winged-edge data structure. It is quite different from that of a wireframe model, because the winged-edge data structure uses edges to keep track almost everything. In what follows, we shall assume there is no holes in each face and later extend it to cope with holes. Moreover, we shall assume edges and faces are line segments and polygons. Topologically, one can always stretch curvilinear edges and faces so that they become flat without changing the relationships among them.

翼边数据结构 也许 B-rep 最古老的数据结构是 Baumgart 的翼边数据结构。它与线框模型完全不同,因为翼边数据结构使用边来跟踪几乎所有内容。在下文中,我们将假设每个面都没有孔,然后将其扩展以处理孔。此外,我们假设边和面是线段和多边形。在拓扑上,我们总是可以拉伸曲线边和面,使它们变平而不改变它们之间的关系。

The above figure shows a polyhedron with vertices, edges and faces indicated with upper cases, lower cases and digits, respectively. Let us take a look at edge a = XY. This edge has two incident vertices X and Y, and two incident faces 1 and 2. A face is a polygon surrounded by edges. For example, face 1 has its edges ac and b, and face 2 has its edges ae and d. Note that the ordering is clockwise viewed from outside of the solid. If the direction of the edge is from X to Y, faces 1 and 2 are on the right and left side of edge a, respectively. To capture the ordering of edges correctly, we need four more pieces of information. Since edge a is traversed once when traversing face 1 and traversed a second time when traversing face 2, it is used twice in different directions. For example, when traversing the edges of face 1, the predecessor and successor of edge a are edge b and edge c, and when traversing the edges of face 2, the predecessor and successor of edge a are edge d and edge e. Note that although there are four edges incident to vertex X, only three of them are used when finding faces incident to edge a. Therefore, for each edge, the following information are important:

上图显示了一个多面体,其顶点、边和面分别用大写、小写和数字表示。让我们看看边 a = XY。该边有两个入射顶点 X 和 Y,以及两个入射面 1 和 2。面是被边包围的多边形。例如,面 1 有它的边 a、c 和 b,面 2 有它的边 a、e 和 d。请注意,顺序是从实体外部看顺时针方向。如果边的方向是从 X 到 Y,则面 1 和面 2 分别位于边 a 的右侧和左侧。为了正确捕获边的排序,我们还需要四条信息。由于边 a 在遍历面 1 时遍历了一次,而在遍历面 2 时又遍历了第二次,因此在不同的方向上使用了两次。例如,在遍历面1的边时,边a的前驱和后继是边b和边c,而在遍历面2的边时,边a的前驱和后继是边d和边e。请注意,尽管有四个边与顶点 X 相关,但在查找与边 a 相关的面时仅使用其中的三个。因此,对于每条边,以下信息很重要:

 

  1. vertices of this edge,
  2. its left and right faces,
  3. the predecessor and successor of this edge when traversing its left face, and
  4. the predecessor and successor of this edge when traversing its right face. 

该边的顶点。

它的左右脸,

遍历其左面时该边的前驱和后继,以及

遍历其右面时该边的前驱和后继。

 

The Edge Table

Each entry in the edge table contains those information mentioned earlier: edge name, start vertex and end vertex, left face and right face, the predecessor and successor edges when traversing its left face, and the predecessor and successor edges when traversing its right face. Note that clockwise ordering (viewing from outside of the polyhedron) is used for traverse. Note also that the direction of edge a is from X to Y. If the direction is changed to from Y to X, all entries but the first one in the following table must be changed accordingly.

边桌 边表中的每个条目都包含前面提到的那些信息:边名称、起始顶点和结束顶点、左面和右面、遍历其左面时的前驱和后继边以及遍历其右面时的前驱和后继边。请注意,顺时针顺序(从多面体外部查看)用于遍历。还要注意边a的方向是从X到Y。如果方向改为从Y到X,除了下表中的第一个条目外,所有条目都必须相应地改变。

 The above shows the information for the entry of edge a. The four edges bcd and e are the wings of edge a and hence edge a is "winged."

上图显示了边 a 的入口信息。四个边 b、c、d 和 e 是边 a 的翼,因此边 a 是“带翼的”。

 The above is a tetrahedron with four vertices A, B, C and D, six edges a, b, c, d, e and f, and four faces 1, 2, 3 (back) and 4 (bottom). Its edge table is the following. Please use the above diagram to verify this table.

上面是一个四面体,有四个顶点 A、B、C 和 D,六个边 a、b、c、d、e 和 f,以及四个面 1、2、3(背面)和 4(底部)。其边表如下。请使用上图来验证此表。

Other Tables

The winged-edge data structure requires two more tables, the vertex table and the face table. These two are very simple. The vertex table has one entry for each vertex which contains an edge that is incident to this vertex. The face table has one entry for each face which contains an edge that is one of this face's boundary edges. Therefore, we have the following table. Note that since there are multiple choices of edges, you may come up with different tables:

其他表 翼边数据结构需要另外两个表,顶点表和面表。这两个非常简单。顶点表为每个顶点都有一个条目,其中包含与该顶点相关的边。面表对每个面都有一个条目,其中包含一条边,该边是该面的边界边之一。因此,我们有下表。请注意,由于边有多种选择,您可能会想出不同的表:

 

With this data structure, one can easily answer the question: which vertices, edges, faces are adjacent to each face, edge, or vertex. There are nine of these adjacency relations. For example, is vertex X adjacent to face 5? Are faces 3 and 5 adjacent to each other? The winged-edge data structure can answer these queries very efficiently and some of them may even be answered in constant time. However, it may take longer time to answer other adjacency queries. Note also that once the numbers of vertices, edges and faces are known, the size of all three tables are fixed and will not change.

使用这种数据结构,人们可以轻松回答这个问题:哪些顶点、边、面与每个面、边或顶点相邻。这些邻接关系有九种。例如,顶点 X 是否与面 5 相邻?面 3 和面 5 是否相邻?翼边数据结构可以非常有效地回答这些查询,其中一些甚至可以在恒定时间内得到回答。但是,回答其他邻接查询可能需要更长的时间。还要注意,一旦顶点、边和面的数量已知,所有三个表的大小都是固定的,不会改变。

What If Faces Have Holes?

If some faces of a solid have holes, the above form of winged-edge data structure does not work. These holes may penetrate the solid (the left box below) or just like a pothole (the right box below).

如果人脸有洞怎么办? 如果实体的某些面有孔,则上述形式的翼边数据结构不起作用。这些孔可能会穿透固体(下面的左框)或就像坑洼一样(下面的右框)。

 

 

There are two ways for resolving this problem:

  • For a face with inner loops, the outer boundary is ordered clockwise, while its inner loops, if any, are ordered counter clockwise.

    有两种方法可以解决这个问题: 对于具有内环的面,外边界按顺时针顺序排列,而其内环(如果有)则按逆时针顺序排列。

  

  • Another simple method is adding an auxiliary edge between each inner loop and the outer loop as shown below. This auxiliary edge will have the same face for its left and right faces. In this way, a face with holes becomes a single loop which can be represented with the winged-edge data structure. When traversing a loop, auxiliary edges can be identified easily since its left and right faces are the same.
  • 另一种简单的方法是在每个内环和外环之间添加辅助边,如下所示。该辅助边的左右面将具有相同的面。这样,一个有孔的面就变成了一个单一的循环,可以用翼边数据结构来表示。遍历循环时,由于其左右面相同,因此可以轻松识别辅助边。

 

 

 

 

 

  • 2
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值