Turn On Feature lines on using TCL\TK

Vikas Kumar_22189
Vikas Kumar_22189 Altair Community Member
edited October 2020 in Community Q&A

Dear All,

 

How to turn on feature lines in Hyperview using tcl\tk.

I know the short cut key which is 'L' by pressing 'L' after loading mode (OP2 file) this will be done manually.

Please let me know the commands to set  feature lines on in 'Display Control -> Boundary Geometry -> Features ' as below image. I need TCL\Tk Command please help.

 

 

<?xml version="1.0" encoding="UTF-8"?>FeatureLines.thumb.png.53de4c78014b2bcec5f7d2b5a0372f94.png

 

Thanks 

Vikas Kumar

 

 

Answers

  • vipin_22401
    vipin_22401 Altair Community Member
    edited March 2018

    Hi Vikas

     

    Try the below code, but it only works if any section cuts are present in the model. I am not sure why it is not working on normal views.

     

    hwi OpenStack

    hwi GetSessionHandle session_handle

    session_handle GetProjectHandle project_handle

    project_handle GetPageHandle page_handle [project_handle GetActivePage]

    page_handle GetWindowHandle window_handle [page_handle GetActiveWindow]

    window_handle GetClientHandle client_handle

    client_handle GetRenderOptionsHandle render_options

    render_options SetBoundaryMeshMode features

    page_handle Draw

  • Vikas Kumar_22189
    Vikas Kumar_22189 Altair Community Member
    edited April 2018

    Hi Vpin,

     

    I am doing this but still it's not activating feature lines. Please help me.

     

    My code is:-

     

    hwi OpenStack        
    set t [::post::GetT]        
    hwi GetSessionHandle sess$t
    sess$t GetProjectHandle proj$t
    proj$t AddPage    
    proj$t RemovePage 1                
    proj$t SetActivePage [proj$t GetNumberOfPages]                                
    if { [catch {page$t ReleaseHandle} ts] } { }                         
    proj$t GetPageHandle page$t [proj$t GetActivePage]    
    page$t SetActiveWindow 1
    page$t GetWindowHandle win$t [page$t GetActiveWindow]                
    win$t GetViewControlHandle view_ctrl_hdl$t            
    view_ctrl_hdl$t SetOrientation 'top'
    view_ctrl_hdl$t SetPerspectiveMode true
    win$t SetClientType 'Animation'
    win$t GetClientHandle post1$t
    #Load model    
    set model_id [post1$t AddModel $op2_file_path]        
    post1$t GetModelHandle mod$t $model_id
    mod$t SetMeshMode 'features'
    post1$t GetRenderOptionsHandle renopt_hdl
    renopt_hdl SetUndeformedMeshMode none
    renopt_hdl SetBoundaryMeshMode 'features' 
    page$t Draw
    post1$t Draw

     

    Thanks,

    Vikas Kumar

  • Vikas Kumar_22189
    Vikas Kumar_22189 Altair Community Member
    edited April 2018

    Hello Vipin'

     

    I think this command is for different purpose

     

    SetBoundaryMeshMode – Sets the boundary mesh mode for iso and section cuts.

     

    SYNTAX

    poIRenderOptions_handle SetBoundaryMeshMode mode

     

    TYPE

    HyperView Tcl Modify

     

    DESCRIPTION

    This command sets the boundary mesh mode for iso and section cuts.

    Note This functionality is common for iso and section cuts.

    mode

    Set to features or none.

     

    ERRORS

    Returns 0 if successful, otherwise an error code.

     

    this is for this two..

     

     

    <?xml version="1.0" encoding="UTF-8"?>deformed.PNG

  • Vikas Kumar_22189
    Vikas Kumar_22189 Altair Community Member
    edited April 2018

    Hi Vikas

     

    Try the below code, but it only works if any section cuts are present in the model. I am not sure why it is not working on normal views.

     

    hwi OpenStack

    hwi GetSessionHandle session_handle

    session_handle GetProjectHandle project_handle

    project_handle GetPageHandle page_handle [project_handle GetActivePage]

    page_handle GetWindowHandle window_handle [page_handle GetActiveWindow]

    window_handle GetClientHandle client_handle

    client_handle GetRenderOptionsHandle render_options

    render_options SetBoundaryMeshMode features

    page_handle Draw

      This will work only for ISO and Section cuts but my requirement is different.

  • vipin_22401
    vipin_22401 Altair Community Member
    edited April 2018

    Hi Vikas,

     

    I could not find any other command for the same. If your requirement allows to create a section cut, try creating a section and move it away from the screen.

  • Vikas Kumar_22189
    Vikas Kumar_22189 Altair Community Member
    edited April 2018

    Hi Vikas,

     

    I could not find any other command for the same. If your requirement allows to create a section cut, try creating a section and move it away from the screen.

    Hi Vipin

    I have to simply turn it ON 'Feature Lines' for better look.

  • Emil George
    Emil George Altair Community Member
    edited April 2018

    hi..

    I am also looking for something similar.. where in I want to make a specific component alone in Opaque mode and remaining all components in Transparent mode