{"id":1353,"date":"2022-01-05T19:44:19","date_gmt":"2022-01-06T03:44:19","guid":{"rendered":"https:\/\/gantovnik.com\/bio-tips\/?p=1353"},"modified":"2022-01-05T19:44:19","modified_gmt":"2022-01-06T03:44:19","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-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-2-2-2-2\/","title":{"rendered":"#256 Create a list of elements in tcl"},"content":{"rendered":"<p>Example:<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nset t &quot;0.1 0.2 0.3&quot;\r\nset i 0;\r\nforeach j $t {\r\n\tputs &quot;$j is element number $i of list t&quot;\r\n\tincr i;\r\n}\r\n<\/pre>\n<p>Result:<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\n0.1 is element number 0 of list t\r\n0.2 is element number 1 of list t\r\n0.3 is element number 2 of list t\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Example: set t &quot;0.1 0.2 0.3&quot; set i 0; foreach j $t { puts &quot;$j is element number $i of list t&quot; incr i; } Result: 0.1 is element number 0 of list t 0.2 is element number 1 of list t 0.3 is element number 2 of list t<\/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-1353","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-lP","jetpack_likes_enabled":true,"jetpack-related-posts":[{"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":1353,"position":0},"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":1311,"url":"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\/","url_meta":{"origin":1353,"position":1},"title":"#237 Create a dictionary in tcl","author":"gantovnik","date":"2022-01-04","format":false,"excerpt":"A dictionary is an arrangement for mapping values to keys. The syntax for the conventional dictionary is [code language=\"python\"] dict set dictname key value # or dict create dictname key1 value1 key2 value2 .. keyn valuen [\/code] Example: [code language=\"python\"] dict set thicknesses t1 0.1 puts $thicknesses dict set thicknesses\u2026","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":787,"url":"https:\/\/gantovnik.com\/bio-tips\/2020\/11\/137-get-thickness-of-the-specified-component-element-or-property-in-tcl\/","url_meta":{"origin":1353,"position":2},"title":"#137 Get thickness of the specified component, element, or property in tcl","author":"gantovnik","date":"2020-11-16","format":false,"excerpt":"#137 Get thickness of the specified component, element, or property in tcl Get the thickness value of component 11 which has a PSHELL property with thickness of 0.25: [code language=\"python\"] hm_getthickness comps 11 0.25 hm_getthickness comps 11 1 0.25 hm_getthickness comps 11 2 2 is not a valid ply ID.\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":1315,"url":"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\/","url_meta":{"origin":1353,"position":3},"title":"#239 Dictionary iteration in tcl","author":"gantovnik","date":"2022-01-04","format":false,"excerpt":"A dictionary iteration for printing keys and values of the dictionary is [code language=\"python\"] set thicknesses [dict create t1 0.1 t2 0.2 t3 0.25] foreach item [dict keys $thicknesses] { set value [dict get $thicknesses $item] puts $value } [\/code] Result: [code language=\"python\"] 0.1 0.2 0.25 [\/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":1323,"url":"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\/","url_meta":{"origin":1353,"position":4},"title":"#242 Get all values in dictionary in tcl","author":"gantovnik","date":"2022-01-04","format":false,"excerpt":"The syntax for retrieving all values in dict is [code language=\"python\"] [dict values $dictname] [\/code] Example: [code language=\"python\"] set thicknesses [dict create t1 0.1 t2 0.2 t3 0.25] set values [dict values $thicknesses] puts $values [\/code] Result: [code language=\"python\"] 0.1 0.2 0.25 [\/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":760,"url":"https:\/\/gantovnik.com\/bio-tips\/2020\/10\/127-create-rbe3-element-using-hypermesh-tcl\/","url_meta":{"origin":1353,"position":5},"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":[]}],"_links":{"self":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts\/1353","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=1353"}],"version-history":[{"count":0,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts\/1353\/revisions"}],"wp:attachment":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/media?parent=1353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/categories?post=1353"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/tags?post=1353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}