From fa26e24c42287f8dae61f6ce435c154ecda7ca2e Mon Sep 17 00:00:00 2001 From: Subha Nayak <118820636+subhnayak@users.noreply.github.com> Date: Thu, 31 Jul 2025 10:50:30 +0530 Subject: [PATCH 1/5] sync control_data related client changes from ado --- src/ansys/meshing/prime/core/controldata.py | 70 +++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/src/ansys/meshing/prime/core/controldata.py b/src/ansys/meshing/prime/core/controldata.py index 5525b26fa4..e79effbd9c 100644 --- a/src/ansys/meshing/prime/core/controldata.py +++ b/src/ansys/meshing/prime/core/controldata.py @@ -35,6 +35,7 @@ from ansys.meshing.prime.core.periodiccontrol import PeriodicControl from ansys.meshing.prime.core.prismcontrol import PrismControl from ansys.meshing.prime.core.sizecontrol import SizeControl +from ansys.meshing.prime.core.featurerecoverycontrol import FeatureRecoveryControl as _FRControl from ansys.meshing.prime.core.volumecontrol import VolumeControl from ansys.meshing.prime.core.wrappercontrol import WrapperControl from ansys.meshing.prime.params.primestructs import SizingType @@ -64,6 +65,7 @@ def __init__(self, model: Model, id: int, object_id: int, name: str): self._wrapper_controls = [] self._mz_controls = [] self._size_controls = [] + self._feature_controls = [] self._prism_controls = [] self._thin_volume_controls = [] self._volume_controls = [] @@ -144,6 +146,29 @@ def create_size_control(self, sizing_type: SizingType) -> SizeControl: self._size_controls.append(new_size_control) return new_size_control + def create_feature_recovery_control(self) -> _FRControl: + """ Creates Feature Recovery control for wrap. + + + Returns + ------- + _FRControl + Returns the feature recovery control. + + Notes + ----- + An empty feature recovery control is created on calling this API. + + Examples + -------- + >>> feature_recovery_control = model.control_data.create_feature_recovery_control() + + """ + res = _ControlData.create_feature_recovery_control(self) + new_feature_recovery_control = _FRControl(self._model, res[0], res[1], res[2]) + self._feature_controls.append(new_feature_recovery_control) + return new_feature_recovery_control + def create_prism_control(self) -> PrismControl: """Create a prism control. @@ -261,6 +286,29 @@ def get_size_control_by_name(self, name: str) -> SizeControl: return size_control return None + def get_feature_recovery_control_by_name(self, name: str) -> _FRControl: + """Get a feature recovery control by name. + + Parameters + ---------- + name : str + Name of the feature recovery control. + + Returns + ------- + _FRControl + Feature recovery control. + + Examples + -------- + >>> fr_control = model.control_data.get_feature_recovery_control_by_name("_FRControl-1") + + """ + for feature_recovery_control in self._feature_controls: + if feature_recovery_control.name == name: + return feature_recovery_control + return None + def get_prism_control_by_name(self, name: str) -> PrismControl: """Get a prism control by name. @@ -356,6 +404,10 @@ def delete_controls(self, control_ids: Iterable[int]) -> DeleteResults: if size_control.id == id: self._size_controls.remove(size_control) break + for feature_recovery_control in self._feature_controls: + if feature_recovery_control.id == id: + self._feature_controls.remove(feature_recovery_control) + break for wrapper_control in self._wrapper_controls: if wrapper_control.id == id: self._wrapper_controls.remove(wrapper_control) @@ -389,6 +441,9 @@ def delete_controls(self, control_ids: Iterable[int]) -> DeleteResults: def _update_size_controls(self, c_data: List): self._size_controls = [SizeControl(self._model, c[0], c[1], c[2]) for c in c_data] + def _update_feature_recovery_controls(self, c_data: List): + self._feature_controls = [_FRControl(self._model, c[0], c[1], c[2]) for c in c_data] + def _update_prism_controls(self, c_data: List): self._prism_controls = [PrismControl(self._model, c[0], c[1], c[2]) for c in c_data] @@ -468,6 +523,21 @@ def size_controls(self) -> List[SizeControl]: """ return self._size_controls + @property + def feature_recovery_controls(self) -> List[_FRControl]: + """Get the feature recovery controls. + + Returns + ------- + List[SizeControl] + List of feature recovery controls. + + Examples + -------- + >>> feature_recovery_controls = model.control_data.feature_recovery_controls + """ + return self._feature_controls + @property def volume_controls(self) -> List[VolumeControl]: """Get the volume controls. From dd46e93a3aa267a3a1751a79ec18c50755eea66b Mon Sep 17 00:00:00 2001 From: Subha Nayak <118820636+subhnayak@users.noreply.github.com> Date: Thu, 31 Jul 2025 10:51:46 +0530 Subject: [PATCH 2/5] updates the pyproj.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index bf55f04334..ac3176a3e4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi" [project] name = "ansys-meshing-prime" -version = "0.10.0.dev2" +version = "0.10.0.dev3" description = "PyPrimeMesh is a Python client to Ansys Prime Server, which delivers core Ansys meshing technology." readme = "README.md" requires-python = ">=3.10,<4" From 525de46e3e4b4fcac525378085009cd318abc1bf Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Thu, 31 Jul 2025 05:23:49 +0000 Subject: [PATCH 3/5] chore: adding changelog file 1117.miscellaneous.md [dependabot-skip] --- doc/changelog.d/1117.miscellaneous.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/changelog.d/1117.miscellaneous.md diff --git a/doc/changelog.d/1117.miscellaneous.md b/doc/changelog.d/1117.miscellaneous.md new file mode 100644 index 0000000000..0c6492b05f --- /dev/null +++ b/doc/changelog.d/1117.miscellaneous.md @@ -0,0 +1 @@ +Sync control data related changes from github \ No newline at end of file From 80a504f4a22eb267f1893badc8d34229d42b7f5f Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Mon, 4 Aug 2025 06:11:37 +0000 Subject: [PATCH 4/5] chore: adding changelog file 1117.miscellaneous.md [dependabot-skip] --- doc/changelog.d/1117.miscellaneous.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog.d/1117.miscellaneous.md b/doc/changelog.d/1117.miscellaneous.md index 0c6492b05f..98618148f4 100644 --- a/doc/changelog.d/1117.miscellaneous.md +++ b/doc/changelog.d/1117.miscellaneous.md @@ -1 +1 @@ -Sync control data related changes from github \ No newline at end of file +Sync control data related changes from ado \ No newline at end of file From bb99bb2d89a1dd6013014d9fb63d4733b07e040c Mon Sep 17 00:00:00 2001 From: Subha Nayak <118820636+subhnayak@users.noreply.github.com> Date: Wed, 6 Aug 2025 10:53:09 +0530 Subject: [PATCH 5/5] after precommit --- src/ansys/meshing/prime/core/controldata.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ansys/meshing/prime/core/controldata.py b/src/ansys/meshing/prime/core/controldata.py index e79effbd9c..50c79f9470 100644 --- a/src/ansys/meshing/prime/core/controldata.py +++ b/src/ansys/meshing/prime/core/controldata.py @@ -32,10 +32,12 @@ from ansys.meshing.prime.autogen.primeconfig import ErrorCode from ansys.meshing.prime.autogen.shellblcontrol import ShellBLControl from ansys.meshing.prime.autogen.thinvolumecontrol import ThinVolumeControl +from ansys.meshing.prime.core.featurerecoverycontrol import ( + FeatureRecoveryControl as _FRControl, +) from ansys.meshing.prime.core.periodiccontrol import PeriodicControl from ansys.meshing.prime.core.prismcontrol import PrismControl from ansys.meshing.prime.core.sizecontrol import SizeControl -from ansys.meshing.prime.core.featurerecoverycontrol import FeatureRecoveryControl as _FRControl from ansys.meshing.prime.core.volumecontrol import VolumeControl from ansys.meshing.prime.core.wrappercontrol import WrapperControl from ansys.meshing.prime.params.primestructs import SizingType @@ -147,8 +149,7 @@ def create_size_control(self, sizing_type: SizingType) -> SizeControl: return new_size_control def create_feature_recovery_control(self) -> _FRControl: - """ Creates Feature Recovery control for wrap. - + """Create Feature Recovery control for wrap. Returns -------