PythonOCC Basics: Basic Assembly - Assembly of industrial robots

This section is the same strain of the underlying modeling instruction, since this section is not opencascade official pave the way for completely original. Note that the fitting means, not just the presence of the relative position of an entity having a corresponding fitting relation and constraints exist.

The following will be assembled industrial robot hand as a case study to explain, it will be divided into the following sections:

  • 1
  • 2
  • 3
  • 4

We will use the following functions:

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

AIS_ConnectedInteractiveClass, disconnect a connection view, and highlight mode to 0. This presentation will highlight the frame atypeofpresentation3d.top_AllView disable hidden line removal. (Disconnects the previous view and sets highlight mode to 0. This highlights the wireframe presentation aTypeOfPresentation3d. Top_AllView deactivates hidden line removal.)
Has the following function

  • 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


references:

  1. Referring to the example: https://opencascade.blogspot.com/2013/11/ais-connecting-objects.html
  2. Function queries: https://cdn.rawgit.com/tpaviot/pythonocc-core/804f7f3/doc/apidoc/0.18.1/OCC.AIS.html?highlight=ais_connectedinteractive#OCC.AIS.AIS_ConnectedInteractive

Guess you like

Origin blog.csdn.net/weixin_42755384/article/details/90550879