PythonOCC基础使用:基础装配——工业机器人装配

此章节是一脉相承于基础建模指令,由于这一章节没有opencascade官方铺路,为完全原创。注意该装配是指具有相应装配关系及约束存在的,并非只是实体相对位置的存在。

下面将以装配工业机器人手作为案例进行讲解,将分为以下几个部分:

  • 1
  • 2
  • 3
  • 4

将会使用到以下函数:

AIS_InteractiveObject
instance=AIS_ConnectedInteractive()
instance.Connect()
assembly=AIS_MultipleConnectedInteractive()
assembly.Connect()

AIS_ConnectedInteractive 类,断开上一个视图的连接,并将高亮显示模式设置为0。这将突出显示线框演示文稿atypeofpresentation3d.top_AllView禁用隐藏线删除。(Disconnects the previous view and sets highlight mode to 0. This highlights the wireframe presentation aTypeOfPresentation3d. Top_AllView deactivates hidden line removal.)
有如下函数

  • AcceptShapeDecomposition()

    Informs the graphic context that the interactive Object may be decomposed into sub-shapes for dynamic selection.

    Return type: bool

  • Connect()

    1.Establishes the connection between the Connected Interactive Object, anotherIobj, and its reference.

    Parameters: anotherIObj (Handle_AIS_InteractiveObject &) –
    Return type: void

  1. Establishes the connection between the Connected Interactive Object, anotherIobj, and its reference. Locates instance in aLocation.
    Parameters:

    anotherIobj (Handle_AIS_InteractiveObject &) –
    aLocation (gp_Trsf) –

Return type:void

  • ConnectedTo()

    Returns the connection with the reference Interactive Object.

    Return type: Handle_AIS_InteractiveObject

  • Disconnect()

    Clears the connection with a source reference. The presentation will no longer be displayed. Warning Must be done before deleting the presentation.

    Return type: None

  • HasConnection()

    Returns true if there is a connection established between the presentation and its source reference.

    Return type: bool


参考文献:

  1. 实例参考 :https://opencascade.blogspot.com/2013/11/ais-connecting-objects.html
  2. 函数查询: https://cdn.rawgit.com/tpaviot/pythonocc-core/804f7f3/doc/apidoc/0.18.1/OCC.AIS.html?highlight=ais_connectedinteractive#OCC.AIS.AIS_ConnectedInteractive

猜你喜欢

转载自blog.csdn.net/weixin_42755384/article/details/90550879