{"id":773,"date":"2020-11-06T01:38:56","date_gmt":"2020-11-06T09:38:56","guid":{"rendered":"http:\/\/gantovnik.com\/bio-tips\/?p=773"},"modified":"2020-11-06T01:38:56","modified_gmt":"2020-11-06T09:38:56","slug":"131-use-a-panel-to-create-an-ordered-list-of-entities-for-use-in-a-subsequent-command-in-tcl-in-hypermesh","status":"publish","type":"post","link":"https:\/\/gantovnik.com\/bio-tips\/2020\/11\/131-use-a-panel-to-create-an-ordered-list-of-entities-for-use-in-a-subsequent-command-in-tcl-in-hypermesh\/","title":{"rendered":"#131 Use a panel to create an ordered list of entities for use in a subsequent command in tcl in HyperMesh"},"content":{"rendered":"<p>#131 Use a panel to create an ordered list of entities for use in a subsequent command in tcl in HyperMesh<\/p>\n<p>To create a line from a user specified list of nodes:<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\n*createlistpanel nodes 1 &quot;Select nodes for the line:&quot;\r\nset node_list &#x5B; hm_getlist nodes 1 ];\r\nif { ! &#x5B; Null node_list ] } {\r\n    *linecreatefromnodes 1 0 150 5 179\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>#131 Use a panel to create an ordered list of entities for use in a subsequent command in tcl in HyperMesh To create a line from a user specified list of nodes: *createlistpanel nodes 1 &quot;Select nodes for the line:&quot; set node_list &#x5B; hm_getlist nodes 1 ]; if { ! &#x5B; Null node_list ] } [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","_lmt_disableupdate":"yes","_lmt_disable":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[24,27],"tags":[],"class_list":["post-773","post","type-post","status-publish","format-standard","hentry","category-hypermesh","category-tcl"],"modified_by":"gantovnik","jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8bH0k-ct","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":771,"url":"https:\/\/gantovnik.com\/bio-tips\/2020\/11\/130-use-a-panel-to-add-entities-to-a-mark-in-tcl-in-hypermesh\/","url_meta":{"origin":773,"position":0},"title":"#130 Use a panel to add entities to a mark in tcl in HyperMesh","author":"gantovnik","date":"2020-11-06","format":false,"excerpt":"#130 Use a panel to add entities to a mark in tcl in HyperMesh To create a mark of elements in a panel: *createmarkpanel elems 1 \"Please select the elements\" hm_getmark elems 1 To create a mark of elements in a panel using 2D faces as the default selection mode:\u2026","rel":"","context":"In &quot;HyperMesh&quot;","block_context":{"text":"HyperMesh","link":"https:\/\/gantovnik.com\/bio-tips\/category\/hypermesh\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2017,"url":"https:\/\/gantovnik.com\/bio-tips\/2024\/01\/402-find-edge-nodes-of-mesh-and-create-node-sets-for-each-edge-using-tcl-script-in-hypermesh\/","url_meta":{"origin":773,"position":1},"title":"#402 Find edge nodes of mesh and create node sets for each edge loop using tcl script in HyperMesh","author":"gantovnik","date":"2024-01-07","format":false,"excerpt":"Assume we have this model: The script will find all edges and create set of nodes for each edge: [code language=\"python\"] *clearmark comps 1 *clearmark elems 1 *createmark elems 1 \"by comps\" 1 # hm_getedgeloops = Returns surface and element entities of specific connection types. # looptype=2 get all closed\u2026","rel":"","context":"In &quot;HyperMesh&quot;","block_context":{"text":"HyperMesh","link":"https:\/\/gantovnik.com\/bio-tips\/category\/hypermesh\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2024\/01\/ex402_3.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2024\/01\/ex402_3.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2024\/01\/ex402_3.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":760,"url":"https:\/\/gantovnik.com\/bio-tips\/2020\/10\/127-create-rbe3-element-using-hypermesh-tcl\/","url_meta":{"origin":773,"position":2},"title":"#127 Create RBE3 element using tcl in HyperMesh","author":"gantovnik","date":"2020-10-29","format":false,"excerpt":"#127 Create RBE3 element using HyperMesh tcl To create an RBE3 element with dependent node 100 and independent nodes 101,102, and 103 with all of the nodes having all six degrees of freedom and a weight of 1.23 [code language=\"python\"] *createmark nodes 1 101 102 103 *createarray 3 123456 123456\u2026","rel":"","context":"In &quot;HyperMesh&quot;","block_context":{"text":"HyperMesh","link":"https:\/\/gantovnik.com\/bio-tips\/category\/hypermesh\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2219,"url":"https:\/\/gantovnik.com\/bio-tips\/2024\/06\/431-hypermesh-python-script-to-create-nodes-using-coordinates-from-csv-file\/","url_meta":{"origin":773,"position":3},"title":"#431 HyperMesh python script to create nodes using coordinates from csv file","author":"gantovnik","date":"2024-06-24","format":false,"excerpt":"Finally, I read how to write a script for HyperMesh in python. In this example, the script reads the coordinates of points from a cvs file. [code language=\"python\"] import os import hm import hm.entities as e from hwx import gui import csv model=hm.Model() os.chdir(r\"D:\\projects\\wordpress\\ex431\") with open('ex431_coordinates.csv', mode ='r') as file:\u2026","rel":"","context":"In &quot;HyperMesh&quot;","block_context":{"text":"HyperMesh","link":"https:\/\/gantovnik.com\/bio-tips\/category\/hypermesh\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2024\/06\/ex431.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":779,"url":"https:\/\/gantovnik.com\/bio-tips\/2020\/11\/133-create-vectors-and-planes-using-tcl-in-hypermesh\/","url_meta":{"origin":773,"position":4},"title":"#133 Create vectors and planes using tcl in HyperMesh","author":"gantovnik","date":"2020-11-12","format":false,"excerpt":" To create a plane,\u2026","rel":"","context":"In &quot;HyperMesh&quot;","block_context":{"text":"HyperMesh","link":"https:\/\/gantovnik.com\/bio-tips\/category\/hypermesh\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":940,"url":"https:\/\/gantovnik.com\/bio-tips\/2021\/08\/169-measures-the-shortest-distance-between-two-entity-selections-in-tcl-hypermesh\/","url_meta":{"origin":773,"position":5},"title":"#169 Measures the shortest distance between two entity selections in HyperMesh tcl","author":"gantovnik","date":"2021-08-26","format":false,"excerpt":"#169 Measures the shortest distance between two entity selections in HyperMesh tcl To get the shortest distance between nodes 100-200 and nodes 300-400: [code language=\"python\"] *createmark nodes 1 100-200 *createmark nodes 2 300-400 hm_measureshortestdistance nodes 1 0 nodes 2 0 0 [\/code] To get the shortest distance between surface 100\u2026","rel":"","context":"In &quot;HyperMesh&quot;","block_context":{"text":"HyperMesh","link":"https:\/\/gantovnik.com\/bio-tips\/category\/hypermesh\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts\/773","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/comments?post=773"}],"version-history":[{"count":0,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts\/773\/revisions"}],"wp:attachment":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/media?parent=773"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/categories?post=773"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/tags?post=773"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}