OpenCASCADE AIS Manipulator

OpenCASCADE AIS Manipulator

[email protected]

Abstract. OpenCASCADE7.1.0 introduces new built-in interactive object AIS_Manipulator providing interface for moving objects within 3D viewer. The class features three kinds of transformation modes for attached objects: translation through axis, scaling within axis, rotation around axis. The object can be activated using vmanipulator command within Draw Test Harness.

Key Words. OpenCASCADE, 3D Viewer Interactive, Model Editor, Manipulator

1. Introduction

三维造型是几何内核关键功能,对于三维模型如果有良好的用户交互体验,那么对于模型的布置调整就像玩游戏一样便利,给用户带来更高效率。对于工程应用类软件,如造船、工厂CAD设计软件,建完模型后一个重要步骤就是调整模型的位置,即对模型的合理的布置,这就涉及到模型的交互布置。

有的CAD设计软件调整模型位置用一个对话框,将平移、旋转的参数都列出在对话框中,当选中一个要调整的模型时,就显示出这个对话框,输入移动矢量,或旋转轴及角度数据,来对模型的位置进行调整。这种对话框中数据很多,有的数据还需要用户去计算,用户较差。

有的CAD设计软件调整模型位置用到了模型编辑器(Model Editor),即只需要通过鼠标的交互操作就可以轻松将模型调整到想要的位置。如下图所示:

Figure 1. Model Editor of AVEVA Plant(PDMS)

如上图所示为AVEVA Plant(PDMS)的操纵器可以只通过鼠标交互来完成模型方位的调整,给用户以良好的体验。不需要去计算那么多数据。OpenSceneGraph中也有类似的操纵器功能。

OpenCASCADE7.1.0也引入了操纵器这个激动人心的功能,可见OpenCASCADE的开发团队正提升用户体验,本文通过在Draw Test Harness中来测试这个功能。基于这个功能,可以给自己的三维建模软件的模型调整提供良好的用户体验。

2. Test in Draw Harness

OpenCASCADE的Draw Test Harness的文档还没有更新,从命令的帮助中可以看到vmanipulator的用法如下图所示:

Figure 2. vmanipulator help info

使用vmanipulator命令需要先关联attach一个模型,如下图所示:

Figure 3. Attach manipulator to an ais object

当鼠标移动到坐标轴或旋转圆上的时候,就可以对模型进行位置的调整了:

Figure 4. Translate the AIS Object

如上图所示为将鼠标移动到X轴上,高亮后将模型沿着X轴方向进行移动。也可以将鼠标移动到旋转圆上,等高亮后,即可以绕轴进行旋转。

3. Conclusion

OpenCASCADE7.1.0版本中引入了模型操纵器的功能,使OpenCASCADE三维视图中的模型位置调整更加方便。由些可以看出OpenCASCADE在可视化方面的改进还是很大的,希望更多的行业能应用上这个开源库,在应用中去创造价值。

PDF Version: OpenCASCADE AIS Manipulator

时间: 2024-10-19 22:16:14

OpenCASCADE AIS Manipulator的相关文章

OpenCASCADE View Manipulator

OpenCASCADE View Manipulator [email protected] Abstract. When you finish modeling objects in the scene, you must want to use some operations to view the scene objects, such as Pan, Zoom and Rotate the scene. Pan and Zoom is easy to understand, rotate

Bounding Volume Hierarchy BVH in OpenCASCADE

Bounding Volume Hierarchy BVH in OpenCASCADE [email protected] Abstract. Bounding Volume Hierarchy(BVH) organizes geometric objects in the tree based on spatial relationships. Each node in the tree contains an axis-aligned bounding box of all the obj

OpenCASCADE Make Primitives-Box

OpenCASCADE Make Primitives-Box [email protected] Abstract. By making a simple box to demonstrate the BRep data structure of the OpenCASCADE. The construction method is different from BRepPrimAPI_MakeBox. In the paper construct the box from vertex, e

AnyCAD C++ SDK与OpenCASCADE互操作

AnyCAD SDK有.Net和C++两个版本,使用C++版本的AnyPlatformOcc模块可以实现与OpenCASCADE互操作. C++版本(VS2010 32bit)下载 在AOBridge.h中定义了转换API: namespace AnyCAD { namespace API{   class AnyPlatformOcc_API AOBridge   {   public:      static TopoShape Convert(const TopoDS_Shape& sha

OpenCASCADE Conic to BSpline Curves-Parabola

OpenCASCADE Conic to BSpline Curves-Parabola [email protected] Abstract. Rational Bezier Curve can represent conic curves such as circle, ellipse, hyperbola, .etc. But how to convert a conic curve to BSpline curve is still question, i.e. Represent a

OpenCASCADE Documentation System

OpenCASCADE Documentation System [email protected] Abstract. Doxygen is the de facto standard tool for generating documentation from annotated C++ sources, but it also supports other popular programming languages. You can also use doxygen for creatin

OpenCASCADE BRep Projection

OpenCASCADE BRep Projection [email protected] 一网友发邮件问我下图所示的效果如何在OpenCASCADE中实现,我的想法是先构造出螺旋线,再将螺旋线投影到面上. 为了验证我的想法,结合原来螺旋线的造型算法,来测试下这种效果的实现.依然采用Tcl脚本在Draw Test Harness中试验.个人觉得高效使用OpenCASCADE的方法应该也是先用Tcl脚本来验证一些想法后,再根据使用到的命令找到OpenCASCADE中DRAW的命令实现,最后再可以根

OpenCASCADE Expression Interpreter by Flex & Bison

OpenCASCADE Expression Interpreter by Flex & Bison [email protected] Abstract. OpenCASCADE provide data structure of any expression, relation or function used in mathematics. Flex and Bison are tools for building programs that handle structured input

OpenCASCADE Interpolations and Approximations

OpenCASCADE Interpolations and Approximations [email protected] Abstract. In modeling, it is often required to approximate or interpolate points to curves and surfaces. In interpolation, the process is complete when the curve or surface passes throug