{"id":1343,"date":"2022-01-05T02:10:22","date_gmt":"2022-01-05T10:10:22","guid":{"rendered":"https:\/\/gantovnik.com\/bio-tips\/?p=1343"},"modified":"2022-01-06T01:21:37","modified_gmt":"2022-01-06T09:21:37","slug":"133-create-vectors-and-planes-using-tcl-in-hypermesh-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2","status":"publish","type":"post","link":"https:\/\/gantovnik.com\/bio-tips\/2022\/01\/133-create-vectors-and-planes-using-tcl-in-hypermesh-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2-2\/","title":{"rendered":"#252 Joining two lists in tcl"},"content":{"rendered":"<p>Treating each argument as a list, concatenate all arguments and return the resulting list.<\/p>\n<p>The syntax is<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\n&#x5B;concat $list1 $list2]\r\n<\/pre>\n<p>Example:<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nset list1 {a b c}\r\nset list2 {1 2 3}\r\nputs &#x5B;concat $list1 $list2]\r\n<\/pre>\n<p>Result:<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\na b c 1 2 3\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Treating each argument as a list, concatenate all arguments and return the resulting list. The syntax is &#x5B;concat $list1 $list2] Example: set list1 {a b c} set list2 {1 2 3} puts &#x5B;concat $list1 $list2] Result: a b c 1 2 3<\/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":[27],"tags":[],"class_list":["post-1343","post","type-post","status-publish","format-standard","hentry","category-tcl"],"modified_by":"gantovnik","jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8bH0k-lF","jetpack_likes_enabled":true,"jetpack-related-posts":[{"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":1343,"position":0},"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":1047,"url":"https:\/\/gantovnik.com\/bio-tips\/2021\/11\/187-feet-to-meter-converter-using-python-tcl-tk\/","url_meta":{"origin":1343,"position":1},"title":"#187 Feet to meter converter using python tcl\/tk","author":"gantovnik","date":"2021-11-07","format":false,"excerpt":"[code language=\"python\"] package require Tk wm title . \"Feet to Meters\" grid [ttk::frame .c -padding \"3 3 12 12\"] -column 0 -row 0 -sticky nwes grid columnconfigure . 0 -weight 1; grid rowconfigure . 0 -weight 1 grid [ttk::entry .c.feet -width 7 -textvariable feet] -column 2 -row 1 -sticky we\u2026","rel":"","context":"In &quot;tcl&quot;","block_context":{"text":"tcl","link":"https:\/\/gantovnik.com\/bio-tips\/category\/tcl\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2021\/11\/ex187.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":800,"url":"https:\/\/gantovnik.com\/bio-tips\/2020\/12\/141-deleting-the-last-element-from-a-list-in-a-variable-in-tcl\/","url_meta":{"origin":1343,"position":2},"title":"#141 Deleting the last element from a list in a variable in tcl","author":"gantovnik","date":"2020-12-22","format":false,"excerpt":"#141 Deleting the last element from a list in a variable in tcl [code language=\"python\"] set var {a b c d e} set var [lreplace $var end end] [\/code] . . . . . . . . . .","rel":"","context":"In &quot;tcl&quot;","block_context":{"text":"tcl","link":"https:\/\/gantovnik.com\/bio-tips\/category\/tcl\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":544,"url":"https:\/\/gantovnik.com\/bio-tips\/2020\/05\/how-to-write-a-code-to-know-certain-elements-belongs-to-which-components\/","url_meta":{"origin":1343,"position":3},"title":"How to write a code to know certain elements belongs to which components ?","author":"gantovnik","date":"2020-05-12","format":false,"excerpt":"How to write a code to know certain elements belongs to which components ? set comp_id [hm_getvalue elems id=$elem_id dataname=collector.id]","rel":"","context":"In &quot;python&quot;","block_context":{"text":"python","link":"https:\/\/gantovnik.com\/bio-tips\/category\/python\/"},"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":1343,"position":4},"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":785,"url":"https:\/\/gantovnik.com\/bio-tips\/2020\/11\/136-files-in-tcl\/","url_meta":{"origin":1343,"position":5},"title":"#136 Files in tcl","author":"gantovnik","date":"2020-11-12","format":false,"excerpt":"#136 Files in tcl It is possible to convert a filename to the Tcl format. Notice the curly braces around the filename so that the \\ character isn\u2019t interpreted as the escape character. [code language=\"python\"] set filename {C:\\My_files\\readme.txt}; C:\\My_files\\readme.txt file join [file nativename $filename]; C:\/My_files\/readme.txt [\/code] While not recommended, it\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\/1343","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=1343"}],"version-history":[{"count":0,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts\/1343\/revisions"}],"wp:attachment":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/media?parent=1343"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/categories?post=1343"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/tags?post=1343"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}