


{"id":387870,"date":"2024-10-02T18:58:16","date_gmt":"2024-10-02T18:58:16","guid":{"rendered":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/getting-mesh-faces-with-specified-normal-via-spaceclaim-scripting-v241\/"},"modified":"2024-10-02T18:59:05","modified_gmt":"2024-10-02T18:59:05","slug":"getting-mesh-faces-with-specified-normal-via-spaceclaim-scripting-v241","status":"publish","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/getting-mesh-faces-with-specified-normal-via-spaceclaim-scripting-v241\/","title":{"rendered":"Getting Mesh Faces With Specified Normal Via SpaceClaim Scripting (V241)"},"content":{"rendered":"<p>&lt;p&gt;&lt;p&gt;Hi All,&lt;\/p&gt;&lt;p&gt;I&#8217;m struggling with performing what I think should be a relatively simple task. I have an .STL geometry that I import into SpaceClaim as facets, and I want to keep it that way for eventual import into Fluent Mesher as an .scdoc. It is imported already clipped at both ends, so I know the location of the inlet and outlet. I&#8217;ve attached a picture of the geometry.&lt;\/span&gt;&lt;\/p&gt;&lt;p&gt;<img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/forum\/wp-content\/uploads\/sites\/2\/2024\/10\/02-10-2024-1727895286-Screenshot 2024-10-02 145434.png\" alt=\"\" \/>&lt;\/p&gt;&lt;p&gt;What I want to do is to get all the faces on the inlet and outlet (shown highlighted in orange here) and put them in a named selection. Ideally, I would select all faces with the correct normal vector, but any method that will allow me to automate named selections for the inlet and outlet will work.&lt;\/p&gt;&lt;p&gt;&nbsp;The reason I need to automate this is because I want to process a whole load of similar geometries, all of which have known normals for the inlet and outlet facets. However, since I have to call GetRootPart.Meshes[0] instead of GetRootPart.Bodies[0], lots of the methods in the documentation don&#8217;t seem to work. Is there any way to do this in SpaceClaim scripting?&lt;\/p&gt;&lt;p&gt;&nbsp;&lt;\/p&gt;&lt;p&gt;Thanks for any help you can provide&lt;\/p&gt;&lt;\/p&gt;<\/p>\n","protected":false},"template":"","class_list":["post-387870","topic","type-topic","status-publish","hentry","topic-tag-ansys-spaceclaim","topic-tag-python-scripting","topic-tag-spaceclaim","topic-tag-spaceclaimpythonscripting-1"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_author_ip":["199.98.31.147"],"_btv_view_count":["903"],"_bbp_topic_status":["unanswered"],"_edit_last":["439373"],"_bbp_revision_log":["a:1:{i:387871;a:2:{s:6:\"author\";i:439373;s:6:\"reason\";s:0:\"\";}}"],"_edit_lock":["1727895759:439373"],"_bbp_subscription":["2328","439373"],"_bbp_topic_id":["387870"],"_bbp_forum_id":["27789"],"_bbp_engagement":["2328","439373"],"_bbp_voice_count":["2"],"_bbp_reply_count":["2"],"_bbp_last_reply_id":["390068"],"_bbp_last_active_id":["390068"],"_bbp_last_active_time":["2024-10-16 15:19:06"]},"test":"jacob-lurveycooper-edu"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/387870","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":1,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/387870\/revisions"}],"predecessor-version":[{"id":387871,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/387870\/revisions\/387871"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=387870"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}