Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


tinh last won the day on October 1

tinh had the most liked content!

About tinh

  • Rank
    Super User

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Country
  • Interests
    Meshing-checking tools tcl/tk
  • Are you University user?

Recent Profile Visitors

13522 profile views
  1. Use CBEAM (1d>bar2)
  2. In below sample proc. I use input panel title to realize main panel that "return" button is placed on I test with HM2017. Please test it on HM Desktop also proc ::*createmarkpanel2 args { set proc [dict get [info frame [info frame]] proc] if {[string equal "{}" $args]} { set InputPanelTitle [lindex [set $proc] end] set CurrentPanelTitle [[if {[info exists ::hw::p_message_label]} {set ::hw::p_message_label} else {set ::HM_Framework::p_message_label}] cget -text] if {[string equal $CurrentPanelTitle $InputPanelTitle]} { lassign [hm_getpanelarea] PNx PNy PNw PNh place .panel_return \ -x [expr $PNx+$PNw-[.panel_return cget -width]-20] \ -y [expr $PNy+$PNh-[.panel_return cget -height]-20-[lindex [hm_getgraphicsarea] 1]] raise .panel_return } else { lower .panel_return } return } else { catch {lower .panel_return} } if {[hm_info functionlock]} return if {![winfo exists .panel_return]} { button .panel_return \ -activebackground #c06060 \ -background #c06060 \ -compound left \ -font {{MS Sans Serif} 10 normal roman} \ -foreground Black \ -height 20 \ -highlightthickness 0 \ -image [image create photo imgBlank] \ -padx 0 -pady 0 \ -text return \ -width 100 } .panel_return configure -command "*clearmark $args; hm_exitpanel" set $proc $args hm_framework registerproc $proc after_menudraw set ERCODE [catch {eval *createmarkpanel $args} RESULT INFO] hm_framework unregisterproc $proc after_menudraw return -code $ERCODE -options $INFO $RESULT }
  3. *createmark elements 1 "ComponentName" will this command select solid elems?
  4. I have a way, not official because hooking to panels is tough (it is not tk widget, it is C++). Create a tk button looks like "reject" button, bind it with a script that clear mark then call hm_exitpanel Place it over panel area just after *createmarkpanel (need to call via hm_setpanelproc) Moreover, you need to raise it again whenever panel is redrawn (if you click "nodes" to popup advsel menu) I will give an sample later.
  5. Maybe you have wrong component name, it may be Clip1, "clip 1", etc... Try script "MenuExportDeck" , right click on comps and select "Save geometry" https://forum.altair.com/topic/16835-update-hypermesh-extensions/?tab=comments#comment-30266
  6. So, Ignore nodes which are far from X axis Use createmark with option "on plane" or "by cylinder"
  7. Vizualization is not important. If you set ZOFF solver will 'understand' and compute with the value. Sometimes hm visualizes problems.
  8. F11 > add/remove points to remove orphan fixed points so mesh will not bind to their position
  9. 1. Ignore nodes that have globalx < 0 use *createmark 2. With nodes have globalx > 0, get closest node to (-1000000, 0, 0) use hm_getclosestnode
  10. Hi Widget pathname of that menu is .model._pw._fbr.content.frmTreeArea.frmTree._m But from v14, it doesn't come in a static way (depends on what you click on) so if you add a menu item then it will be cleared before pop up. To hook an item just before the menu pops up, thanks to Tk mechanism providing <<MenuSelect>> event. This is a way I used in menuexportdeck script: proc ::nexpd::p_Initialize {} { set BindScript [bind Menu <<MenuSelect>>] if {![string match *::nexpd::p_HookMenu* $BindScript]} { bind Menu <<MenuSelect>> {+after idle [list ::nexpd::p_HookMenu %W]} } } proc ::nexpd::p_HookMenu {menuName} { if {![winfo exists $menuName]} return if {[string equal Menu [winfo class $menuName]]} { if {[string match .model*.frmTreeArea.frmTree.* $menuName]} { set menuParent [winfo parent $menuName] while {![string equal TreeCtrl [winfo class $menuParent]]} { set menuName $menuParent set menuParent [winfo parent $menuName] if {![string equal Menu [winfo class $menuName]]} return } set Hooked 0 set Count [$menuName index end] for {set i 0} {$i<=$Count} {incr i} { if {[lsearch -exact {cascade command} [$menuName type $i]]!=-1&&[string equal "Export Deck" [$menuName entrycget $i -label]]} { set Hooked 1 break } } set Selection [$menuParent selection get] if {[llength $Selection]} { if {!$Hooked} { if {![winfo exists $menuName.exportdeck]} { menu $menuName.exportdeck -tearoff 0 -activebackground [$menuName cget -activebackground] \ -activeforeground [$menuName cget -activeforeground] \ -background [$menuName cget -background] \ -foreground [$menuName cget -foreground] $menuName.exportdeck add command -label "Only Selected" -command [list ::nexpd::p_ExportSelection $menuParent $Selection 0] $menuName.exportdeck add command -label "With References" -command [list ::nexpd::p_ExportSelection $menuParent $Selection 7] $menuName.exportdeck add command -label "Save Geometry" -command [list ::nexpd::p_ExportSelection $menuParent $Selection -1] } $menuName insert 0 cascade -label "Export Deck" -menu $menuName.exportdeck } else { if {[string equal disabled [$menuName entrycget "Export Deck" -label]]} { $menuName entryconfigure "Export Deck" -state normal } } } else { if {$Hooked} { if {![string equal disabled [$menuName entrycget "Export Deck" -label]]} { $menuName entryconfigure "Export Deck" -state disabled } } } } } }
  11. Hi I have an example here I will give the code later because it is in my pc https://forum.altair.com/topic/16835-update-hypermesh-extensions/?tab=comments#comment-30266
  • Create New...