OpenCascade Primitives BRep-Cone

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

OpenCascade Primitives BRep-Cone

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 Cone BRep in OpenCascade, and also show how to use Tcl script to dump cone BRep info.

Key words. OpenCascade, BRep, Boundary Representation, Cone

1. Introduction

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

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

wps_clip_image-6966

Figure 1.1 Cone Generated by Tcl in Draw Test Harness

2. Dump Cone BRep Info by Tcl

使用Tcl脚本在Draw Test Harness中输出圆锥体(Cone)的边界表示(BRep)数据的命令如下图所示:

wps_clip_image-18650

Figure 2.1 Dump Cone BRep Info by Tcl in Draw Test Harness

以上命令会生成一个圆心位于坐标原点(0,0,0),半径R为10,高度H为20的圆锥体,圆锥体的尺寸如下图所示:

wps_clip_image-29124

Figure 2.2 Cone Generated by Tcl Script

3. Cone BRep in OpenCascade

还是先从顶点(Vertex)开始编号,来对圆锥体(Cone)的边界表示(BRep)进行理解。从导出的BRep信息可以看出,圆锥体有两个顶点(Vertex),对其编号,如下图所示:

wps_clip_image-22714

Figure 3.1 Vertex of the Cone

圆锥体共有三条边Edge,分别为Edge #7,Edge#8和Edge#10。现在来分析每条边中的几何信息。先来看看边Edge#7的几何信息:

wps_clip_image-22827

Figure 3.2 Edge #7 of the Cone

三维空间曲线2是一个圆(Circle),取值范围是[0,2PI]。由其参数可知此圆圆心位于原点(0,0,0),半径为10,位于XOZ平面上,即圆锥的底面的圆。

曲面1上的参数曲线4的取值范围是[0,2PI]。即PCurve4是位于原点,沿U方向的直线。所以在取值范围内得到曲面上的参数分别是(0, 0)和(2PI, 0)。即曲面上v值恒为0,u从0到2PI。由圆锥面的参数方程可知:

wps_clip_image-26763

wps_clip_image-13889

这就是圆的参数方程。即与空间曲线2表示的是同一个圆。同理曲面2上的曲线5也一样。

wps_clip_image-4040

Figure 3.3 PCurve 4 on Surface 1 and PCurve5 on Surface 2 of the Cone

同理对Edge#8中的几何信息进行分析可知,其中有一条三维空间曲线1和曲面1上的闭合曲线2和3。它们都表示起点在(10,0,0)沿锥面上的一条斜线。

wps_clip_image-22698

Figure 3.4 Edge#8 of the Cone

Edge#10中的几何信息只有曲面1上的曲线1,对应曲面上的参数分别为(0, 22.36)和(2PI, 22.36),且是退化边,退化(Degenerated)成一个点。即当v取22.36时,曲线的参数方程为:

wps_clip_image-25937

wps_clip_image-4707

Figure 3.5 Edge #10 of the Cone

wps_clip_image-14150

Figure 3.6 Wires of the Cone

由上图可知,圆锥体有两个环Wire,分别是Wire#4和Wire#6。其中环Wire#4就是圆锥体的底面圆环。将两个环画出如下图所示:

wps_clip_image-5313

Figure 3.7 Wires of the Cone

由两个环Wire#4和Wire#6对应的面Face#3和Face#5组成了壳Shell#2,壳Shell#2组成了体Solid#1。

4. Conclusion

通过Tcl生成的圆锥体Cone的边界表示BRep信息,分析了OpenCascade中的圆锥体的边界表示方式。

通过对OpenCascade中基本体Primitves的BRep信息进行分析,来理解OpenCascade中的边界表示方式。

通过使用Tcl脚本来输出BRep信息,来熟悉Tcl命令,体验Tcl在便利。

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 Quaternion
OpenCASCADE Quaternion eryar@163.com Abstract. The quaternions are members of a noncommutative division algebra first invented by William Rowan Hamilton.
1451 0
|
算法 Windows
|
C++ 算法
OpenCASCADE BRep Projection
OpenCASCADE BRep Projection eryar@163.com 一网友发邮件问我下图所示的效果如何在OpenCASCADE中实现,我的想法是先构造出螺旋线,再将螺旋线投影到面上。
1673 0
|
算法
OpenCASCADE Interpolations and Approximations
OpenCASCADE Interpolations and Approximations eryar@163.com Abstract. In modeling, it is often required to approximate or interpolate points to curves and surfaces.
1400 0
|
XML Java Shell
OpenCASCADE BRepTools
OpenCASCADE BRepTools eryar@163.com Abstract. OpenCASCADE BRepTools provides utilities for BRep data structure.
1454 0
|
算法 图形学 数据安全/隐私保护
OpenCASCADE BRep vs. OpenNURBS BRep
OpenCASCADE BRep vs. OpenNURBS BRep eryar@163.com Abstract. BRep short for Boundary Representation.
1657 0
|
C++ 算法 Windows
OpenNURBS to OpenCASCADE
OpenNURBS to OpenCASCADE eryar@163.com Abstract. The OpenNURBS initiative provides CAD/CAM/CAE and computer graphics software developers the tools...
1690 0
|
算法
OpenCASCADE Conic to BSpline Curves-Hyperbola
OpenCASCADE Conic to BSpline Curves-Hyperbola eryar@163.com Abstract. Rational Bezier Curve can represent conic curves such as circle, ellipse, hyperbola, .
1090 0
|
C语言 Windows 开发工具
OpenCASCADE Conic to BSpline Curves-Parabola
OpenCASCADE Conic to BSpline Curves-Parabola eryar@163.com Abstract. Rational Bezier Curve can represent conic curves such as circle, ellipse, hyperbola, .
1007 0
OpenCascade Primitives BRep-Cylinder
OpenCascade Primitives BRep-Cylinder eryar@163.com Abstract. BRep is short for Boundary Representation.
1131 0