hexagon logo

I am using the fem_equiv_preview() to highlight nodes to be equivalenced by a session file. The positions are highlighted by circles, but when I move the model, the circles disappear. How do I maintain the circles until they are manually erased.

 I have also tried the fem_equiv_all_group2() but the same problem occurs.
Parents
  • Hi, apologies but I've been unable to reply for a while.
     
    You may have sorted this but in case not then here is the answer and also the methodology I used to find it that you may find useful.
     
    Patran graphics, the user part anyway, is set up by creating "segments" and putting things into them (draw) to display. The calls for this are the "gm_segment_xxx" and "gm_draw_xxx" families of calls. Why point this out? Well, knowing the calls that must be happening you can begin to look how they are called by, in this case, the equivalence node display utility.
    Start Patran with the -stdout flag (if your unfamiliar with this, edit the Patran desktop shortcut "properties" and add -stdout to the "Target:" setting).
    Start Patran and you will now have the cmd output window visible on screen.
    Open a small test db with some nodes to equivalence, open the utilities / FEM-General / Equivalence preview... utility.
    Now type in the command line:
    !!TRACE CALLS
    this will start Patran echoing every pcl call to the output window (extensive, very extensive output). Now click on the Preview Nodes option, then click on the Reset graphics option. Then type in:
    !!TRACE NONE
    this turns off the call tracing - otherwise you get an enormous amount of output flooding the output window.
    Looking at the content of the output window you will find at the "start"(after you turned on TRACE CALLS) something like:
    [Call to  bv_f_equiv_1.preview_cb]
     [Call to  ui_wid_get_vstring]
     [Call to  ui_wid_get]
     [Call to  bv_f_equiv_1.preview_nodes]
     [Call to  bv_f_equiv_1.segment_create]
      [Call to  bv_f_equiv_1.segment_delete]
      [Call to  repaint_graphics]
       [Call to  gm_viewports_refresh]
       [Call to  gm_xywindows_refresh]
      [Call to  gm_segment_create]
     
    This shows that the bv_f_equiv_1.preview_cb that you used, calls bv_f_equiv_1.preview_nodes, that in turn calls bv_f_equiv_1.segment_create, that calls bv_f_equiv_1.segment_delete, then gm_segment_create. The indentation shows which routine is making the calls.
    At the end of the trace after the reset graphics option was activated a similar type of sequence with a "bv_f_equiv_1.segment_delete" call.
     
    So first guess is to try this as a call and hope that the graphics segment ID that the routine is using is stored in the routine as a classwide variable (fairly common practice) and not required as an argument .
    do a preview and then type in the command:
    bv_f_equiv_1.segment_delete()
    it clears the graphics, so this looks like the call you needed.
     
    So many lines to explain how I found the necessary call, but this technique is so useful that it was worth detailing, hopefully it makes reasonable sense.
     
    best regards
    Arthur
     
     
     
     
Reply
  • Hi, apologies but I've been unable to reply for a while.
     
    You may have sorted this but in case not then here is the answer and also the methodology I used to find it that you may find useful.
     
    Patran graphics, the user part anyway, is set up by creating "segments" and putting things into them (draw) to display. The calls for this are the "gm_segment_xxx" and "gm_draw_xxx" families of calls. Why point this out? Well, knowing the calls that must be happening you can begin to look how they are called by, in this case, the equivalence node display utility.
    Start Patran with the -stdout flag (if your unfamiliar with this, edit the Patran desktop shortcut "properties" and add -stdout to the "Target:" setting).
    Start Patran and you will now have the cmd output window visible on screen.
    Open a small test db with some nodes to equivalence, open the utilities / FEM-General / Equivalence preview... utility.
    Now type in the command line:
    !!TRACE CALLS
    this will start Patran echoing every pcl call to the output window (extensive, very extensive output). Now click on the Preview Nodes option, then click on the Reset graphics option. Then type in:
    !!TRACE NONE
    this turns off the call tracing - otherwise you get an enormous amount of output flooding the output window.
    Looking at the content of the output window you will find at the "start"(after you turned on TRACE CALLS) something like:
    [Call to  bv_f_equiv_1.preview_cb]
     [Call to  ui_wid_get_vstring]
     [Call to  ui_wid_get]
     [Call to  bv_f_equiv_1.preview_nodes]
     [Call to  bv_f_equiv_1.segment_create]
      [Call to  bv_f_equiv_1.segment_delete]
      [Call to  repaint_graphics]
       [Call to  gm_viewports_refresh]
       [Call to  gm_xywindows_refresh]
      [Call to  gm_segment_create]
     
    This shows that the bv_f_equiv_1.preview_cb that you used, calls bv_f_equiv_1.preview_nodes, that in turn calls bv_f_equiv_1.segment_create, that calls bv_f_equiv_1.segment_delete, then gm_segment_create. The indentation shows which routine is making the calls.
    At the end of the trace after the reset graphics option was activated a similar type of sequence with a "bv_f_equiv_1.segment_delete" call.
     
    So first guess is to try this as a call and hope that the graphics segment ID that the routine is using is stored in the routine as a classwide variable (fairly common practice) and not required as an argument .
    do a preview and then type in the command:
    bv_f_equiv_1.segment_delete()
    it clears the graphics, so this looks like the call you needed.
     
    So many lines to explain how I found the necessary call, but this technique is so useful that it was worth detailing, hopefully it makes reasonable sense.
     
    best regards
    Arthur
     
     
     
     
Children
No Data