{"id":787,"date":"2020-11-16T19:46:56","date_gmt":"2020-11-17T03:46:56","guid":{"rendered":"http:\/\/gantovnik.com\/bio-tips\/?p=787"},"modified":"2020-11-16T19:46:56","modified_gmt":"2020-11-17T03:46:56","slug":"137-get-thickness-of-the-specified-component-element-or-property-in-tcl","status":"publish","type":"post","link":"https:\/\/gantovnik.com\/bio-tips\/2020\/11\/137-get-thickness-of-the-specified-component-element-or-property-in-tcl\/","title":{"rendered":"#137 Get thickness of the specified component, element, or property in tcl"},"content":{"rendered":"<p>#137 Get thickness of the specified component, element, or property in tcl<\/p>\n<p>Get the thickness value of component 11 which has a PSHELL property with thickness of 0.25:<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nhm_getthickness comps 11\r\n0.25\r\nhm_getthickness comps 11 1\r\n0.25\r\nhm_getthickness comps 11 2\r\n2 is not a valid ply ID.\r\n<\/pre>\n<p>Get the thickness value of component 15 which has a PCOMP property with 4 plys (thickness values of 0.1, 0.25, 0.25, 0.1, total of 0.7):<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nhm_getthickness comps 15\r\n0.7\r\nhm_getthickness comps 15 1\r\n0.1\r\nhm_getthickness comps 15 2\r\n0.25\r\nhm_getthickness comps 15 3\r\n0.25\r\nhm_getthickness comps 15 4\r\n0.1\r\nhm_getthickness comps 15 5\r\n5 is not a valid ply ID.\r\n<\/pre>\n<p>Get the thickness value of element 20<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nhm_getthickness elems 20\r\n0.25\r\n<\/pre>\n<p>Get the thickness value of element 20 which does not have a property assigned but belongs to a component that has a PSHELL property with thickness of 0.25:<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nhm_getthickness elems 20\r\n0.25\r\n<\/pre>\n<p>Get the thickness value of element 20 which does not have a property assigned and belongs to a component that does not have a property assigned:<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nhm_getthickness elems 20\r\n&quot;&quot;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>#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: 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. Get the thickness value of component 15 [&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-787","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-cH","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":527,"url":"https:\/\/gantovnik.com\/bio-tips\/2020\/05\/tcl-command-that-retrieves-the-x-component-of-a-force-of-id-12-defined-in-the-global-system\/","url_meta":{"origin":787,"position":0},"title":"Tcl commands","author":"gantovnik","date":"2020-05-06","format":false,"excerpt":"Tcl command that retrieves the x component of a force of ID 12 defined in the global system: [code language=\"python\"] set force_x [hm_getvalue loads id=12 dataname=comp1] [\/code] To retrieve the node that load 12 is applied to: [code language=\"python\"] set node_id [hm_getvalue loads id=12 dataname=node.id] [\/code] To retrieve the y\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":789,"url":"https:\/\/gantovnik.com\/bio-tips\/2020\/11\/138-get-the-name-of-a-collector-in-tcl\/","url_meta":{"origin":787,"position":1},"title":"#138 Get the name of a collector in tcl","author":"gantovnik","date":"2020-11-16","format":false,"excerpt":"#138 Get the name of a collector in tcl To get the name of the component with ID 100: [code language=\"python\"] hm_getcollectorname comps 100 [\/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":[]},{"id":763,"url":"https:\/\/gantovnik.com\/bio-tips\/2020\/11\/128-moment-of-inertia-values-for-the-selected-entities-using-tcl-in-hypermesh\/","url_meta":{"origin":787,"position":2},"title":"#128 Moment-of-inertia values for the selected entities using tcl in HyperMesh","author":"gantovnik","date":"2020-11-02","format":false,"excerpt":"#128 Moment-of-inertia values for the selected entities using tcl in HyperMesh To get the MOI for components 1-5: [code language=\"python\"] *createmark comps 1 1-5 puts [hm_getmoi comps 1] [\/code] [code language=\"python\"] *createmark elems 1 displayed puts [hm_getmoi elems 1 2 $origin_node_id 2 $local_system_id 0 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":[]},{"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":787,"position":3},"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":1950,"url":"https:\/\/gantovnik.com\/bio-tips\/2023\/08\/388-hypermesh-tcl-script-to-calculate-total-area-of-all-components\/","url_meta":{"origin":787,"position":4},"title":"#388 HyperMesh tcl script to calculate total area of all components","author":"gantovnik","date":"2023-08-15","format":false,"excerpt":"[code language=\"python\"] *createmark comps 1 \"all\" set comp_id_list [hm_getmark comps 1] set total_surf_area 0 foreach comp_id $comp_id_list { *createmark surfs 1 \"by comp id\" $comp_id set surf_id_list [hm_getmark surfs 1] foreach surf_id $surf_id_list { set surf_area [hm_getareaofsurface surfs $surf_id] puts \"The area of surface ${surf_id} is ${surf_area}\" set total_surf_area [expr\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":557,"url":"https:\/\/gantovnik.com\/bio-tips\/2020\/06\/getmarkedentity-2017\/","url_meta":{"origin":787,"position":5},"title":"#80 GetMarkedEntity (2017)","author":"gantovnik","date":"2020-06-11","format":false,"excerpt":"::hwat::utils::GetMarkedEntity \"components\" 1 \"by sets\" set1 Return a list containing the IDs of the entities, 0 if no entity is found and {} if unsuccessful. If any one of the arguments is list in Tcl, like [list 1 2 3] or {1 2 3}, use eval before GetMarkedEntity command. For\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\/787","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=787"}],"version-history":[{"count":0,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts\/787\/revisions"}],"wp:attachment":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/media?parent=787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/categories?post=787"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/tags?post=787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}