{"id":940,"date":"2021-08-26T23:07:33","date_gmt":"2021-08-27T06:07:33","guid":{"rendered":"https:\/\/gantovnik.com\/bio-tips\/?p=940"},"modified":"2021-09-01T13:00:13","modified_gmt":"2021-09-01T20:00:13","slug":"169-measures-the-shortest-distance-between-two-entity-selections-in-tcl-hypermesh","status":"publish","type":"post","link":"https:\/\/gantovnik.com\/bio-tips\/2021\/08\/169-measures-the-shortest-distance-between-two-entity-selections-in-tcl-hypermesh\/","title":{"rendered":"#169 Measures the shortest distance between two entity selections in HyperMesh tcl"},"content":{"rendered":"<p>#169 Measures the shortest distance between two entity selections in HyperMesh tcl <\/p>\n<p>To get the shortest distance between nodes 100-200 and nodes 300-400:<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\n*createmark nodes 1 100-200\r\n*createmark nodes 2 300-400\r\nhm_measureshortestdistance nodes 1 0 nodes 2 0 0\r\n<\/pre>\n<p>To get the shortest distance between surface 100 and lines 1-10, with the distance output relative to system ID 5:<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\n*createmark surfs 1 100\r\n*createmark lines 1 1-10\r\nhm_measureshortestdistance surfs 1 0 lines 1 0 5\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>#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: *createmark nodes 1 100-200 *createmark nodes 2 300-400 hm_measureshortestdistance nodes 1 0 nodes 2 0 0 To get the shortest distance between surface 100 and lines 1-10, with the distance output relative [&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-940","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-fa","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":779,"url":"https:\/\/gantovnik.com\/bio-tips\/2020\/11\/133-create-vectors-and-planes-using-tcl-in-hypermesh\/","url_meta":{"origin":940,"position":0},"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":760,"url":"https:\/\/gantovnik.com\/bio-tips\/2020\/10\/127-create-rbe3-element-using-hypermesh-tcl\/","url_meta":{"origin":940,"position":1},"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":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":940,"position":2},"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":943,"url":"https:\/\/gantovnik.com\/bio-tips\/2021\/09\/170-gets-the-distance-of-the-given-point-from-the-nearest-line-with-ids-specified-as-arguments-in-hypermesh-tcl\/","url_meta":{"origin":940,"position":3},"title":"#170 Gets the distance of the given point from the nearest line with IDs specified as arguments in HyperMesh tcl","author":"gantovnik","date":"2021-09-01","format":false,"excerpt":"#170 Gets the distance of the given point from the nearest line with IDs specified as arguments in HyperMesh tcl. To get closest to the point with coordinates (10, 20, 30) point on the line with ID 13: [code language=\"python\"] hm_getdistancefromnearestline [list 10 20 30] 13 [\/code] To get closest\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":1727,"url":"https:\/\/gantovnik.com\/bio-tips\/2022\/12\/210-parametric-curve-in-3d-2-2-2-2-2-2-2-2-2-2-2-2-2-3-2-2-2-2-2-2-2-2-2-3-2-2-2-2-2-2-2-2-2-2-4\/","url_meta":{"origin":940,"position":4},"title":"#327 Creates nodes with coordinates from text file using HyperMesh Tcl","author":"gantovnik","date":"2022-12-14","format":false,"excerpt":"nodes.txt [code language=\"python\"] 3 10 3 1 6 0 2 7 4 8 10 9 0 2 2 6 6 10 1 5 7 5 3 3 0 8 9 1 0 6 [\/code] create_nodes.tcl [code language=\"python\"] set script_path [ file dirname [ file normalize [ info script ] ]\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\/2022\/12\/ex327.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1290,"url":"https:\/\/gantovnik.com\/bio-tips\/2021\/12\/133-create-vectors-and-planes-using-tcl-in-hypermesh-2-2\/","url_meta":{"origin":940,"position":5},"title":"#228 Example with *loadcreateonentity_curve","author":"gantovnik","date":"2021-12-15","format":false,"excerpt":"To apply a temperature of 140.0 to all the nodes of a set, using the curve with ID 9 to vary this magnitude over time: [code language=\"python\"] *createmark sets 1 \"temperaturenodes\" *loadcreateonentity_curve sets 1 5 1 140 0 0 0 0 0 0 0 0 0 9 1.0 [\/code]","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\/940","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=940"}],"version-history":[{"count":0,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts\/940\/revisions"}],"wp:attachment":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/media?parent=940"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/categories?post=940"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/tags?post=940"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}