OpenCascade Primitives BRep-Cylinder

eryar@163.com

Abstract. BRep is short for Boundary Representation. Boundary Representation gives a complete description of an object by associating topological and geometric information for solid modeling. In this case, objects are described by their boundaries. There are two types of information in BRep: Topological information and Geometric information. This paper is concerned with the Cylinder BRep in OpenCascade, and also show how to use Tcl script to dump cylinder BRep info.

Key words. OpenCascade, BRep, Boundary Representation, Cylinder

1. Introduction

本文通过在Draw Test Harness中的Tcl脚本来生成圆柱Cylinder的边界表示(BRep)数据,通过对生成的数据进行分析,来理解OpenCascade中的Cylinder的边界表示方式。

如下图所示为使用Tcl命令在Draw Test Harness中生成的圆柱:

Figure 1.1 Cylinder Generated by Tcl in Draw Test Harness

2. Dump Cylinder BRep Info by Tcl

使用Tcl脚本在Draw Test Harness中输出圆柱(Cylinder)的边界表示(BRep)数据的脚本程序如下图所示:

Figure 2.1 Tcl Script to Dump Cylinder BRep Info

上述Tcl生成一个底面位于原点(0,0,0)半径为10,高度为20的圆柱,如下图所示:

Figure 2.2 The Cylinder Generated by Tcl

3. Cylinder BRep in OpenCascade

还是从顶点(Vertex)开始编号,来对圆柱(Cylinder)的BRep表示进行理解。从导出的信息可知,圆柱有两个顶点Vertex,对其编号,如下图所示:

Figure 3.1 Vertex of Cylinder

圆柱共有三条Edge,编号分别是#9,#10,#12。下面对三条Edge中的几何曲线进行分析。其中#9边Edge中包含了三条几何曲线:一条三维空间曲线3D Curve和两条曲面上曲线PCurve,三条曲线的取值范围都是[0,2PI]。空间曲线3是圆心(0,0,0)半径为10,位于圆柱底部的圆,参数方程如下所示:

Figure 3.2 Curve 3D in Edge #9

Figure 3.3 PCurve 5 on Surface 1 of Edge #9

曲面1上的参数曲线PCurve 5是位于原点(0,0)方向为u方向的直线。当u取[0,2PI]时,得到曲面上u,v值分别为(0,0)和(2PI,0)。对应到曲面1上时,u的取值范围为[0,2PI],v的值为0。曲面1的参数方程如下所示:

当u取[0,2PI],v恒为0时,代入曲面参数方程得到空间圆的参数方程。

同理曲面3上的参数曲线PCurve 6是位于平面上的圆。边Edge#12与Edge#9一样,只不过#12是位于圆柱顶部的圆。

Figure 3.4 Edge #10 of the Cylinder

边Edge#10中的三维空间曲线是起点为(10, 0, 0)方向为Z轴的直线,取值范围[0,20]。曲面1上的参数曲线3,4是衔接边(Seam Edge),对应于BRep_CurveOnClosedSurface。代入曲面的参数方程时,u只取两个固定值0和2PI,v取值范围为[0,20]得到的曲线与三维空间曲线相同。将所有边编号绘出图示如下:

Figure 3.5 Edges of the Cylinder

圆柱Cylinder的环Wire有三个:Wire #4,Wire#6和Wire#8。其中Wire#4是圆柱底部的圆,Wire#6是圆柱顶部的圆。Wire#8是上下两个圆加上一个衔接边(Seam Edge)组成闭合环。将所有环Wire编号绘出图示如下:

Figure 3.6 Wires of the Cylinder

Wire#4,Wire#6和Wire#8分别对应Face#3,Face#5和Face#7。不过要注意面的朝向(Orientation)。最后这三个面Face组成一个Shell#2,Shell#2中又给每个Face定义了朝向。Shell#2组成了一个Solid#1。

4. Conclusion

通过Tcl生成的圆柱Cylinder的边界表示BRep信息,分析了OpenCascade中的圆柱的边界表示方式。要注意理解朝向(Orientation)对每个拓朴结构的意义。

5. References

1. OpenCascade, Test Harness User’s Guide 2013

2. OpenCascade, BRep Format Description White Paper, 2013

3. John K. Ousterhout, Tcl and Tk Toolkit, 1993

