Python Result and DPF - how to select component

Pernelle Marone-Hitz
Pernelle Marone-Hitz Member, Moderator, Employee Posts: 859
500 Comments Photogenic Name Dropper Solution Developer Community of Practice Member
✭✭✭✭

Using DPF to retrieve the deformation on a model. The operator returns a fields container with 3 components (UX, UY, UZ). How can I select the component to be plotted, in case I want to plot only UX for example ?

Tagged:

Answers

  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 859
    500 Comments Photogenic Name Dropper Solution Developer Community of Practice Member
    ✭✭✭✭

    Use the component_selector operator:

    deformation_component = dpf.operators.logic.component_selector()
    deformation_component .inputs.field.Connect(deformation)
    deformation_component .inputs.component_number.Connect(0)