OCCT的拓朴表示
来源:互联网 发布:网络安全工程师考证 编辑:程序博客网 时间:2024/04/29 02:16
OCCT的拓朴表示采用BREP形式,可以支持non-manifold实体。
OCCT的拓朴表示分为两层:拓朴对象层和BREP表示层。
先看拓朴对象层,如下是类继承关系:
TopoDS_Shape
――TopoDS_Solid
――TopoDS_Shell
――TopoDS_Face
――TopoDS_Edge
――TopoDS_CompSolid
――TopoDS_Compound
――TopoDS_Vertex
――TopoDS_Wire
这里,shape对象是一个对下层拓朴对象的引用(reference),并记录对象的位置和方向属性。这里可以针对不同位置或方向的同一个底层对象,实现共享。属性三个:
Handle_TopoDS_TShapemyTShape;//底层对象
TopLoc_LocationmyLocation;//位置信息
TopAbs_OrientationmyOrient;//方向。
上述这些对象,都是一些引用,结构和简单。具体的拓朴信息和几何信息在Tshape中。下面看TopoDS_Tshape的继承关系:
TopoDS_TShape
――TopoDS_TWire
――TopoDS_TVertex
――――BRep_TVertex
――TopoDS_TSolid
――TopoDS_TShell
――TopoDS_TFace
――――BRep_TFace
――TopoDS_TEdge
――――BRep_TEdge
――TopoDS_TCompSolid
――TopoDS_TCompound
这里TopoDS开始的类是拓朴层的类,Brep开始的类是具体的BREP表示层的类。Tshape具有如下主要的属性:
TopoDS_ListOfShapemyShapes;
Standard_IntegermyFlags;
即每个Tshape有一系列的TopoDS_Shape(引用)组成,每个引用记录的相应的几何信息和拓朴信息。例如:一个Twire可能由多个Edge组成等。如下是类的一些简单说明:
- Tvertex: A Vertex is a topological point in two or three dimensions。
- Tedge:A topological part of a curve in 2D or 3D, the boundary is a set of oriented Vertices。
- Twire:A set of edges connected by theirvertices。
- Tface: A topological part of a surface or of the 2D space.The boundary is a set of wires and vertices.
- Tshell:A set of faces connected by theiredges.
- Tsolid: ATopological part of 3D space, bounded by shells, edges and vertices.
- TCompSolid; Aset of solids connected by their faces.
- TCompound; ATCompound is an all-purpose set of Shapes.
总之,TcompSolid由一系列的Solid组成,每个TSolid由一系列的Shell组成,每个TShell由一系列的Face组成,每个TWire由一系列的Edge组成,每个Tedge由一系列的Vertex组成。当然,不是随便就可以组成的,还是有要求的,比如:Face组成Tshell要求Face的边境相连等。
上述的声明和实现主要在TopoDS package中。
上述TopoDS_T*类,主要是上面显示的两种属性。具体的几何数据和拓朴数据由BREP层实现。
BREP层描述了一个Boundary Representation Data Structure,并通过继承TopoDS层的类,添加了几何信息。从上可以看出,有三个主要的实现类:
Brep_Tvertex 、Brep_Tedge 、Brep_Tface类。
先从简单的Brep_Tvertex类说起。Tvertex表示一个节点拓朴对象,包含了一个3D点信息和一个Tolerance信息,如下:
gp_Pnt myPnt;
Standard_RealmyTolerance;
BRep_ListOfPointRepresentationmyPoints;
第三个属性目前似乎没有使用。
再看Brep_Tedge类,改类比较复杂,看OCCT的文档说明:
The TEdge fromBRep is inherited from the Tedge from TopoDS. It contains the geometric data,The TEdge contains :
- * A tolerance.
- * A same parameter flag.
- * A same range flag.
- * A Degenerated flag.
- * A list of curve representation.
属性如下:
Standard_RealmyTolerance;
Standard_IntegermyFlags;
BRep_ListOfCurveRepresentationmyCurves;
其中,比较复杂的是listofcurve属性。每个Edge包含了一系列各类的curve,看一些OCCT的文档说明:
An Edge is defined by a list of curve representations which are either :
-- Geometric representations :
- * A 3d curve (at most one) 3D曲线。
- * A curve on surface, curve in parametricspace. 参数曲线
- * A curve on closed surface, two curves inparametric space.例如圆柱的边。
-- Polygonal representations : 剖分后的数据。
- * A 3d polygon (at most one).
- * A Polygon on triangulation (array ofnode indices)
- * A Polygon on closed triangulation (2arrays of node indices)
- * A polygon on surface (array of 2d pointsin parametric space)
-- Curve on 2 surfaces :
* This is used for storing shapecontinuity.
足够的复杂了。下面看一些list中可能有那些类:
BRep_CurveRepresentation
――BRep_PolygonOnTriangulation
――――BRep_PolygonOnClosedTriangulation
――BRep_PolygonOnSurface
――――BRep_PolygonOnClosedSurface
――BRep_Polygon3D
――BRep_GCurve
――――BRep_Curve3D
――――BRep_CurveOnSurface
――――――BRep_CurveOnClosedSurface
――BRep_CurveOn2Surfaces
这些类很多,后面再详细补充,主要关注如下类:
Gcurve类:表示是几何曲线类,可能是3D曲线(Curve3D),也可能是参数曲线(CurveOnSurface类),而参数曲线可能是闭合曲线的参数曲线(CurveOnClosedSurface类)。
裁剪曲面中,裁剪环中的裁剪曲线,就是使用CurveOnSurface表示的。
通常,如果一条曲线是单独的3D曲线,则listofcurve中通常只包含Curve3d。如果一个曲线是一个裁剪曲线,则通常包括一条3d曲线和一个参数曲线。当所在曲面进行了剖分后,则还会有对于的polygon数据。这也是为什么使用list记录这些信息的原因。
先到这里,下面看Tface。
先看OCCT文档说明:
The TFacecontains :
- * A suface, a tolerance and a Location.
- * A NaturalRestriction flag, when this flag is True the boundary of the face is known to be the parametric space (Umin, UMax, VMin,VMax).
- * An optionalTriangulation. If there is a triangulation the surface can be absent.
- * The Location is used for the Surface.
- * The triangulation is in the samereference system than the TFace. A point on mySurface must be transformed with myLocation, but not a point on thetriangulation.
- * The Surface may be shared bydifferent TFaces but not the Triangulation, because the Triangulation may be modified by the edges.
Tface包括如下属性:
- Handle_Geom_SurfacemySurface; 关联的geom层的曲面信息,这个曲面可能是无界曲面,例如:Plane。
- Handle_Poly_TriangulationmyTriangulation; Face网格剖分后生成的网格数据。主要用于显示时使用。
- TopLoc_LocationmyLocation;曲面的位置信息,为了便于同一个曲面在不同位置显示时的数据共享。
- Standard_RealmyTolerance; 曲面的误差。
- Standard_BooleanmyNaturalRestriction; 是否自然参数限制的曲面,当是自然限制时,曲面被矩形参数区域[U1,U2]×[V1,V2]限制,否则,为裁剪曲线限制,参数裁剪区域通常不是规则的矩形区域。
通常,一个裁剪曲面Tface,除包含上述信息外,还会包含一系列的Wire子shape,这些wire构成了Tface的多个裁剪环,其中一个为外环,0个或多个内环。
拓朴的基本表示先总结到此,后续再逐步随学习深入之。
- OCCT的拓朴表示
- Occt的3D Geometry的曲线和曲面表示
- win10 vs2015 编译OCCT的注意事项
- Occt的visualization模块:如何使用MFC和Occt显示一个Bspline曲线
- 【第四回】新手入门OCCT的一条学习主干线
- 【第五回】OCCT渲染数据的结构定义解析
- 工业以太网的常用网络拓朴结构特点揭示
- 拓朴排序
- 【第二回】使用OCCT实现对一个瓶子建模的总结
- 【第三回】使用OCCT做类似AutoCAD的拉伸功能(Extrude)
- 【第六回】OCCT之Package Geom的曲线曲面参数方程解析
- OpenCascade中的拓朴与几何的适配器的使用(转自eryar)
- 在不改变网络拓朴情况下,临时解决IP不足的方法
- 三维立体业务拓朴及多维度的网络监控与管理
- POJ1949 拓朴排序
- 拓朴图绘制技术
- 渗透中的拓朴图分析
- +-*/的表示
- [英语阅读]裸体《蒙娜丽莎》现世
- Hadoop初探
- 外企常用的十大英语关键词
- 邮件范例:应付难办的客户
- SQL操作全集
- OCCT的拓朴表示
- MapXtreme for Java精华文章资料荟萃
- 利用 IBM Rational Software Architect 和 IBM ClearCase Remote Client (CCRC) 简化全球化开发与交付
- 上海汉原信息技术有限公司 招聘java工程师
- [双语阅读]针眼中的微雕:奥巴马另类全家福
- 深入理解 Rational ClearCase UCM 依赖
- 2007年11月22日(21日没写)
- 搞定3G上网
- 珠海面试题2-牌排序