MIN\MAX nodes in a defines range

Ajinkya Gaikwad
Ajinkya Gaikwad Altair Community Member
edited October 2020 in Community Q&A

Dear team,

I am interested in finding out the MIN\MAX node number(in my case nodes are randomly numbered and i want to find min\max from a defined range of node number). For that I have used 

 

 

::hwat::utils::CreateMark 'nodes'  1 all;

set h [hm_getmark nodes 1]

set maxall [::tcl::mathfunc::max {*}$h]

 

This works fine for small geometries. but it takes high time for large one's. While the Min\Max button does it very fast. So can you please suggest any code\script do it in faster way..or command for min\max (blue color) button.. 

 

Answers

  • tinh
    tinh Altair Community Member
    edited April 2019

    Use hm_entityminid and hm_entitymaxid

  • Ajinkya Gaikwad
    Ajinkya Gaikwad Altair Community Member
    edited April 2019

    thanks for your reply.

     

    hm_entitymaxid is giving the max for *all* the nodes.

    i was looking for the max for nodes only in a certain range of nodes.

     

    this would be similar to choosing nodes by id and then using the 'min/max' blue button.

     

  • tinh
    tinh Altair Community Member
    edited April 2019

    Use lsort to sort the ID list then extract 1st and end items