


{"id":249432,"date":"2023-02-10T17:24:55","date_gmt":"2023-02-10T17:24:55","guid":{"rendered":"\/forum\/forums\/topic\/remove-region-based-on-python-script\/"},"modified":"2023-02-10T17:24:55","modified_gmt":"2023-02-10T17:24:55","slug":"remove-region-based-on-python-script","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/remove-region-based-on-python-script\/","title":{"rendered":"Remove Region Based on python script"},"content":{"rendered":"<p>Suppose I have a model like this<\/p>\n<p><img decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2023\/02\/10-02-2023-1676049443-mceclip0.png\"><\/p>\n<p>Whose edge IDs are 5,6,7<\/p>\n<p>suppose i want to remove the region inside edge 6 and edge 7.<\/p>\n<p>If i use the GUI i would go to Design-&gt;Split Body and select edge 6 and click on the region marked as &#8216;X&#8217; in the above figure.<\/p>\n<p>Suppose i want to do that with python script how can i do this?<\/p>\n<p>&nbsp;<\/p>\n<p>Note:<\/p>\n<p>I tried to generate the code inside space claim and i got this<\/p>\n<p>selection = BodySelection.Create(GetRootPart().Bodies[1])<br \/>result = Combine.RemoveRegions(selection)<\/p>\n<p>based on the code what i understand is it selected body 1 and deleted the selection.<\/p>\n<p>suppose i want to just run the code and delete the region of circle 7 i don&#8217;t think this will work because i don&#8217;t know the following information<\/p>\n<p>which edge to pick and which region of the edge do i pick to delete. So i don&#8217;t know how to achieve this programmatically using the API. Please let me know how to achieve this?<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"template":"","class_list":["post-249432","topic","type-topic","status-closed","hentry"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["125602","170445"],"_bbp_author_ip":["23.48.209.37"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["857"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["249432"],"_bbp_forum_id":["27789"],"_bbp_engagement":["125602","170445"],"_bbp_voice_count":["2"],"_bbp_reply_count":["3"],"_bbp_last_reply_id":["250066"],"_bbp_last_active_id":["250066"],"_bbp_last_active_time":["2023-02-15 17:19:26"]},"test":"satrincsu-edu"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/249432","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/249432\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=249432"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}