Jump to content

mahes

Members
  • Content Count

    57
  • Joined

  • Last visited


Reputation Activity

  1. mahes liked a post in a topic by llyle in table   
    Hello Mahes, 
     
    I agree to that, you can do a Find in Files search for "hwtk::table" inside the scripts folder (C:\Program Files\Altair\2017\hm\scripts) using notepad++ or any other code editor to get few more tcl programs using table.
  2. mahes liked a post in a topic by tinh in tk table   
    You can use tk table (refer to tk manual https://www.tcl.tk/man/
    or hwtk::table (read usage in start>all program>altairhyperworks>tools>HWTK Gui Toolkit)
  3. mahes liked a post in a topic by tinh in How to get circumferential grids by selecting a node using TCL   
    use hm_getsurfacenormal nodes $your_selected_nodeid
    the node must be associated to surface.
    if the node is not associated, use hm_getsurfacenormalatcoordinate
    to find intersection points between normal vector and surf, use *nodecreateatplaneintersection
    and to find mid node of 2 intersected nodes, use *createnodesbetweennodes
    to find nodes closest to the mid node, use hm_getclosestnode
     
    I think it is better to get it by *createmark "on plane"
    like this:
    *createmarkpanel nodes 1 "Pick a node on cylinder:" set Node1 [hm_getmark nodes 1] if {[hm_entityinfo exist nodes $Node1]} { set SurfId [hm_getentityvalue nodes $Node1 surfaceid 0] if {[hm_entityinfo exist surfs $SurfId]} { *createmark lines 1 "by surface" $SurfId foreach LineId [hm_getmark lines 1] { if {[hm_getlinetype]==2} { lassign [hm_getlinetgstartpoint $LineId] Vx Vy Vz eval *createmark nodes 1 {"on plane"} [expr [hm_nodevalue $Node1]] $Vx $Vy $Vz $Tolerance 1 1 *createmark nodes 2 displayed *markintersection nodes 1 nodes 2 if {[hm_marklength nodes 1]} { *numbersmark nodes 1 1 } *clearmarkall 1; *clearmarkall 2; break } } } }  
  4. mahes liked a post in a topic by tinh in Shell thickness   
    It's better to use hm_getthickness comps $compid
    So you don't need to handle attribs ids or names
  5. mahes liked a post in a topic by llyle in Property type   
    Hello Mahes,

    I tried recreating the property with user profile as Ansys and checked the command.tcl (which gets saved in the working directory or in Documents by default) to get an idea of what Ids are being used. 
     
    Regards,
    LL
  6. mahes liked a post in a topic by llyle in Property type   
    Hello Mahes,
     
    Sorry I didn't check the user profile, Try the below command,
     
    hm_getvalue props id=1 dataname=2902
     
    Regards,
    LL
  7. mahes liked a post in a topic by tinh in Freenodes   
    Like when you select n1n2n3base by hover mouse on surf or line until it is highlighted then click on it, a preserve node is created . I dont know why altair need preserved nodes, they just mess up database and sometimes raise errors in analysis and users debug them difficultly. 
  8. tinh liked a post in a topic by mahes in Freenodes and Improper set names   
    Hi tinh,
    @tinh
    Because of the space in the set name.
  9. mahes liked a post in a topic by tinh in Freenodes and Improper set names   
    Open ...ansys/modelchecker to see what improper set names are
  10. tinh liked a post in a topic by mahes in ETtype and Element config mismatch   
    Hi tinh,
    Thanks for sharing ur thoughts.
    *createmark elements 1 "by component" $n
       set comp_type [hm_getvalue elements mark=1 dataname=typename]
    I used the above to get it.
    after I make unique list and check length of list to be 1 .
  11. mahes liked a post in a topic by tinh in ETtype and Element config mismatch   
    ehh, Mahes. I am asking you...
    but i found it, try:
    foreach CompId $CompListToCheck {      set SensorId [hm_getentityvalue comps $CompId \$ELEM_TYPE 0 -byid]      set ElemType [hm_getcardimagename sensors $SensorId]      set ConfigType [hm_getconfigtypeincol comps elems $CompId -byid]      switch -- $ElemType {           SOLID95 {                set Config 210                set Type [lindex [hm_entityinfo configtypeids elems hex20] [lsearch [hm_entityinfo configtypes elems hex20] SOLID95]                if {[llength $ConfigType]&&![string equal $ConfigType "$Config $Type"]} {                     puts "Comp $CompId contains other elements than SOLID95"                }           }      } }  
  12. mahes liked a post in a topic by tinh in Findmark   
    Hi,
    another way is to use *createmark directly, like this:
    eval *createmark elems 1 {"by node"} 5000 285201 285459 286047 286925 286926 286929 286930 286932
    set ElemList [hm_getmark elems 1]
    #puts $ElemList
  13. mahes liked a post in a topic by llyle in Findmark   
    Hello Mahes,
     
    #put all node Ids in a mark:
    *createmark nodes 1 5000 285201 285459 286047 286925 286926 286929 286930 286932 
    #All elements attached to nodes, saved in Node Mark 1, will be saved in Elements Mark 2:
     *findmark nodes 1 257 1 elements 0 2
     
    #to set it in a variable
    set elementIDS [hm_getmark elements 2]
    puts $elementIDS
     
    Please refer *findmark documentation for more details :http://www.altairhyperworks.com/hwhelp/Altair/2017/help/hm_ref_guide/topics/reference/hm/_findmark.htm
     
  14. mahes liked a post in a topic by Q.Nguyen-Dai in Checking Elements   
    It's solver's specific criteron.
  15. mahes liked a post in a topic by samuel88 in Obtain the area and perimeter of geometry in Hypermesh   
    @mahes
     
    Thank you so much. 
     
    Please, how can I obtain the minimum area bounding box for a geometry in hypermesh?
  16. mahes liked a post in a topic by tinh in Update Hypermesh Extensions   
    Hello everybody
    This is a script to project nodes on elems:
    < a simple script so i do not make package index & installer, you have to source it or invoke menu File>Run>Tcl/Tk Script
    ProjectNodesToElems.tcl

     
     
     
    I made a new function for Hypermesh to export entity by right-click on model browser
    MenuExportDeck.zip
    Open Hypermesh, from menu File>Run>Tcl/Tk Script , browse to Installer.tcl in folder MenuExportDeck to install it in hmcustom.tcl
    Related post:
     
    I made a new function for Hypermesh to copy mesh among sessions
    hmcp.zip  <updated for HM2017> + <update installer.tcl to install in any folder>
    Please announce me if any error.
     
     
     
    - "Extract here" package hmcp.zip, copy the folder "hmcp" to anywhere you want to store.
    - Open hypermesh and run Installer.tcl file by enter menu File>Run >Tcl/Tk Script
    - start Hypermesh, it should shows an icon and provide some information like below:

     
    - You can copy elements selected in any current panel:

     
     
     
    - Once again, this topic is to introduce extensions for Hypermesh. I let updated version of hmdnd (drag and drop function) here
     
    tkdnd2.6.zip 
    <updated installer.tcl so you can install it to any folder, just open hypermesh and File>Run>Tcl/tk script to run installer.tcl>
     
    related post:
     
     
     
    - And a package to help making your own toolbars:tbopts.zip
      <update installer.tcl so you can install it to any folder>
     
    related post 
     
  17. Rahul R liked a post in a topic by mahes in Obtain the area and perimeter of geometry in Hypermesh   
    hi,
    I think u can use Tools>Mass Calc.
    There by selecting elements you will get area.
    perimeter
    geom>Length
    by selecting lines you will get.
  18. tinh liked a post in a topic by mahes in control structure   
    hi tinh,
    I have done with code using entity info of node id in element edges.
    Thanks for the suggestion.
     
     
    thanks,
    mahes
  19. mahes liked a post in a topic by tinh in node marking by path   
    I think the path is shortest, if two nodes are on free edges, path follows free edges if it is possible
  20. mahes liked a post in a topic by tinh in control structure   
    Why dont you create set after all updates?
    Somehow you should take the least effort of machine and man also
    Try arrange your work flow with fewer actions
  21. mahes liked a post in a topic by tinh in control structure   
    I understand
    From primary nodes, you want to add to the set only mid nodes nearby them, don't you?
  22. mahes liked a post in a topic by tinh in Mark adjacent nodes   
    *createmark elems 1 "by node" {*}[hm_getmark nodes 1]
    *appendmark nodes 1 "by elems" {*}[hm_getmark elems 1]
  23. mahes liked a post in a topic by Roshan Shiveshwar in sets   
    This should work...
     
    hm_createmark nodes 1 "by set"  "Your set name"
     
    foreach node [hm_getmark nodes 1] {
       *** perform activity
     
    }
     
     
     
×
×
  • Create New...