OpenCascade BRep Format Description (2)
OpenCascade BRep Format Description
摘要Abstract:本文结合OpenCascade的BRep格式描述文档和源程序,对BRep格式进行分析,详细说明BRep的数据组织形式。结合源程序,可以对OpenCascade中Modeling Data模块中的模型数据结构进行理解。
关键字Key Words:OpenCascade, BRep Format, ModelingData
一、实例分析
OpenCascade的data目录中的face1.brep文件:
1 DBRep_DrawableShape 2 3 CASCADE Topology V1, (c) Matra-Datavision 4 Locations 5 5 1 6 1 0 0 -0.4 7 0 1 0 0 8 0 0 1 0 9 1 10 1 0 0 -0.4 11 0 1 0 0 12 0 0 1 0 13 1 14 1 0 0 0.8 15 0 1 0 0 16 0 0 1 0 17 1 18 1 0 0 0.8 19 0 1 0 0 20 0 0 1 0 21 2 1 1 2 1 3 1 4 1 0 22 Curve2ds 8 23 1 0 0.8 1 0 24 2 0 0 1 0 0 1 0.8 25 1 1.82347658193698 0 0 1 26 1 1 -1.77459666924148 1 0 27 1 4.45970872524261 0 0 1 28 1 1 -0.225403330758516 1 0 29 1 0 0 1 0 30 2 0 0 1 0 0 1 0.8 31 Curves 4 32 2 0 0 0.8 0 0 1 1 0 0 0 1 0 0.8 33 1 -0.2 0.774596669241484 0 0 0 1 34 1 -0.2 -0.774596669241484 0 0 0 1 35 2 0 0 0 0 0 1 1 0 0 0 1 0 0.8 36 Polygon3D 0 37 PolygonOnTriangulations 0 38 Surfaces 4 39 2 0 0 0 0 0 1 1 0 0 0 1 0 0.8 40 1 0 0 0.8 0 0 1 1 0 0 0 1 0 41 1 -1 -1 -1 1 0 0 0 0 1 0 -1 0 42 1 0 0 0 0 0 1 1 0 0 0 1 0 43 Triangulations 0 44 45 TShapes 10 46 Ve 47 2.0000002e-007 48 -0.2 0.774596669241483 0.8 49 0 0 50 51 0101101 52 * 53 Ve 54 2.0000002e-007 55 -0.2 -0.774596669241484 0.8 56 0 0 57 58 0101101 59 * 60 Ed 61 1e-007 1 1 0 62 1 1 0 1.82347658193698 4.45970872524261 63 2 1 1 0 1.82347658193698 4.45970872524261 64 2 2 2 0 1.82347658193698 4.45970872524261 65 0 66 67 0101000 68 +10 0 -9 0 * 69 Ve 70 2.0000002e-007 71 -0.2 0.774596669241483 0 72 0 0 73 74 0101101 75 * 76 Ed 77 1e-008 1 1 0 78 1 2 0 0 0.8 79 2 3 1 0 0 0.8 80 2 4 3 5 0 0.8 81 0 82 83 0101000 84 +7 0 -10 0 * 85 Ve 86 2.0000002e-007 87 -0.2 -0.774596669241484 0 88 0 0 89 90 0101101 91 * 92 Ed 93 1e-008 1 1 0 94 1 3 0 0 0.8 95 2 5 1 0 0 0.8 96 2 6 3 5 0 0.8 97 0 98 99 0101000 100 +5 0 -9 0 * 101 Ed 102 1e-007 1 1 0 103 1 4 0 1.82347658193698 4.45970872524261 104 2 7 1 0 1.82347658193698 4.45970872524261 105 2 8 4 0 1.82347658193698 4.45970872524261 106 0 107 108 0101000 109 +7 0 -5 0 * 110 Wi 111 112 0101100 113 -8 0 -6 0 +4 0 +3 0 * 114 Fa 115 0 1e-007 1 0 116 117 0101000 118 +2 0 * 119 120 +1 0 121 0 122
显示结果如下图所示:
Figure 1. Wireframe mode
Figure 2. Shaded mode
二、结论
因为OpenCascade的Brep格式是自己的格式,只用到了ModelingData模块,不使用DataExchange模块,可以作为数据交换的一种格式。
三、参考资料
1. BNF范式:http://hi.baidu.com/xuyingming2012/item/9060029141427bd81b49df9e
2. BRep Format Description
3. OpenCascade source code
PDF Version: BRep Format Description
PDF Version: BRep Format Description White Paper