源码翻译之交互式对象包 AIS-AIS.hxx文件

在这里插入图片描述

Application Interactive Services provide the means to create links between an application GUI viewer and the packages which are used to manage selection and presentation. The tools AIS defined in order to do this include different sorts of entities: both the selectable viewable objects themselves and the context and attribute managers to define their selection and display. To orient the user as he works in a modeling environment, views and selections must be comprehensible. There must be several different sorts of selectable and viewable object defined. These must also be interactive, that is, connecting graphic representation and the underlying reference geometry. These entities are called Interactive Objects, and are divided into four types:
•the Datum
•the Relation
•the Object
•None. The Datum groups together the construction elements such as lines, circles, points, trihedra, plane trihedra, planes and axes. The Relation is made up of constraints on one or more interactive shapes and the corresponding reference geometry. For example, you might want to constrain two edges in a parallel relation. This contraint is considered as an object in its own right, and is shown as a sensitive primitive. This takes the graphic form of a perpendicular arrow marked with the || symbol and lying between the two edges. The Object type includes topological shapes, and connections between shapes. None, in order not to eliminate the object, tells the application to look further until it finds an object definition in its generation which is accepted. Inside these categories, you have the possibility of an additional characterization by means of a signature. The signature provides an index to the further characterization. By default, the Interactive Object has a None type and a signature of 0 (equivalent to None.) If you want to give a particular type and signature to your interactive object, you must redefine the two virtual methods: Type and Signature. In the C++ inheritance structure of the package, each class representing a specific Interactive Object inherits AIS_InteractiveObject. Among these inheriting classes, AIS_Relation functions as the abstract mother class for tinheriting classes defining display of specific relational constraints and types of dimension. Some of these include:
•display of constraints based on relations of symmetry, tangency, parallelism and concentricity
•display of dimensions for angles, offsets, diameters, radii and chamfers. No viewer can show everything at once with any coherence or clarity. Views must be managed carefully both sequentially and at any given instant. Another function of the view is that of a context to carry out design in. The design changes are applied to the objects in the view and then extended to the underlying reference geometry by a solver. To make sense of this complicated visual data, several display and selection tools are required. To facilitate management, each object and each construction element has a selection priority. There are also means to modify the default priority. To define an environment of dynamic detection, you can use standard filter classes or create your own. A filter questions the owner of the sensitive primitive to determine if it has the desired qualities. If it answers positively, it is kept. If not, it is rejected. The standard filters supplied in AIS include:
•AIS_AttributeFilter
•AIS_SignatureFilter
•AIS_TypeFilter. A set of functions allows you to choose the interactive objects which you want to act on, the selection modes which you want to activate. An interactive object can have a certain number of graphic attributes which are specific to it, such as visualization mode, color, and material. By the same token, the interactive context has a set of graphic attributes, the Drawer which is valid by default for the objects it controls. When an interactive object is visualized, the required graphic attributes are first taken from the object’s own Drawer if one exists, or from the context drawer for the others.

翻译:

应用交互服务提供了在应用程序GUI查看器与用于管理选择和呈现的包之间创建链接的手段。为了完成这一目标,AIS定义的工具包括不同类型的实体:即可选择的可视对象本身以及用于定义它们的选择和显示的上下文和属性管理器。为了在建模环境中指导用户工作,视图和选择必须是可理解的。必须定义几种不同类型的可选择和可视对象。这些对象也必须是交互式的,即连接图形表示和底层参考几何。这些实体被称为交互式对象,并分为四种类型:

•基准(Datum)
•关系(Relation)
•对象(Object)
•无(None)。基准将构造元素(如线、圆、点、三向测角器、平面三向测角器、平面和轴)组合在一起。关系由一个或多个交互式形状上的约束以及相应的参考几何构成。例如,您可能希望将两个边约束为平行关系。这种约束被视为一个独立的对象,并以敏感原语的形式显示。它表现为一个垂直箭头,用“||”符号标记,位于两个边之间。对象类型包括拓扑形状和形状之间的连接。无(None)是为了不消除对象,它告诉应用程序继续查找,直到在其生成中找到一个可接受的对象定义。在这些类别内部,您可以通过签名进行额外的特征描述。签名提供了对进一步特征的索引。默认情况下,交互式对象的类型为无(None),签名为0(等同于无)。如果您想为您的交互式对象指定特定的类型和签名,您必须重新定义两个虚拟方法:Type(类型)和Signature(签名)。在C++继承中,这些方法可以被覆盖以实现自定义的行为。

个人理解:

这个交互式对象,在occ中是用于交互的,也就是用户可以进行操作的对象,显示出来的对象,但是这个对象不能用来进行几何计算,就需要将交互式对象数据结构转为拓扑结构(Topods)进行几何计算,而其中的Type和signature可以在开发过程中进行拓展和标记,比如开发者对交互式对象进行区分并且进行一些标记要记录,可以使用这两个虚拟方法,另外,再开发过程中,如果要进行拓展,创建自己的交互对象, 需要重写这两个类进而实现,以上是个人理解。

实际例子代码:

暂无。

联系:

yzxxty39@163.com

  • 34
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
ECDIS(电子海图显示与信息系统)和AIS(自动识别系统)是现代航海技术中非常重要的两个组成部分。ECDIS是一种用于在船上显示电子海图的系统,它可以提供更精确、更详细的海图信息,为船舶的航行提供更好的可视化辅助。而AIS是一种通过无线电通信传输船舶相关信息的系统,它可以提供船舶位置、航向、航速等数据,以及其他船舶的识别信息。 ECIDS-AIS源码就是指用于开发与实现ECIDS和AIS功能的代码。ECIDS-AIS源码是由航海专业人士和软件开发人员共同开发的,它含了船舶的定位、航行状态、海图显示等相关算法和功能代码。通过ECIDS-AIS源码的开发,可以实现将航海过程中的电子海图和AIS信息高效地集成并显示在同一系统中。 ECIDS-AIS源码的开发涉及到海图数据的处理、AIS数据的解析和显示等多个方面的技术,并需要考虑船舶位置数据的准确性、船舶信息的实时性等因素。同时,源码的开发还要考虑系统的稳定性和可靠性,以确保在航海过程中系统的正常运行。 ECIDS-AIS源码的开发对于提高航海安全和效率非常重要。通过ECIDS-AIS系统,船舶可以更准确地了解周围船舶的行驶情况,避免碰撞事故的发生。同时,船舶可以实时获取海图信息,更好地规划航线,选择更安全的航行路径。因此,ECIDS-AIS源码的开发在航海业中具有重要的意义。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值