


{"id":343815,"date":"2024-01-09T14:46:13","date_gmt":"2024-01-09T14:46:13","guid":{"rendered":"\/forum\/forums\/topic\/pyansys-geometry\/"},"modified":"2024-01-09T14:46:13","modified_gmt":"2024-01-09T14:46:13","slug":"pyansys-geometry","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/pyansys-geometry\/","title":{"rendered":"PyANSYS Geometry"},"content":{"rendered":"<p>Hi Trying to use the Geometry module but it say sits not compatable.<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>Code&nbsp;<\/p>\n<div>\n<div>from skimage import io, exposure, filters, measure, morphology<\/div>\n<div>from skimage.measure import marching_cubes<\/div>\n<div>import matplotlib.pyplot as plt<\/div>\n<div>import numpy as np<\/div>\n<div>#import pyansys<\/div>\n<p><\/p>\n<div>import pyvista as pv<\/div>\n<p><\/p>\n<div>from ansys.mapdl.core import launch_mapdl<\/div>\n<p><\/p>\n<div>from ansys.geometry.core import launch_modeler_with_spaceclaim<\/div>\n<p><\/p>\n<div># File path to the image stack<\/div>\n<div>file_path = &#8216;myfilepath&#8217;<\/div>\n<p><\/p>\n<div># Load the images stack<\/div>\n<div>images = io.imread(file_path)<\/div>\n<p><\/p>\n<div># Preprocess and segment&nbsp;<\/div>\n<div>images_eq = [exposure.equalize_hist(img) for img in images]<\/div>\n<div>thresholded_images = [img &gt; filters.threshold_otsu(img) for img in images_eq]<\/div>\n<div>cleaned_images = [morphology.remove_small_objects(img, min_size=50) for img in thresholded_images]<\/div>\n<p><\/p>\n<div>modoler_discovery= launch_modeler_with_spaceclaim()<\/div>\n<div>&nbsp;<\/div>\n<div>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/div>\n<div>Error<\/div>\n<div>&nbsp;<\/div>\n<div>CRITICAL &#8211; &nbsp;&#8211; &nbsp;logger &#8211; handle_exception &#8211; Uncaught exception<br \/>Traceback (most recent call last):<br \/>&nbsp; File &#8220;File_being_ran&#8221;, line 24, in &lt;module&gt;<br \/>&nbsp; &nbsp; modoler_discovery= launch_modeler_with_spaceclaim()<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<br \/>&nbsp; File &#8220;C:\\Users\\Users\\miniconda3\\Lib\\site-packages\\ansys\\geometry\\core\\connection\\launcher.py&#8221;, line 566, in launch_modeler_with_spaceclaim &nbsp;&nbsp;<br \/>&nbsp; &nbsp; return prepare_and_start_backend(<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;^^^^^^^^^^^^^^^^^^^^^^^^^^<br \/>&nbsp; File &#8220;C:\\Users\\Users\\miniconda3\\Lib\\site-packages\\ansys\\geometry\\core\\connection\\product_instance.py&#8221;, line 236, in prepare_and_start_backend<br \/>&nbsp; &nbsp; _check_minimal_versions(product_version)<br \/>&nbsp; File &#8220;C:\\Users\\Users\\miniconda3\\Lib\\site-packages\\ansys\\geometry\\core\\connection\\product_instance.py&#8221;, line 373, in _check_minimal_versions &nbsp;<br \/>&nbsp; &nbsp; raise SystemError(msg)<br \/>SystemError: PyAnsys Geometry is compatible with Ansys Products from version 23.2.1. Please install Ansys products 23.2.1 or later.<\/div>\n<div>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/div>\n<div>I have the latest version of ansys<\/div>\n<\/div>\n","protected":false},"template":"","class_list":["post-343815","topic","type-topic","status-closed","hentry","topic-tag-geometry","topic-tag-pyansys-1","topic-tag-spaceclaim","topic-tag-student"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["56518","18229"],"_bbp_author_ip":["96.7.218.215"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["1053"],"_bbp_topic_status":["unanswered"],"_edit_lock":["1704812245:283729"],"_bbp_topic_id":["343815"],"_bbp_forum_id":["27784"],"_bbp_engagement":["18229","56518"],"_bbp_voice_count":["2"],"_bbp_reply_count":["2"],"_bbp_last_reply_id":["344211"],"_bbp_last_active_id":["344211"],"_bbp_last_active_time":["2024-01-11 10:12:02"]},"test":"hamilton-z2ulster-ac-uk"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/343815","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\/343815\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=343815"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}