OpenCascade Primitives BRep-Cylinder的更多相关文章

  1. OpenCascade Primitives BRep - Sphere

    OpenCascade Primitives BRep - Sphere eryar@163.com Abstract. BRep is short for Boundary Representati ...

  2. OpenCascade Primitives BRep - Box

    OpenCascade Primitives BRep - Box eryar@163.com Abstract. BRep is short for Boundary Representation. ...

  3. OpenCascade Primitives BRep-Cone

    OpenCascade Primitives BRep-Cone eryar@163.com Abstract. BRep is short for Boundary Representation. ...

  4. OpenCascade Primitives BRep-Torus

    OpenCascade Primitives BRep-Torus eryar@163.com Abstract. BRep is short for Boundary Representation. ...

  5. OpenCASCADE Make Primitives-Sphere

    OpenCASCADE Make Primitives-Sphere eryar@163.com Abstract. The sphere is the simplest topology shape ...

  6. OpenCASCADE BRep vs. OpenNURBS BRep

    OpenCASCADE BRep vs. OpenNURBS BRep eryar@163.com Abstract. BRep short for Boundary Representation. ...

  7. Geometry Surface of OpenCascade BRep

    Geometry Surface of OpenCascade BRep eryar@163.com 摘要Abstract:几何曲面是参数表示的曲面 ,在边界表示中其数据存在于BRep_TFace中, ...

  8. Topology Shapes of OpenCascade BRep

    Topology Shapes of OpenCascade BRep eryar@163.com 摘要Abstract:通过对OpenCascade中的BRep数据的读写,理解边界表示法的概念及实现 ...

  9. Representation Data in OpenCascade BRep

    Representation Data in OpenCascade BRep eryar@163.com 摘要Abstract:现在的显示器大多数是光栅显示器,即可以看做一个像素的矩阵.在光栅显示器 ...

随机推荐

  1. [转] js对象浅拷贝和深拷贝详解

    本文为大家分享了JavaScript对象的浅拷贝和深拷贝代码,供大家参考,具体内容如下 1.浅拷贝 拷贝就是把父对像的属性,全部拷贝给子对象. 下面这个函数,就是在做拷贝: var Chinese = ...

  2. 由overflow-x:scroll产生的收获

    我们都知道float:left属性会让元素向左浮动,如果用一个div将几个左浮动的li包起来,是不是div的宽度被li撑得很长很长呢,代码: <!DOCTYPE html> <htm ...

  3. 【BZOJ】3997: [TJOI2015]组合数学

    题意 \(N \times M\)的网格,一开始在\((1, 1)\)每次可以向下和向右走,每经过一个有数字的点最多能将数字减1,最终走到\((N, M)\).问至少要走多少次才能将数字全部变为\(0 ...

  4. pointer-events 使用场景

    最近做一个简单移动web功能,可以左右滑动切换功能.如下图: 但是用户不知道可以滑动切换,所以需要提示用户可以滑动切换,那就添加了一个滑动动画. 滑动动画在最上层,所以当显示滑动提示显示的时候,用户切 ...

  5. 【BFS】POJ 3414

    直达 -> POJ 3414 Pots 相似题联动–>HDU 1495 非常可乐 题意:两个壶倒水,三种操作,两个桶其中一个满足等于C的最少操作,输出路径.注意a,b互倒的时候能不能倒满, ...

  6. React-native之持久化保存----AsyncStorage

    AsyncStorage AsyncStorage是一个简单的,未加密的,异步的,持久化,关键值存储系统,是全局的. iOS中存储类似于NSUserDefault,存储问plist文件存放在设备中. ...

  7. mac 终端常用命令

    1.复制文件内容到剪贴板:pbcopy < ~/.ssh/id_rsa.pub. 2.ssh key 的生成,参考mac ssh key 的获取. 3.sourcetree 需要输入的密码,指的 ...

  8. Redis_redis分布式锁-SETNX

    因业务需要使用了redis的SETNX来实现分布式锁. 描述:Redis有一系列的命令,特点是以NX结尾,NX是Not eXists的缩写,如SETNX命令就应该理解为:SET if Not eXis ...

  9. K线图学习

    本博文(适合入门的股民朋友)内容来自网络,股市有风险,入市需谨慎 一.起源 K线图(Candlestick Charts)又称蜡烛图.日本线.阴阳线.棒线等,常用说法是“K线”,起源于日本十八世纪德川 ...

  10. Convert PLY to VTK Using PCL 1.6.0 使用PCL库将PLY格式转为VTK格式

    PLY格式是比较流行的保存点云Point Cloud的格式,可以用MeshLab等软件打开,而VTK是医学图像处理中比较常用的格式,可以使用VTK库和ITK库进行更加复杂的运算处理.我们可以使用Par ...