diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index d6c52fca7c..3aba97f106 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -15,7 +15,7 @@ on: env: DOCKER_IMAGE_NAME: ghcr.io/ansys/prime - DOCKER_IMAGE_TAG: '25.1.0.dev14' + DOCKER_IMAGE_TAG: '25.1.0.dev19' MAIN_PYTHON_VERSION: '3.10' PACKAGE_NAME: 'ansys-meshing-prime' PACKAGE_NAMESPACE: 'ansys.meshing.prime' diff --git a/doc/changelog.d/916.maintenance.md b/doc/changelog.d/916.maintenance.md new file mode 100644 index 0000000000..4ebee59f28 --- /dev/null +++ b/doc/changelog.d/916.maintenance.md @@ -0,0 +1 @@ +MAINT: update code form ADO 0.7.0.dev19 \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index be7afdbe00..da92e074e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi" [project] name = "ansys-meshing-prime" -version = "0.7.0.dev14" +version = "0.7.0.dev19" description = "PyPrimeMesh is a Python client to Ansys Prime Server, which delivers core Ansys meshing technology." readme = "README.md" requires-python = ">=3.10,<4" diff --git a/src/ansys/meshing/prime/__init__.py b/src/ansys/meshing/prime/__init__.py index ad5edc85c8..8dadb1ec1e 100644 --- a/src/ansys/meshing/prime/__init__.py +++ b/src/ansys/meshing/prime/__init__.py @@ -76,6 +76,8 @@ from ansys.meshing.prime.autogen.autoquadmesherstructs import * from ansys.meshing.prime.autogen.toposearchstructs import * from ansys.meshing.prime.autogen.vtcomposerstructs import * +from ansys.meshing.prime.autogen.shellblcontrolstructs import * +from ansys.meshing.prime.autogen.shellblcontrol import * from ansys.meshing.prime.internals.error_handling import PrimeRuntimeError, PrimeRuntimeWarning from ansys.meshing.prime.internals.client import Client diff --git a/src/ansys/meshing/prime/autogen/automesh.py b/src/ansys/meshing/prime/autogen/automesh.py index 7f11ebc280..72ca9bc822 100644 --- a/src/ansys/meshing/prime/autogen/automesh.py +++ b/src/ansys/meshing/prime/autogen/automesh.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/automeshstructs.py b/src/ansys/meshing/prime/autogen/automeshstructs.py index 2b43f2ebdc..dc2fa6b09a 100644 --- a/src/ansys/meshing/prime/autogen/automeshstructs.py +++ b/src/ansys/meshing/prime/autogen/automeshstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/autoquadmesher.py b/src/ansys/meshing/prime/autogen/autoquadmesher.py index fc56b804d1..0e56f07813 100644 --- a/src/ansys/meshing/prime/autogen/autoquadmesher.py +++ b/src/ansys/meshing/prime/autogen/autoquadmesher.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/autoquadmesherstructs.py b/src/ansys/meshing/prime/autogen/autoquadmesherstructs.py index a1e6173275..574c9b7fe9 100644 --- a/src/ansys/meshing/prime/autogen/autoquadmesherstructs.py +++ b/src/ansys/meshing/prime/autogen/autoquadmesherstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/boundaryfittednurbs.py b/src/ansys/meshing/prime/autogen/boundaryfittednurbs.py index 1a226d23b0..25ced9e3ed 100644 --- a/src/ansys/meshing/prime/autogen/boundaryfittednurbs.py +++ b/src/ansys/meshing/prime/autogen/boundaryfittednurbs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/collapsetool.py b/src/ansys/meshing/prime/autogen/collapsetool.py index 382bab9f80..6359a91aa2 100644 --- a/src/ansys/meshing/prime/autogen/collapsetool.py +++ b/src/ansys/meshing/prime/autogen/collapsetool.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/collapsetoolstructs.py b/src/ansys/meshing/prime/autogen/collapsetoolstructs.py index dd80e8db68..5cb3243a27 100644 --- a/src/ansys/meshing/prime/autogen/collapsetoolstructs.py +++ b/src/ansys/meshing/prime/autogen/collapsetoolstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable @@ -23,6 +45,10 @@ class CollapseParams(CoreObject): Option to preserve quality of neighboring triangles when performing collapse.Collapse may lead to quality deterioration beyond target skewness. Such collapse is prevented, when the option is enabled. target_skewness: float, optional Skewness limit used as target to preserve quality. Better quality elements are skipped for collapse. + keep_edge_connectivity: bool, optional + Option to keep edge connectivity. The default value is false. When keep edge connectivity is true, edges that were connected to collapsed triangles will be connected to different triangles. Otherwise, edges will be disconnected from faces. + + **This is a beta parameter**. **The behavior and name may change in the future**. json_data: dict, optional JSON dictionary to create a ``CollapseParams`` object with provided parameters. @@ -37,11 +63,13 @@ def __initialize( feature_type: SurfaceFeatureType, collapse_ratio: float, preserve_quality: bool, - target_skewness: float): + target_skewness: float, + keep_edge_connectivity: bool): self._feature_type = SurfaceFeatureType(feature_type) self._collapse_ratio = collapse_ratio self._preserve_quality = preserve_quality self._target_skewness = target_skewness + self._keep_edge_connectivity = keep_edge_connectivity def __init__( self, @@ -50,6 +78,7 @@ def __init__( collapse_ratio: float = None, preserve_quality: bool = None, target_skewness: float = None, + keep_edge_connectivity: bool = None, json_data : dict = None, **kwargs): """Initialize a ``CollapseParams`` object. @@ -66,6 +95,10 @@ def __init__( Option to preserve quality of neighboring triangles when performing collapse.Collapse may lead to quality deterioration beyond target skewness. Such collapse is prevented, when the option is enabled. target_skewness: float, optional Skewness limit used as target to preserve quality. Better quality elements are skipped for collapse. + keep_edge_connectivity: bool, optional + Option to keep edge connectivity. The default value is false. When keep edge connectivity is true, edges that were connected to collapsed triangles will be connected to different triangles. Otherwise, edges will be disconnected from faces. + + **This is a beta parameter**. **The behavior and name may change in the future**. json_data: dict, optional JSON dictionary to create a ``CollapseParams`` object with provided parameters. @@ -78,15 +111,17 @@ def __init__( SurfaceFeatureType(json_data["featureType"] if "featureType" in json_data else None), json_data["collapseRatio"] if "collapseRatio" in json_data else None, json_data["preserveQuality"] if "preserveQuality" in json_data else None, - json_data["targetSkewness"] if "targetSkewness" in json_data else None) + json_data["targetSkewness"] if "targetSkewness" in json_data else None, + json_data["keepEdgeConnectivity"] if "keepEdgeConnectivity" in json_data else None) else: - all_field_specified = all(arg is not None for arg in [feature_type, collapse_ratio, preserve_quality, target_skewness]) + all_field_specified = all(arg is not None for arg in [feature_type, collapse_ratio, preserve_quality, target_skewness, keep_edge_connectivity]) if all_field_specified: self.__initialize( feature_type, collapse_ratio, preserve_quality, - target_skewness) + target_skewness, + keep_edge_connectivity) else: if model is None: raise ValueError("Invalid assignment. Either pass a model or specify all properties.") @@ -97,7 +132,8 @@ def __init__( feature_type if feature_type is not None else ( CollapseParams._default_params["feature_type"] if "feature_type" in CollapseParams._default_params else SurfaceFeatureType(json_data["featureType"] if "featureType" in json_data else None)), collapse_ratio if collapse_ratio is not None else ( CollapseParams._default_params["collapse_ratio"] if "collapse_ratio" in CollapseParams._default_params else (json_data["collapseRatio"] if "collapseRatio" in json_data else None)), preserve_quality if preserve_quality is not None else ( CollapseParams._default_params["preserve_quality"] if "preserve_quality" in CollapseParams._default_params else (json_data["preserveQuality"] if "preserveQuality" in json_data else None)), - target_skewness if target_skewness is not None else ( CollapseParams._default_params["target_skewness"] if "target_skewness" in CollapseParams._default_params else (json_data["targetSkewness"] if "targetSkewness" in json_data else None))) + target_skewness if target_skewness is not None else ( CollapseParams._default_params["target_skewness"] if "target_skewness" in CollapseParams._default_params else (json_data["targetSkewness"] if "targetSkewness" in json_data else None)), + keep_edge_connectivity if keep_edge_connectivity is not None else ( CollapseParams._default_params["keep_edge_connectivity"] if "keep_edge_connectivity" in CollapseParams._default_params else (json_data["keepEdgeConnectivity"] if "keepEdgeConnectivity" in json_data else None))) self._custom_params = kwargs if model is not None: [ model._logger.warning(f'Unsupported argument : {key}') for key in kwargs ] @@ -110,7 +146,8 @@ def set_default( feature_type: SurfaceFeatureType = None, collapse_ratio: float = None, preserve_quality: bool = None, - target_skewness: float = None): + target_skewness: float = None, + keep_edge_connectivity: bool = None): """Set the default values of the ``CollapseParams`` object. Parameters @@ -123,6 +160,8 @@ def set_default( Option to preserve quality of neighboring triangles when performing collapse.Collapse may lead to quality deterioration beyond target skewness. Such collapse is prevented, when the option is enabled. target_skewness: float, optional Skewness limit used as target to preserve quality. Better quality elements are skipped for collapse. + keep_edge_connectivity: bool, optional + Option to keep edge connectivity. The default value is false. When keep edge connectivity is true, edges that were connected to collapsed triangles will be connected to different triangles. Otherwise, edges will be disconnected from faces. """ args = locals() [CollapseParams._default_params.update({ key: value }) for key, value in args.items() if value is not None] @@ -149,11 +188,13 @@ def _jsonify(self) -> Dict[str, Any]: json_data["preserveQuality"] = self._preserve_quality if self._target_skewness is not None: json_data["targetSkewness"] = self._target_skewness + if self._keep_edge_connectivity is not None: + json_data["keepEdgeConnectivity"] = self._keep_edge_connectivity [ json_data.update({ utils.to_camel_case(key) : value }) for key, value in self._custom_params.items()] return json_data def __str__(self) -> str: - message = "feature_type : %s\ncollapse_ratio : %s\npreserve_quality : %s\ntarget_skewness : %s" % (self._feature_type, self._collapse_ratio, self._preserve_quality, self._target_skewness) + message = "feature_type : %s\ncollapse_ratio : %s\npreserve_quality : %s\ntarget_skewness : %s\nkeep_edge_connectivity : %s" % (self._feature_type, self._collapse_ratio, self._preserve_quality, self._target_skewness, self._keep_edge_connectivity) message += ''.join('\n' + str(key) + ' : ' + str(value) for key, value in self._custom_params.items()) return message @@ -197,6 +238,18 @@ def target_skewness(self) -> float: def target_skewness(self, value: float): self._target_skewness = value + @property + def keep_edge_connectivity(self) -> bool: + """Option to keep edge connectivity. The default value is false. When keep edge connectivity is true, edges that were connected to collapsed triangles will be connected to different triangles. Otherwise, edges will be disconnected from faces. + + **This is a beta parameter**. **The behavior and name may change in the future**. + """ + return self._keep_edge_connectivity + + @keep_edge_connectivity.setter + def keep_edge_connectivity(self, value: bool): + self._keep_edge_connectivity = value + class CollapseResults(CoreObject): """Results associated with collapse face elements. diff --git a/src/ansys/meshing/prime/autogen/commonstructs.py b/src/ansys/meshing/prime/autogen/commonstructs.py index b5f75e81cc..cabed1ef26 100644 --- a/src/ansys/meshing/prime/autogen/commonstructs.py +++ b/src/ansys/meshing/prime/autogen/commonstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/commontypes.py b/src/ansys/meshing/prime/autogen/commontypes.py index 79868ec900..66343b63de 100644 --- a/src/ansys/meshing/prime/autogen/commontypes.py +++ b/src/ansys/meshing/prime/autogen/commontypes.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable @@ -76,3 +98,23 @@ class SurfaceFeatureType(enum.IntEnum): """Face edges at zonelet boundary are considered as feature.""" FEATUREORZONELETBOUNDARY = 5 """Face edges at zonelet boundary or with normal angle more than threshold are considered as feature.""" + +class ShellBLOffsetType(enum.IntEnum): + """Type of offset method during ShellBL generation. + """ + ASPECTRATIO = 0 + """Option to set ShellBL offset type as Aspect Ratio. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" + LASTRATIO = 1 + """Option to set ShellBL offset type as Last Ratio. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" + UNIFORM = 2 + """Option to set ShellBL offset type as Uniform. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" + CURVATUREBASED = 4 + """Option to set ShellBL offset type as CurvatureBased. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" diff --git a/src/ansys/meshing/prime/autogen/connect.py b/src/ansys/meshing/prime/autogen/connect.py index a6c65969be..3d6a970872 100644 --- a/src/ansys/meshing/prime/autogen/connect.py +++ b/src/ansys/meshing/prime/autogen/connect.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager @@ -130,7 +152,7 @@ def join_face_zonelets(self, part_id : int, face_zonelet_ids : Iterable[int], wi return ConnectResults(model = self._model, json_data = result) def subtract_volumes(self, part_id : int, target_volumes : Iterable[int], cutter_volumes : Iterable[int], params : SubtractVolumesParams) -> SubtractVolumesResults: - """ Subtract cutter volumes from target volumes. Volumes should be computed prior to calling this function. If multiple parts are being merged to form a single part, then volumes should be computed for each part prior to merging. Use compute_closed_volumes to do so. + """ Subtract cutter volumes from target volumes. Volumes should be computed prior to calling this function. If multiple parts are being merged to form a single part, then volumes should be computed for each part prior to merging. Use compute_closed_volumes to do so. Volumes involved in this operation should not have self intersections. You can use SearchZoneletsBySelfIntersections to check self intersections in the volume. Parameters diff --git a/src/ansys/meshing/prime/autogen/connectstructs.py b/src/ansys/meshing/prime/autogen/connectstructs.py index b62595fa5e..0b82eb031d 100644 --- a/src/ansys/meshing/prime/autogen/connectstructs.py +++ b/src/ansys/meshing/prime/autogen/connectstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable @@ -924,7 +946,7 @@ class SubtractVolumesParams(CoreObject): ignore_face_zonelets: Iterable[int], optional Face zonelet ids that subtract volumes should not remove (for example, periodic or fluid cap zonelets). If ignore face zonelets are provided, then the target volumes after subtract operation need to be recomputed. check_cutters: bool, optional - Option to manage intersecting cutter volumes. When keep_cutters is False an error message is provided if multiple cutters intersect. Overlapping cutter volumes are not supported. + Option to manage intersecting cutter volumes. When check cutters is False an error message is provided if multiple cutters intersect. Overlapping cutter volumes are not supported. keep_cutters: bool, optional Option to retain cutter volumes. @@ -964,7 +986,7 @@ def __init__( ignore_face_zonelets: Iterable[int], optional Face zonelet ids that subtract volumes should not remove (for example, periodic or fluid cap zonelets). If ignore face zonelets are provided, then the target volumes after subtract operation need to be recomputed. check_cutters: bool, optional - Option to manage intersecting cutter volumes. When keep_cutters is False an error message is provided if multiple cutters intersect. Overlapping cutter volumes are not supported. + Option to manage intersecting cutter volumes. When check cutters is False an error message is provided if multiple cutters intersect. Overlapping cutter volumes are not supported. keep_cutters: bool, optional Option to retain cutter volumes. @@ -1017,7 +1039,7 @@ def set_default( ignore_face_zonelets: Iterable[int], optional Face zonelet ids that subtract volumes should not remove (for example, periodic or fluid cap zonelets). If ignore face zonelets are provided, then the target volumes after subtract operation need to be recomputed. check_cutters: bool, optional - Option to manage intersecting cutter volumes. When keep_cutters is False an error message is provided if multiple cutters intersect. Overlapping cutter volumes are not supported. + Option to manage intersecting cutter volumes. When check cutters is False an error message is provided if multiple cutters intersect. Overlapping cutter volumes are not supported. keep_cutters: bool, optional Option to retain cutter volumes. """ @@ -1064,7 +1086,7 @@ def ignore_face_zonelets(self, value: Iterable[int]): @property def check_cutters(self) -> bool: - """Option to manage intersecting cutter volumes. When keep_cutters is False an error message is provided if multiple cutters intersect. Overlapping cutter volumes are not supported. + """Option to manage intersecting cutter volumes. When check cutters is False an error message is provided if multiple cutters intersect. Overlapping cutter volumes are not supported. """ return self._check_cutters diff --git a/src/ansys/meshing/prime/autogen/controldata.py b/src/ansys/meshing/prime/autogen/controldata.py index 8daa826e17..c2c91f2fbe 100644 --- a/src/ansys/meshing/prime/autogen/controldata.py +++ b/src/ansys/meshing/prime/autogen/controldata.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager @@ -160,6 +182,33 @@ def create_prism_control(self) -> List[Any]: self._model._print_logs_after_command("create_prism_control") return result + def create_shell_bl_control(self) -> List[Any]: + """ Creates the ShellBLControl. + + + Returns + ------- + ShellBLControl + Returns the ShellBLControl. + + + Notes + ----- + **This is a beta API**. **The behavior and implementation may change in future**. + + Examples + -------- + >>> shell_bl_control = model.control_data.create_shell_bl_control() + + """ + args = {} + command_name = "PrimeMesh::ControlData/CreateShellBLControl" + self._model._print_beta_api_warning("create_shell_bl_control") + self._model._print_logs_before_command("create_shell_bl_control", args) + result = self._comm.serve(self._model, command_name, self._object_id, args=args) + self._model._print_logs_after_command("create_shell_bl_control") + return result + def create_thin_volume_control(self) -> List[Any]: """ Creates the ThinVolumeControl. diff --git a/src/ansys/meshing/prime/autogen/controlstructs.py b/src/ansys/meshing/prime/autogen/controlstructs.py index 1846472c6d..5163f47043 100644 --- a/src/ansys/meshing/prime/autogen/controlstructs.py +++ b/src/ansys/meshing/prime/autogen/controlstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/coreobject.py b/src/ansys/meshing/prime/autogen/coreobject.py index 508aea6271..8e3a19fb09 100644 --- a/src/ansys/meshing/prime/autogen/coreobject.py +++ b/src/ansys/meshing/prime/autogen/coreobject.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/deletetool.py b/src/ansys/meshing/prime/autogen/deletetool.py index 2e63aca260..179981a241 100644 --- a/src/ansys/meshing/prime/autogen/deletetool.py +++ b/src/ansys/meshing/prime/autogen/deletetool.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/deletetoolstructs.py b/src/ansys/meshing/prime/autogen/deletetoolstructs.py index 47a80d6ab5..4af5ee9f0d 100644 --- a/src/ansys/meshing/prime/autogen/deletetoolstructs.py +++ b/src/ansys/meshing/prime/autogen/deletetoolstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/featureextraction.py b/src/ansys/meshing/prime/autogen/featureextraction.py index 546ad3775c..c367a74475 100644 --- a/src/ansys/meshing/prime/autogen/featureextraction.py +++ b/src/ansys/meshing/prime/autogen/featureextraction.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/featureextractionstructs.py b/src/ansys/meshing/prime/autogen/featureextractionstructs.py index 6f6818f307..f71d2f97d0 100644 --- a/src/ansys/meshing/prime/autogen/featureextractionstructs.py +++ b/src/ansys/meshing/prime/autogen/featureextractionstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/fileio.py b/src/ansys/meshing/prime/autogen/fileio.py index 9b2a3ba8cb..d8638aa7e0 100644 --- a/src/ansys/meshing/prime/autogen/fileio.py +++ b/src/ansys/meshing/prime/autogen/fileio.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/fileiostructs.py b/src/ansys/meshing/prime/autogen/fileiostructs.py index 96ad457e0b..8bf64f2e40 100644 --- a/src/ansys/meshing/prime/autogen/fileiostructs.py +++ b/src/ansys/meshing/prime/autogen/fileiostructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable @@ -3052,6 +3074,10 @@ class ExportMapdlCdbParams(CoreObject): export_fasteners_as_swgen: bool, optional Option to export fasteners as swgen. When true, translates fasteners into compact swgen blocks in the exported file. The default value is false. + **This is a beta parameter**. **The behavior and name may change in the future**. + export_rigid_bodies_as_rbgen: bool, optional + Option to export rigid bodies as rbgen. When true, translates rigid bodies into compact rbgen blocks in the exported file. The default value is false. + **This is a beta parameter**. **The behavior and name may change in the future**. write_thickness_file: bool, optional Option to write a thickness file for spotweld fatigue analysis. If true, writes a file named [exportedFilename].cdb.thick.txt containing thickness information. @@ -3086,6 +3112,7 @@ def __initialize( analysis_settings_file_name: str, use_compact_format: bool, export_fasteners_as_swgen: bool, + export_rigid_bodies_as_rbgen: bool, write_thickness_file: bool, contact_element_types: ContactElementTypeParams): self._config_settings = config_settings @@ -3102,6 +3129,7 @@ def __initialize( self._analysis_settings_file_name = analysis_settings_file_name self._use_compact_format = use_compact_format self._export_fasteners_as_swgen = export_fasteners_as_swgen + self._export_rigid_bodies_as_rbgen = export_rigid_bodies_as_rbgen self._write_thickness_file = write_thickness_file self._contact_element_types = contact_element_types @@ -3122,6 +3150,7 @@ def __init__( analysis_settings_file_name: str = None, use_compact_format: bool = None, export_fasteners_as_swgen: bool = None, + export_rigid_bodies_as_rbgen: bool = None, write_thickness_file: bool = None, contact_element_types: ContactElementTypeParams = None, json_data : dict = None, @@ -3187,6 +3216,10 @@ def __init__( export_fasteners_as_swgen: bool, optional Option to export fasteners as swgen. When true, translates fasteners into compact swgen blocks in the exported file. The default value is false. + **This is a beta parameter**. **The behavior and name may change in the future**. + export_rigid_bodies_as_rbgen: bool, optional + Option to export rigid bodies as rbgen. When true, translates rigid bodies into compact rbgen blocks in the exported file. The default value is false. + **This is a beta parameter**. **The behavior and name may change in the future**. write_thickness_file: bool, optional Option to write a thickness file for spotweld fatigue analysis. If true, writes a file named [exportedFilename].cdb.thick.txt containing thickness information. @@ -3219,10 +3252,11 @@ def __init__( json_data["analysisSettingsFileName"] if "analysisSettingsFileName" in json_data else None, json_data["useCompactFormat"] if "useCompactFormat" in json_data else None, json_data["exportFastenersAsSwgen"] if "exportFastenersAsSwgen" in json_data else None, + json_data["exportRigidBodiesAsRbgen"] if "exportRigidBodiesAsRbgen" in json_data else None, json_data["writeThicknessFile"] if "writeThicknessFile" in json_data else None, ContactElementTypeParams(model = model, json_data = json_data["contactElementTypes"] if "contactElementTypes" in json_data else None)) else: - all_field_specified = all(arg is not None for arg in [config_settings, pre_solution_settings, material_properties, boundary_conditions, analysis_settings, write_cells, enable_face_based_labels, write_by_zones, consider_general_connectors_as_spot_weld, analysis_type, simulation_type, analysis_settings_file_name, use_compact_format, export_fasteners_as_swgen, write_thickness_file, contact_element_types]) + all_field_specified = all(arg is not None for arg in [config_settings, pre_solution_settings, material_properties, boundary_conditions, analysis_settings, write_cells, enable_face_based_labels, write_by_zones, consider_general_connectors_as_spot_weld, analysis_type, simulation_type, analysis_settings_file_name, use_compact_format, export_fasteners_as_swgen, export_rigid_bodies_as_rbgen, write_thickness_file, contact_element_types]) if all_field_specified: self.__initialize( config_settings, @@ -3239,6 +3273,7 @@ def __init__( analysis_settings_file_name, use_compact_format, export_fasteners_as_swgen, + export_rigid_bodies_as_rbgen, write_thickness_file, contact_element_types) else: @@ -3262,6 +3297,7 @@ def __init__( analysis_settings_file_name if analysis_settings_file_name is not None else ( ExportMapdlCdbParams._default_params["analysis_settings_file_name"] if "analysis_settings_file_name" in ExportMapdlCdbParams._default_params else (json_data["analysisSettingsFileName"] if "analysisSettingsFileName" in json_data else None)), use_compact_format if use_compact_format is not None else ( ExportMapdlCdbParams._default_params["use_compact_format"] if "use_compact_format" in ExportMapdlCdbParams._default_params else (json_data["useCompactFormat"] if "useCompactFormat" in json_data else None)), export_fasteners_as_swgen if export_fasteners_as_swgen is not None else ( ExportMapdlCdbParams._default_params["export_fasteners_as_swgen"] if "export_fasteners_as_swgen" in ExportMapdlCdbParams._default_params else (json_data["exportFastenersAsSwgen"] if "exportFastenersAsSwgen" in json_data else None)), + export_rigid_bodies_as_rbgen if export_rigid_bodies_as_rbgen is not None else ( ExportMapdlCdbParams._default_params["export_rigid_bodies_as_rbgen"] if "export_rigid_bodies_as_rbgen" in ExportMapdlCdbParams._default_params else (json_data["exportRigidBodiesAsRbgen"] if "exportRigidBodiesAsRbgen" in json_data else None)), write_thickness_file if write_thickness_file is not None else ( ExportMapdlCdbParams._default_params["write_thickness_file"] if "write_thickness_file" in ExportMapdlCdbParams._default_params else (json_data["writeThicknessFile"] if "writeThicknessFile" in json_data else None)), contact_element_types if contact_element_types is not None else ( ExportMapdlCdbParams._default_params["contact_element_types"] if "contact_element_types" in ExportMapdlCdbParams._default_params else ContactElementTypeParams(model = model, json_data = (json_data["contactElementTypes"] if "contactElementTypes" in json_data else None)))) self._custom_params = kwargs @@ -3287,6 +3323,7 @@ def set_default( analysis_settings_file_name: str = None, use_compact_format: bool = None, export_fasteners_as_swgen: bool = None, + export_rigid_bodies_as_rbgen: bool = None, write_thickness_file: bool = None, contact_element_types: ContactElementTypeParams = None): """Set the default values of the ``ExportMapdlCdbParams`` object. @@ -3321,6 +3358,8 @@ def set_default( Option to enable compact format for the cdb blocks. When true, writes a new, more space-efficient cdb format while exporting. The default value is false. export_fasteners_as_swgen: bool, optional Option to export fasteners as swgen. When true, translates fasteners into compact swgen blocks in the exported file. The default value is false. + export_rigid_bodies_as_rbgen: bool, optional + Option to export rigid bodies as rbgen. When true, translates rigid bodies into compact rbgen blocks in the exported file. The default value is false. write_thickness_file: bool, optional Option to write a thickness file for spotweld fatigue analysis. If true, writes a file named [exportedFilename].cdb.thick.txt containing thickness information. contact_element_types: ContactElementTypeParams, optional @@ -3371,6 +3410,8 @@ def _jsonify(self) -> Dict[str, Any]: json_data["useCompactFormat"] = self._use_compact_format if self._export_fasteners_as_swgen is not None: json_data["exportFastenersAsSwgen"] = self._export_fasteners_as_swgen + if self._export_rigid_bodies_as_rbgen is not None: + json_data["exportRigidBodiesAsRbgen"] = self._export_rigid_bodies_as_rbgen if self._write_thickness_file is not None: json_data["writeThicknessFile"] = self._write_thickness_file if self._contact_element_types is not None: @@ -3379,7 +3420,7 @@ def _jsonify(self) -> Dict[str, Any]: return json_data def __str__(self) -> str: - message = "config_settings : %s\npre_solution_settings : %s\nmaterial_properties : %s\nboundary_conditions : %s\nanalysis_settings : %s\nwrite_cells : %s\nenable_face_based_labels : %s\nwrite_by_zones : %s\nconsider_general_connectors_as_spot_weld : %s\nanalysis_type : %s\nsimulation_type : %s\nanalysis_settings_file_name : %s\nuse_compact_format : %s\nexport_fasteners_as_swgen : %s\nwrite_thickness_file : %s\ncontact_element_types : %s" % (self._config_settings, self._pre_solution_settings, self._material_properties, self._boundary_conditions, self._analysis_settings, self._write_cells, self._enable_face_based_labels, self._write_by_zones, self._consider_general_connectors_as_spot_weld, self._analysis_type, self._simulation_type, self._analysis_settings_file_name, self._use_compact_format, self._export_fasteners_as_swgen, self._write_thickness_file, '{ ' + str(self._contact_element_types) + ' }') + message = "config_settings : %s\npre_solution_settings : %s\nmaterial_properties : %s\nboundary_conditions : %s\nanalysis_settings : %s\nwrite_cells : %s\nenable_face_based_labels : %s\nwrite_by_zones : %s\nconsider_general_connectors_as_spot_weld : %s\nanalysis_type : %s\nsimulation_type : %s\nanalysis_settings_file_name : %s\nuse_compact_format : %s\nexport_fasteners_as_swgen : %s\nexport_rigid_bodies_as_rbgen : %s\nwrite_thickness_file : %s\ncontact_element_types : %s" % (self._config_settings, self._pre_solution_settings, self._material_properties, self._boundary_conditions, self._analysis_settings, self._write_cells, self._enable_face_based_labels, self._write_by_zones, self._consider_general_connectors_as_spot_weld, self._analysis_type, self._simulation_type, self._analysis_settings_file_name, self._use_compact_format, self._export_fasteners_as_swgen, self._export_rigid_bodies_as_rbgen, self._write_thickness_file, '{ ' + str(self._contact_element_types) + ' }') message += ''.join('\n' + str(key) + ' : ' + str(value) for key, value in self._custom_params.items()) return message @@ -3551,6 +3592,18 @@ def export_fasteners_as_swgen(self) -> bool: def export_fasteners_as_swgen(self, value: bool): self._export_fasteners_as_swgen = value + @property + def export_rigid_bodies_as_rbgen(self) -> bool: + """Option to export rigid bodies as rbgen. When true, translates rigid bodies into compact rbgen blocks in the exported file. The default value is false. + + **This is a beta parameter**. **The behavior and name may change in the future**. + """ + return self._export_rigid_bodies_as_rbgen + + @export_rigid_bodies_as_rbgen.setter + def export_rigid_bodies_as_rbgen(self, value: bool): + self._export_rigid_bodies_as_rbgen = value + @property def write_thickness_file(self) -> bool: """Option to write a thickness file for spotweld fatigue analysis. If true, writes a file named [exportedFilename].cdb.thick.txt containing thickness information. diff --git a/src/ansys/meshing/prime/autogen/igastructs.py b/src/ansys/meshing/prime/autogen/igastructs.py index 0c5e787cab..3fb23c2713 100644 --- a/src/ansys/meshing/prime/autogen/igastructs.py +++ b/src/ansys/meshing/prime/autogen/igastructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/materialpointmanager.py b/src/ansys/meshing/prime/autogen/materialpointmanager.py index 7a5c0a1ff6..0d1e602f1c 100644 --- a/src/ansys/meshing/prime/autogen/materialpointmanager.py +++ b/src/ansys/meshing/prime/autogen/materialpointmanager.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/materialpointmanagerstructs.py b/src/ansys/meshing/prime/autogen/materialpointmanagerstructs.py index e3df729c3f..727703dc7f 100644 --- a/src/ansys/meshing/prime/autogen/materialpointmanagerstructs.py +++ b/src/ansys/meshing/prime/autogen/materialpointmanagerstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/meshinfo.py b/src/ansys/meshing/prime/autogen/meshinfo.py index 3ab9c84255..9ba53f7601 100644 --- a/src/ansys/meshing/prime/autogen/meshinfo.py +++ b/src/ansys/meshing/prime/autogen/meshinfo.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/meshinfostructs.py b/src/ansys/meshing/prime/autogen/meshinfostructs.py index 86f1e984bd..b8c0340d52 100644 --- a/src/ansys/meshing/prime/autogen/meshinfostructs.py +++ b/src/ansys/meshing/prime/autogen/meshinfostructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/model.py b/src/ansys/meshing/prime/autogen/model.py index 8f8bbb7df3..4f3f3b42a6 100644 --- a/src/ansys/meshing/prime/autogen/model.py +++ b/src/ansys/meshing/prime/autogen/model.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager @@ -248,6 +270,73 @@ def delete_volumetric_size_fields(self, size_field_ids : Iterable[int]): self._comm.serve(self, command_name, self._object_id, args=args) self._print_logs_after_command("delete_volumetric_size_fields") + def set_suggested_size_field_name(self, size_field_id : int, name : str) -> SetNameResults: + """ Sets the suggested name of size field with the given id. + + + Parameters + ---------- + size_field_id : int + Size field id. + name : str + Name of the size field. + + Notes + ----- + **This is a beta API**. **The behavior and implementation may change in future**. + + Examples + -------- + >>> model = client.model + >>> model.set_suggested_size_field_name(size_field_id, name) + + """ + if not isinstance(size_field_id, int): + raise TypeError("Invalid argument type passed for 'size_field_id'. Valid argument type is int.") + if not isinstance(name, str): + raise TypeError("Invalid argument type passed for 'name'. Valid argument type is str.") + args = {"size_field_id" : size_field_id, + "name" : name} + command_name = "PrimeMesh::Model/SetSuggestedSizeFieldName" + self._print_beta_api_warning("set_suggested_size_field_name") + self._print_logs_before_command("set_suggested_size_field_name", args) + result = self._comm.serve(self, command_name, self._object_id, args=args) + self._print_logs_after_command("set_suggested_size_field_name", SetNameResults(model = self, json_data = result)) + return SetNameResults(model = self, json_data = result) + + def get_size_field_name(self, size_field_id : int) -> str: + """ Gets the name of size field with the given id. + + Parameters + ---------- + size_field_id : int + Size field id. + + Returns + ------- + str + Returns the name of the size field. + + Notes + ----- + **This is a beta API**. **The behavior and implementation may change in future**. + + Examples + -------- + >>> model = client.model + >>> model.get_size_field_name(size_field_id) + + """ + if not isinstance(size_field_id, int): + raise TypeError("Invalid argument type passed for 'size_field_id'. Valid argument type is int.") + args = {"size_field_id" : size_field_id} + command_name = "PrimeMesh::Model/GetSizeFieldName" + self._print_beta_api_warning("get_size_field_name") + self._print_logs_before_command("get_size_field_name", args) + result = self._comm.serve(self, command_name, self._object_id, args=args) + self._print_logs_after_command("get_size_field_name") + return result + def set_num_threads(self, num : int): """ Sets the number of threads for multithreaded operation. diff --git a/src/ansys/meshing/prime/autogen/modelstructs.py b/src/ansys/meshing/prime/autogen/modelstructs.py index 5a35b96801..986260a530 100644 --- a/src/ansys/meshing/prime/autogen/modelstructs.py +++ b/src/ansys/meshing/prime/autogen/modelstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/morpher.py b/src/ansys/meshing/prime/autogen/morpher.py index daa1f31360..1b8c5547cc 100644 --- a/src/ansys/meshing/prime/autogen/morpher.py +++ b/src/ansys/meshing/prime/autogen/morpher.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/morpherbcsstructs.py b/src/ansys/meshing/prime/autogen/morpherbcsstructs.py index d4851246d4..711097b060 100644 --- a/src/ansys/meshing/prime/autogen/morpherbcsstructs.py +++ b/src/ansys/meshing/prime/autogen/morpherbcsstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/morpherstructs.py b/src/ansys/meshing/prime/autogen/morpherstructs.py index 8d05310a69..aaf5df1d83 100644 --- a/src/ansys/meshing/prime/autogen/morpherstructs.py +++ b/src/ansys/meshing/prime/autogen/morpherstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/multizonecontrol.py b/src/ansys/meshing/prime/autogen/multizonecontrol.py index 408c3edac4..9a9c289971 100644 --- a/src/ansys/meshing/prime/autogen/multizonecontrol.py +++ b/src/ansys/meshing/prime/autogen/multizonecontrol.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/part.py b/src/ansys/meshing/prime/autogen/part.py index a2ad4cd47b..ba5ed017fe 100644 --- a/src/ansys/meshing/prime/autogen/part.py +++ b/src/ansys/meshing/prime/autogen/part.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/partstructs.py b/src/ansys/meshing/prime/autogen/partstructs.py index 04ff1a1c19..03f95ada56 100644 --- a/src/ansys/meshing/prime/autogen/partstructs.py +++ b/src/ansys/meshing/prime/autogen/partstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/periodiccontrol.py b/src/ansys/meshing/prime/autogen/periodiccontrol.py index 0b7f08aece..ca9fa1b9ac 100644 --- a/src/ansys/meshing/prime/autogen/periodiccontrol.py +++ b/src/ansys/meshing/prime/autogen/periodiccontrol.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/periodiccontrolstructs.py b/src/ansys/meshing/prime/autogen/periodiccontrolstructs.py index f8ec7a6310..4ae5b4dee9 100644 --- a/src/ansys/meshing/prime/autogen/periodiccontrolstructs.py +++ b/src/ansys/meshing/prime/autogen/periodiccontrolstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/primeconfig.py b/src/ansys/meshing/prime/autogen/primeconfig.py index 52090ce9d3..4439140213 100644 --- a/src/ansys/meshing/prime/autogen/primeconfig.py +++ b/src/ansys/meshing/prime/autogen/primeconfig.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable @@ -72,6 +94,46 @@ class ErrorCode(enum.IntEnum): """Invalid absolute distance tolerance for scaffold operation.""" SCAFFOLDERINVALIDCONSTANTMESHSIZE = 54 """Invalid constant mesh size input for scaffold operation.""" + SHELLBLFAILED = 60 + """ShellBL creation failed. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" + SHELLBLQUADS = 61 + """ShellBL quads. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" + SHELLBLNOMESH = 62 + """ShellBL is not supported for unmeshed topofaces. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" + SHELLBLFEWLAYERS = 63 + """Only few ShellBL layers are created. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" + SHELLBLWRONGTOPO = 64 + """Found topofaces with invalid topology. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" + OGRIDREFINEFAILED = 65 + """Post refinement of ShellBl quads failed. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" + SPLITTOTRIFAILED = 66 + """ShellBL quads split to triangles failed. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" + INVALIDSHELLBLCONTROLS = 67 + """Invalid ShellBL controls. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" + INVALIDSHELLBLCONTROLS_INCORRECTSCOPEENTITY = 68 + """Invalid scope entity. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" + PERIODICEDGESNOTSUPPORTEDFORSHELLBL = 69 + """Periodic surfaces selected for ShellBL generation are not supported. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" AUTOMESHFAILED = 100 """Auto meshing failed.""" AITOVERLAPALONGMULTIFOUND = 101 @@ -284,6 +346,14 @@ class ErrorCode(enum.IntEnum): """Export STL failed. List of part ids is empty.""" EXPORTSTLFAILEDWITHINCORRECTPARTID = 558 """Export STL failed. Part id is incorrect.""" + SHELLBLCONTROLFAILED = 566 + """Write ShellBL control failed. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" + READSHELLBLCONTROLFAILED = 567 + """Read thin ShellBL control failed. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" FUSEOPTIONINVALID = 850 """Invalid option chosen to connect two different parts.""" COLOCATEFUSEDNODESFAILED = 851 @@ -571,33 +641,65 @@ class ErrorCode(enum.IntEnum): WRAPPERPATCHFLOWREGIONS_INVALIDBASESIZE = 3448 """Base size specified for patching should be positive double. + **This is a beta parameter**. **The behavior and name may change in the future**.""" + WRAPPERPATCHFLOWREGIONS_EMPTYORINVALIDINPUT = 3449 + """Empty or invalid input face zonelet ids. + **This is a beta parameter**. **The behavior and name may change in the future**.""" VT_INVALIDINPUT = 3600 - """Invalid input provided for VT operation.""" + """Invalid input provided for VT operation. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" VT_MERGEFACESFAILED = 3601 - """Merge faces operation failed.""" + """Merge faces operation failed. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" VT_MERGETHINSTRIPESFAILED = 3602 - """Merge thin stripes operation failed.""" + """Merge thin stripes operation failed. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" VT_MERGETHINEXTFAILED = 3603 - """Merge thin extensions operation failed.""" + """Merge thin extensions operation failed. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" VT_REPAIRSHARPCORNERANGLESFAILED = 3604 - """Repair sharp corner angles operation failed.""" + """Repair sharp corner angles operation failed. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" VT_PINCHFACESFAILED = 3605 - """Pinch faces operation failed.""" + """Pinch faces operation failed. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" VT_FILLHOLEFAILED = 3606 - """Fill hole operation failed.""" + """Fill hole operation failed. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" VT_FILLANNULARHOLEFAILED = 3607 - """Fill annular hole operation failed.""" + """Fill annular hole operation failed. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" VT_COLLAPSESHORTEDGESFAILED = 3608 - """Collapse short edges operation failed.""" + """Collapse short edges operation failed. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" VT_SEPARATEFACESFAILED = 3609 - """Separate faces operation failed.""" + """Separate faces operation failed. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" VT_CREATELEADINGEDGEFAILED = 3610 - """Create leading edge operation failed.""" + """Create leading edge operation failed. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" VT_CREATEMIDEDGEFAILED = 3611 - """Create mid edge operation failed.""" + """Create mid edge operation failed. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" VT_OPERATIONFAILED = 3612 - """VT operation failed.""" + """VT operation failed. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" + NUMENMETHODNOTFCOUND = 3801 + """Could not find numen method.""" CELLSEPARATIONFAILED = 6000 """Cell separation failed.""" NOCELLSSEPARATED = 6001 @@ -736,6 +838,8 @@ class WarningCode(enum.IntEnum): """Overriding meshed sizing parameters.""" INVALIDSIZECONTROLSCOPE = 208 """Invalid size control type provided.""" + OVERRIDEGROWTHRATEPARAM = 209 + """Overriding growth rate parameter.""" OVERRIDESUGGESTEDNAME = 301 """Override name by suggested name.""" OVERRIDESURFACESCOPEENTITY = 401 @@ -744,6 +848,14 @@ class WarningCode(enum.IntEnum): """Override volume scope entity.""" MAXOFPRISMCONTROLSMINASPECTRATIO = 403 """Maximum value of min aspect ratio from selected prism controls is considered for all selected prism controls.""" + OVERRIDEEDGESCOPEENTITY = 404 + """Override edge scope entity. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" + SHELLBLGAPFACTORMINLIMIT = 405 + """Adjusted ShellBL gap factor to 0.001. As 0.001 is minimum value supported. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" PARTNOTINPARTSCOPE = 601 """Selected part is not in the part scope of the periodic control.""" NUMERICPARTNAMERENAMETOALPHANUMERIC = 701 @@ -815,14 +927,32 @@ class WarningCode(enum.IntEnum): WRITINGTIESSKIPPED = 11103 """Writing of ties skipped.""" VT_SKIPPEDPROTECTEDENTITIES = 100001 - """Input contains protected entities which have been skipped.""" + """Input contains protected entities which have been skipped. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" VT_SKIPPEDFEATUREENTITIES = 100002 - """Input contains feature entities which have been skipped.""" + """Input contains feature entities which have been skipped. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" VT_SKIPPEDFREEEDGES = 100003 - """Input contains free edges which have been skipped.""" + """Input contains free edges which have been skipped. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" VT_SKIPPEDNONMANIFOLDEDGES = 100004 - """Input contains non-manifold edges which have been skipped.""" + """Input contains non-manifold edges which have been skipped. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" VT_SKIPPEDENTITIESINDIFFERENTZONES = 100005 - """Input contains entities in different zones which have been skipped.""" + """Input contains entities in different zones which have been skipped. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" + VT_CANNOTMERGENODES = 100006 + """Cannot merge nodes during VT operation. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" + VT_REMESHFACEFAILED = 100007 + """Failed to remesh face(s) during VT operation. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" MULTIZONEMESHER_SURFACESCOPEVOLUMESCOPEINCONSISTENCY = 110001 """MultiZone warning codes""" diff --git a/src/ansys/meshing/prime/autogen/prismcontrol.py b/src/ansys/meshing/prime/autogen/prismcontrol.py index f17a8526cf..1e6c28b292 100644 --- a/src/ansys/meshing/prime/autogen/prismcontrol.py +++ b/src/ansys/meshing/prime/autogen/prismcontrol.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/prismcontrolstructs.py b/src/ansys/meshing/prime/autogen/prismcontrolstructs.py index 07682af023..8aa4a03ca8 100644 --- a/src/ansys/meshing/prime/autogen/prismcontrolstructs.py +++ b/src/ansys/meshing/prime/autogen/prismcontrolstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/quadtospline.py b/src/ansys/meshing/prime/autogen/quadtospline.py index 1a2e6b7bb3..e9380546d1 100644 --- a/src/ansys/meshing/prime/autogen/quadtospline.py +++ b/src/ansys/meshing/prime/autogen/quadtospline.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/scaffolder.py b/src/ansys/meshing/prime/autogen/scaffolder.py index e6b19c4878..c4671c4eb3 100644 --- a/src/ansys/meshing/prime/autogen/scaffolder.py +++ b/src/ansys/meshing/prime/autogen/scaffolder.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/scaffolderstructs.py b/src/ansys/meshing/prime/autogen/scaffolderstructs.py index c132b76f70..ce7bfc2d62 100644 --- a/src/ansys/meshing/prime/autogen/scaffolderstructs.py +++ b/src/ansys/meshing/prime/autogen/scaffolderstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/shellblcontrol.py b/src/ansys/meshing/prime/autogen/shellblcontrol.py new file mode 100644 index 0000000000..329c7fb989 --- /dev/null +++ b/src/ansys/meshing/prime/autogen/shellblcontrol.py @@ -0,0 +1,240 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +""" Auto-generated file. DO NOT MODIFY """ +from __future__ import annotations +from ansys.meshing.prime.internals.comm_manager import CommunicationManager +from ansys.meshing.prime.params.primestructs import * +from ansys.meshing.prime.autogen.coreobject import * +from typing import List, Any, Union + +class ShellBLControl(CoreObject): + """ShellBLControl allows you to generate quad mesh on face zonelets. + + ShellBLControl allows you to control generation of quad mesh on face zonelets. Controls include setting the edge scope, face scope and growth parameters. + + Parameters + ---------- + model : Model + Server model to create ShellBLControl object. + id : int + Id of the ShellBLControl. + object_id : int + Object id of the ShellBLControl. + name : str + Name of the ShellBLControl. + """ + + def __init__(self, model: CommunicationManager, id: int, object_id: int, name: str): + """ Initialize ShellBLControl """ + self._model = model + self._comm = model._communicator + self._id = id + self._object_id = object_id + self._name = name + self._freeze() + + def get_growth_params(self) -> ShellBLControlGrowthParams: + """ Gets thin ShellBL parameters for ShellBL control. + + + Returns + ------- + ShellBLControlGrowthParams + Returns the ShellBLControlGrowthParams. + + + Notes + ----- + **This is a beta API**. **The behavior and implementation may change in future**. + + Examples + -------- + >>> params = shellBL_ctrl.get_growth_params() + + """ + args = {} + command_name = "PrimeMesh::ShellBLControl/GetGrowthParams" + self._model._print_beta_api_warning("get_growth_params") + self._model._print_logs_before_command("get_growth_params", args) + result = self._comm.serve(self._model, command_name, self._object_id, args=args) + self._model._print_logs_after_command("get_growth_params", ShellBLControlGrowthParams(model = self._model, json_data = result)) + return ShellBLControlGrowthParams(model = self._model, json_data = result) + + def set_growth_params(self, params : ShellBLControlGrowthParams): + """ Sets growth parameters for ShellBL control. + + + Parameters + ---------- + params : ShellBLControlGrowthParams + Parameters to set ShellBL growth. + + Notes + ----- + **This is a beta API**. **The behavior and implementation may change in future**. + + Examples + -------- + >>> results = shellbl_control.set_growth_params(ShellBLControlGrowthParams(model=model)) + + """ + if not isinstance(params, ShellBLControlGrowthParams): + raise TypeError("Invalid argument type passed for 'params'. Valid argument type is ShellBLControlGrowthParams.") + args = {"params" : params._jsonify()} + command_name = "PrimeMesh::ShellBLControl/SetGrowthParams" + self._model._print_beta_api_warning("set_growth_params") + self._model._print_logs_before_command("set_growth_params", args) + self._comm.serve(self._model, command_name, self._object_id, args=args) + self._model._print_logs_after_command("set_growth_params") + + def set_edge_scope(self, entities : ScopeDefinition) -> SetScopeResults: + """ Sets the edge scope. + + + Parameters + ---------- + entities : ScopeDefinition + Scope definition entities. + + Returns + ------- + SetScopeResults + Returns SetScopeResults. + + + Notes + ----- + **This is a beta API**. **The behavior and implementation may change in future**. + + Examples + -------- + >>> results = shellbl_control.set_edge_scope(entities) + + """ + if not isinstance(entities, ScopeDefinition): + raise TypeError("Invalid argument type passed for 'entities'. Valid argument type is ScopeDefinition.") + args = {"entities" : entities._jsonify()} + command_name = "PrimeMesh::ShellBLControl/SetEdgeScope" + self._model._print_beta_api_warning("set_edge_scope") + self._model._print_logs_before_command("set_edge_scope", args) + result = self._comm.serve(self._model, command_name, self._object_id, args=args) + self._model._print_logs_after_command("set_edge_scope", SetScopeResults(model = self._model, json_data = result)) + return SetScopeResults(model = self._model, json_data = result) + + def set_surface_scope(self, entities : ScopeDefinition) -> SetScopeResults: + """ Sets the face zonelet scope. + + + Parameters + ---------- + entities : ScopeDefinition + Scope definition entities. + + Returns + ------- + SetScopeResults + Returns SetScopeResults. + + + Notes + ----- + **This is a beta API**. **The behavior and implementation may change in future**. + + Examples + -------- + >>> results = shellbl_control.set_surface_scope(entities) + + """ + if not isinstance(entities, ScopeDefinition): + raise TypeError("Invalid argument type passed for 'entities'. Valid argument type is ScopeDefinition.") + args = {"entities" : entities._jsonify()} + command_name = "PrimeMesh::ShellBLControl/SetSurfaceScope" + self._model._print_beta_api_warning("set_surface_scope") + self._model._print_logs_before_command("set_surface_scope", args) + result = self._comm.serve(self._model, command_name, self._object_id, args=args) + self._model._print_logs_after_command("set_surface_scope", SetScopeResults(model = self._model, json_data = result)) + return SetScopeResults(model = self._model, json_data = result) + + def get_edge_scope(self) -> ScopeDefinition: + """ Gets the edge scope. + + + Returns + ------- + ScopeDefinition + Returns the ScopeDefinition. + + + Notes + ----- + **This is a beta API**. **The behavior and implementation may change in future**. + + Examples + -------- + >>> scope = shellbl_control.get_edge_scope() + + """ + args = {} + command_name = "PrimeMesh::ShellBLControl/GetEdgeScope" + self._model._print_beta_api_warning("get_edge_scope") + self._model._print_logs_before_command("get_edge_scope", args) + result = self._comm.serve(self._model, command_name, self._object_id, args=args) + self._model._print_logs_after_command("get_edge_scope", ScopeDefinition(model = self._model, json_data = result)) + return ScopeDefinition(model = self._model, json_data = result) + + def get_surface_scope(self) -> ScopeDefinition: + """ Gets the surface scope. + + + Returns + ------- + ScopeDefinition + Returns the ScopeDefinition. + + + Notes + ----- + **This is a beta API**. **The behavior and implementation may change in future**. + + Examples + -------- + >>> scope = shellbl_control.get_surface_scope() + + """ + args = {} + command_name = "PrimeMesh::ShellBLControl/GetSurfaceScope" + self._model._print_beta_api_warning("get_surface_scope") + self._model._print_logs_before_command("get_surface_scope", args) + result = self._comm.serve(self._model, command_name, self._object_id, args=args) + self._model._print_logs_after_command("get_surface_scope", ScopeDefinition(model = self._model, json_data = result)) + return ScopeDefinition(model = self._model, json_data = result) + + @property + def id(self): + """ Get the id of ShellBLControl.""" + return self._id + + @property + def name(self): + """ Get the name of ShellBLControl.""" + return self._name diff --git a/src/ansys/meshing/prime/autogen/shellblcontrolstructs.py b/src/ansys/meshing/prime/autogen/shellblcontrolstructs.py new file mode 100644 index 0000000000..e036b929fb --- /dev/null +++ b/src/ansys/meshing/prime/autogen/shellblcontrolstructs.py @@ -0,0 +1,220 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +""" Auto-generated file. DO NOT MODIFY """ +import enum +from typing import Dict, Any, Union, List, Iterable +from ansys.meshing.prime.internals.comm_manager import CommunicationManager +from ansys.meshing.prime.internals import utils +from ansys.meshing.prime.autogen.coreobject import * +import numpy as np + +from ansys.meshing.prime.params.primestructs import * + +class ShellBLControlGrowthParams(CoreObject): + """Growth parameters for ShellBL control. + + Parameters + ---------- + model: Model + Model to create a ``ShellBLControlGrowthParams`` object with default parameters. + n_layers: int, optional + Number of layers to be generated. + offset_type: ShellBLOffsetType, optional + Offset type for ShellBL. + growth_rate: float, optional + Ratio of heights of current layer to previous layer. + first_height: float, optional + Height of first layer of ShellBL. + json_data: dict, optional + JSON dictionary to create a ``ShellBLControlGrowthParams`` object with provided parameters. + + Examples + -------- + >>> shell_bl_control_growth_params = prime.ShellBLControlGrowthParams(model = model) + """ + _default_params = {} + + def __initialize( + self, + n_layers: int, + offset_type: ShellBLOffsetType, + growth_rate: float, + first_height: float): + self._n_layers = n_layers + self._offset_type = ShellBLOffsetType(offset_type) + self._growth_rate = growth_rate + self._first_height = first_height + + def __init__( + self, + model: CommunicationManager=None, + n_layers: int = None, + offset_type: ShellBLOffsetType = None, + growth_rate: float = None, + first_height: float = None, + json_data : dict = None, + **kwargs): + """Initialize a ``ShellBLControlGrowthParams`` object. + + Parameters + ---------- + model: Model + Model to create a ``ShellBLControlGrowthParams`` object with default parameters. + n_layers: int, optional + Number of layers to be generated. + offset_type: ShellBLOffsetType, optional + Offset type for ShellBL. + growth_rate: float, optional + Ratio of heights of current layer to previous layer. + first_height: float, optional + Height of first layer of ShellBL. + json_data: dict, optional + JSON dictionary to create a ``ShellBLControlGrowthParams`` object with provided parameters. + + Examples + -------- + >>> shell_bl_control_growth_params = prime.ShellBLControlGrowthParams(model = model) + """ + if json_data: + self.__initialize( + json_data["nLayers"] if "nLayers" in json_data else None, + ShellBLOffsetType(json_data["offsetType"] if "offsetType" in json_data else None), + json_data["growthRate"] if "growthRate" in json_data else None, + json_data["firstHeight"] if "firstHeight" in json_data else None) + else: + all_field_specified = all(arg is not None for arg in [n_layers, offset_type, growth_rate, first_height]) + if all_field_specified: + self.__initialize( + n_layers, + offset_type, + growth_rate, + first_height) + else: + if model is None: + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") + else: + param_json = model._communicator.initialize_params(model, "ShellBLControlGrowthParams") + json_data = param_json["ShellBLControlGrowthParams"] if "ShellBLControlGrowthParams" in param_json else {} + self.__initialize( + n_layers if n_layers is not None else ( ShellBLControlGrowthParams._default_params["n_layers"] if "n_layers" in ShellBLControlGrowthParams._default_params else (json_data["nLayers"] if "nLayers" in json_data else None)), + offset_type if offset_type is not None else ( ShellBLControlGrowthParams._default_params["offset_type"] if "offset_type" in ShellBLControlGrowthParams._default_params else ShellBLOffsetType(json_data["offsetType"] if "offsetType" in json_data else None)), + growth_rate if growth_rate is not None else ( ShellBLControlGrowthParams._default_params["growth_rate"] if "growth_rate" in ShellBLControlGrowthParams._default_params else (json_data["growthRate"] if "growthRate" in json_data else None)), + first_height if first_height is not None else ( ShellBLControlGrowthParams._default_params["first_height"] if "first_height" in ShellBLControlGrowthParams._default_params else (json_data["firstHeight"] if "firstHeight" in json_data else None))) + self._custom_params = kwargs + if model is not None: + [ model._logger.warning(f'Unsupported argument : {key}') for key in kwargs ] + [setattr(type(self), key, property(lambda self, key = key: self._custom_params[key] if key in self._custom_params else None, + lambda self, value, key = key : self._custom_params.update({ key: value }))) for key in kwargs] + self._freeze() + + @staticmethod + def set_default( + n_layers: int = None, + offset_type: ShellBLOffsetType = None, + growth_rate: float = None, + first_height: float = None): + """Set the default values of the ``ShellBLControlGrowthParams`` object. + + Parameters + ---------- + n_layers: int, optional + Number of layers to be generated. + offset_type: ShellBLOffsetType, optional + Offset type for ShellBL. + growth_rate: float, optional + Ratio of heights of current layer to previous layer. + first_height: float, optional + Height of first layer of ShellBL. + """ + args = locals() + [ShellBLControlGrowthParams._default_params.update({ key: value }) for key, value in args.items() if value is not None] + + @staticmethod + def print_default(): + """Print the default values of ``ShellBLControlGrowthParams`` object. + + Examples + -------- + >>> ShellBLControlGrowthParams.print_default() + """ + message = "" + message += ''.join(str(key) + ' : ' + str(value) + '\n' for key, value in ShellBLControlGrowthParams._default_params.items()) + print(message) + + def _jsonify(self) -> Dict[str, Any]: + json_data = {} + if self._n_layers is not None: + json_data["nLayers"] = self._n_layers + if self._offset_type is not None: + json_data["offsetType"] = self._offset_type + if self._growth_rate is not None: + json_data["growthRate"] = self._growth_rate + if self._first_height is not None: + json_data["firstHeight"] = self._first_height + [ json_data.update({ utils.to_camel_case(key) : value }) for key, value in self._custom_params.items()] + return json_data + + def __str__(self) -> str: + message = "n_layers : %s\noffset_type : %s\ngrowth_rate : %s\nfirst_height : %s" % (self._n_layers, self._offset_type, self._growth_rate, self._first_height) + message += ''.join('\n' + str(key) + ' : ' + str(value) for key, value in self._custom_params.items()) + return message + + @property + def n_layers(self) -> int: + """Number of layers to be generated. + """ + return self._n_layers + + @n_layers.setter + def n_layers(self, value: int): + self._n_layers = value + + @property + def offset_type(self) -> ShellBLOffsetType: + """Offset type for ShellBL. + """ + return self._offset_type + + @offset_type.setter + def offset_type(self, value: ShellBLOffsetType): + self._offset_type = value + + @property + def growth_rate(self) -> float: + """Ratio of heights of current layer to previous layer. + """ + return self._growth_rate + + @growth_rate.setter + def growth_rate(self, value: float): + self._growth_rate = value + + @property + def first_height(self) -> float: + """Height of first layer of ShellBL. + """ + return self._first_height + + @first_height.setter + def first_height(self, value: float): + self._first_height = value diff --git a/src/ansys/meshing/prime/autogen/sizecontrol.py b/src/ansys/meshing/prime/autogen/sizecontrol.py index 233e2579ab..f938a89275 100644 --- a/src/ansys/meshing/prime/autogen/sizecontrol.py +++ b/src/ansys/meshing/prime/autogen/sizecontrol.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager @@ -435,6 +457,32 @@ def get_scope(self) -> ScopeDefinition: self._model._print_logs_after_command("get_scope", ScopeDefinition(model = self._model, json_data = result)) return ScopeDefinition(model = self._model, json_data = result) + def get_sizing_type(self) -> SizingType: + """ Gets the sizing type for the size control. + + + Returns + ------- + SizingType + Returns the sizing type of the control. + + Notes + ----- + **This is a beta API**. **The behavior and implementation may change in future**. + + Examples + -------- + >>> type = size_control.get_sizing_type() + + """ + args = {} + command_name = "PrimeMesh::SizeControl/GetSizingType" + self._model._print_beta_api_warning("get_sizing_type") + self._model._print_logs_before_command("get_sizing_type", args) + result = self._comm.serve(self._model, command_name, self._object_id, args=args) + self._model._print_logs_after_command("get_sizing_type") + return result + def get_summary(self, params : SizeControlSummaryParams) -> SizeControlSummaryResult: """ Get the size control summary along with the evaluated scope for the provided parameters.. diff --git a/src/ansys/meshing/prime/autogen/sizecontrolstructs.py b/src/ansys/meshing/prime/autogen/sizecontrolstructs.py index f870278c4a..d2e36e97c0 100644 --- a/src/ansys/meshing/prime/autogen/sizecontrolstructs.py +++ b/src/ansys/meshing/prime/autogen/sizecontrolstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/sizefield.py b/src/ansys/meshing/prime/autogen/sizefield.py index 717abf1981..3b20440791 100644 --- a/src/ansys/meshing/prime/autogen/sizefield.py +++ b/src/ansys/meshing/prime/autogen/sizefield.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/sizefieldstructs.py b/src/ansys/meshing/prime/autogen/sizefieldstructs.py index c3e8bd7c4d..8dfb4c7aee 100644 --- a/src/ansys/meshing/prime/autogen/sizefieldstructs.py +++ b/src/ansys/meshing/prime/autogen/sizefieldstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable @@ -324,6 +346,8 @@ class VolumetricSizeFieldComputeParams(CoreObject): Option to enable periodic size field computations. periodic_params: SFPeriodicParams, optional Periodic parameters to compute the size field. + growth_rate_lower_bound: float, optional + Lower bound for growth rate. json_data: dict, optional JSON dictionary to create a ``VolumetricSizeFieldComputeParams`` object with provided parameters. @@ -337,10 +361,12 @@ def __initialize( self, enable_multi_threading: bool, enable_periodicity: bool, - periodic_params: SFPeriodicParams): + periodic_params: SFPeriodicParams, + growth_rate_lower_bound: float): self._enable_multi_threading = enable_multi_threading self._enable_periodicity = enable_periodicity self._periodic_params = periodic_params + self._growth_rate_lower_bound = growth_rate_lower_bound def __init__( self, @@ -348,6 +374,7 @@ def __init__( enable_multi_threading: bool = None, enable_periodicity: bool = None, periodic_params: SFPeriodicParams = None, + growth_rate_lower_bound: float = None, json_data : dict = None, **kwargs): """Initialize a ``VolumetricSizeFieldComputeParams`` object. @@ -362,6 +389,8 @@ def __init__( Option to enable periodic size field computations. periodic_params: SFPeriodicParams, optional Periodic parameters to compute the size field. + growth_rate_lower_bound: float, optional + Lower bound for growth rate. json_data: dict, optional JSON dictionary to create a ``VolumetricSizeFieldComputeParams`` object with provided parameters. @@ -373,14 +402,16 @@ def __init__( self.__initialize( json_data["enableMultiThreading"] if "enableMultiThreading" in json_data else None, json_data["enablePeriodicity"] if "enablePeriodicity" in json_data else None, - SFPeriodicParams(model = model, json_data = json_data["periodicParams"] if "periodicParams" in json_data else None)) + SFPeriodicParams(model = model, json_data = json_data["periodicParams"] if "periodicParams" in json_data else None), + json_data["growthRateLowerBound"] if "growthRateLowerBound" in json_data else None) else: - all_field_specified = all(arg is not None for arg in [enable_multi_threading, enable_periodicity, periodic_params]) + all_field_specified = all(arg is not None for arg in [enable_multi_threading, enable_periodicity, periodic_params, growth_rate_lower_bound]) if all_field_specified: self.__initialize( enable_multi_threading, enable_periodicity, - periodic_params) + periodic_params, + growth_rate_lower_bound) else: if model is None: raise ValueError("Invalid assignment. Either pass a model or specify all properties.") @@ -390,7 +421,8 @@ def __init__( self.__initialize( enable_multi_threading if enable_multi_threading is not None else ( VolumetricSizeFieldComputeParams._default_params["enable_multi_threading"] if "enable_multi_threading" in VolumetricSizeFieldComputeParams._default_params else (json_data["enableMultiThreading"] if "enableMultiThreading" in json_data else None)), enable_periodicity if enable_periodicity is not None else ( VolumetricSizeFieldComputeParams._default_params["enable_periodicity"] if "enable_periodicity" in VolumetricSizeFieldComputeParams._default_params else (json_data["enablePeriodicity"] if "enablePeriodicity" in json_data else None)), - periodic_params if periodic_params is not None else ( VolumetricSizeFieldComputeParams._default_params["periodic_params"] if "periodic_params" in VolumetricSizeFieldComputeParams._default_params else SFPeriodicParams(model = model, json_data = (json_data["periodicParams"] if "periodicParams" in json_data else None)))) + periodic_params if periodic_params is not None else ( VolumetricSizeFieldComputeParams._default_params["periodic_params"] if "periodic_params" in VolumetricSizeFieldComputeParams._default_params else SFPeriodicParams(model = model, json_data = (json_data["periodicParams"] if "periodicParams" in json_data else None))), + growth_rate_lower_bound if growth_rate_lower_bound is not None else ( VolumetricSizeFieldComputeParams._default_params["growth_rate_lower_bound"] if "growth_rate_lower_bound" in VolumetricSizeFieldComputeParams._default_params else (json_data["growthRateLowerBound"] if "growthRateLowerBound" in json_data else None))) self._custom_params = kwargs if model is not None: [ model._logger.warning(f'Unsupported argument : {key}') for key in kwargs ] @@ -402,7 +434,8 @@ def __init__( def set_default( enable_multi_threading: bool = None, enable_periodicity: bool = None, - periodic_params: SFPeriodicParams = None): + periodic_params: SFPeriodicParams = None, + growth_rate_lower_bound: float = None): """Set the default values of the ``VolumetricSizeFieldComputeParams`` object. Parameters @@ -413,6 +446,8 @@ def set_default( Option to enable periodic size field computations. periodic_params: SFPeriodicParams, optional Periodic parameters to compute the size field. + growth_rate_lower_bound: float, optional + Lower bound for growth rate. """ args = locals() [VolumetricSizeFieldComputeParams._default_params.update({ key: value }) for key, value in args.items() if value is not None] @@ -437,11 +472,13 @@ def _jsonify(self) -> Dict[str, Any]: json_data["enablePeriodicity"] = self._enable_periodicity if self._periodic_params is not None: json_data["periodicParams"] = self._periodic_params._jsonify() + if self._growth_rate_lower_bound is not None: + json_data["growthRateLowerBound"] = self._growth_rate_lower_bound [ json_data.update({ utils.to_camel_case(key) : value }) for key, value in self._custom_params.items()] return json_data def __str__(self) -> str: - message = "enable_multi_threading : %s\nenable_periodicity : %s\nperiodic_params : %s" % (self._enable_multi_threading, self._enable_periodicity, '{ ' + str(self._periodic_params) + ' }') + message = "enable_multi_threading : %s\nenable_periodicity : %s\nperiodic_params : %s\ngrowth_rate_lower_bound : %s" % (self._enable_multi_threading, self._enable_periodicity, '{ ' + str(self._periodic_params) + ' }', self._growth_rate_lower_bound) message += ''.join('\n' + str(key) + ' : ' + str(value) for key, value in self._custom_params.items()) return message @@ -474,3 +511,13 @@ def periodic_params(self) -> SFPeriodicParams: @periodic_params.setter def periodic_params(self, value: SFPeriodicParams): self._periodic_params = value + + @property + def growth_rate_lower_bound(self) -> float: + """Lower bound for growth rate. + """ + return self._growth_rate_lower_bound + + @growth_rate_lower_bound.setter + def growth_rate_lower_bound(self, value: float): + self._growth_rate_lower_bound = value diff --git a/src/ansys/meshing/prime/autogen/splittoolstructs.py b/src/ansys/meshing/prime/autogen/splittoolstructs.py index f8af151f29..22af9d584a 100644 --- a/src/ansys/meshing/prime/autogen/splittoolstructs.py +++ b/src/ansys/meshing/prime/autogen/splittoolstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/surfacesearch.py b/src/ansys/meshing/prime/autogen/surfacesearch.py index 7fe9f7dc3f..24696218a8 100644 --- a/src/ansys/meshing/prime/autogen/surfacesearch.py +++ b/src/ansys/meshing/prime/autogen/surfacesearch.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/surfacesearchstructs.py b/src/ansys/meshing/prime/autogen/surfacesearchstructs.py index 02c51665aa..c7defc1cab 100644 --- a/src/ansys/meshing/prime/autogen/surfacesearchstructs.py +++ b/src/ansys/meshing/prime/autogen/surfacesearchstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/surfaceutilities.py b/src/ansys/meshing/prime/autogen/surfaceutilities.py index dd35fbba50..934e4bcd39 100644 --- a/src/ansys/meshing/prime/autogen/surfaceutilities.py +++ b/src/ansys/meshing/prime/autogen/surfaceutilities.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/surfaceutilitystructs.py b/src/ansys/meshing/prime/autogen/surfaceutilitystructs.py index f495eebdd9..f606529008 100644 --- a/src/ansys/meshing/prime/autogen/surfaceutilitystructs.py +++ b/src/ansys/meshing/prime/autogen/surfaceutilitystructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/surfer.py b/src/ansys/meshing/prime/autogen/surfer.py index 2a89f6bf8e..32126f5bb6 100644 --- a/src/ansys/meshing/prime/autogen/surfer.py +++ b/src/ansys/meshing/prime/autogen/surfer.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager @@ -171,3 +193,47 @@ def remesh_face_zonelets_locally(self, face_zonelets : Iterable[int], register_i result = self._comm.serve(self._model, command_name, self._object_id, args=args) self._model._print_logs_after_command("remesh_face_zonelets_locally", LocalSurferResults(model = self._model, json_data = result)) return LocalSurferResults(model = self._model, json_data = result) + + def create_shell_bl_using_controls(self, part_id : int, shellbl_control_ids : Iterable[int], shellbl_params : ShellBLParams) -> CreateShellBLResults: + """ Creates ShellBL using data stored in controls. + + + Parameters + ---------- + part_id : int + Id of the part. + shellbl_control_ids : Iterable[int] + Ids of ShellBL control. + shellbl_params : ShellBLParams + Parameters related to ShellBL. + + Returns + ------- + CreateShellBLResults + Returns the CreateShellBLResults. + + + Notes + ----- + **This is a beta API**. **The behavior and implementation may change in future**. + + Examples + -------- + >>> results = surfer.create_shellbl_using_controls(part_id,shellbl_control_ids,shellbl_params) + + """ + if not isinstance(part_id, int): + raise TypeError("Invalid argument type passed for 'part_id'. Valid argument type is int.") + if not isinstance(shellbl_control_ids, Iterable): + raise TypeError("Invalid argument type passed for 'shellbl_control_ids'. Valid argument type is Iterable[int].") + if not isinstance(shellbl_params, ShellBLParams): + raise TypeError("Invalid argument type passed for 'shellbl_params'. Valid argument type is ShellBLParams.") + args = {"part_id" : part_id, + "shellbl_control_ids" : shellbl_control_ids, + "shellbl_params" : shellbl_params._jsonify()} + command_name = "PrimeMesh::Surfer/CreateShellBLUsingControls" + self._model._print_beta_api_warning("create_shell_bl_using_controls") + self._model._print_logs_before_command("create_shell_bl_using_controls", args) + result = self._comm.serve(self._model, command_name, self._object_id, args=args) + self._model._print_logs_after_command("create_shell_bl_using_controls", CreateShellBLResults(model = self._model, json_data = result)) + return CreateShellBLResults(model = self._model, json_data = result) diff --git a/src/ansys/meshing/prime/autogen/surferstructs.py b/src/ansys/meshing/prime/autogen/surferstructs.py index 1bde918519..b4b4500ace 100644 --- a/src/ansys/meshing/prime/autogen/surferstructs.py +++ b/src/ansys/meshing/prime/autogen/surferstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable @@ -1026,3 +1048,244 @@ def warning_codes(self) -> List[WarningCode]: @warning_codes.setter def warning_codes(self, value: List[WarningCode]): self._warning_codes = value + +class CreateShellBLResults(CoreObject): + """Results associated with the ShellBL mesh. + + Parameters + ---------- + model: Model + Model to create a ``CreateShellBLResults`` object with default parameters. + error_code: ErrorCode, optional + Error code associated with the failure of operation. + + **This is a beta parameter**. **The behavior and name may change in the future**. + warning_codes: List[WarningCode], optional + Warning codes associated with the operation. + + **This is a beta parameter**. **The behavior and name may change in the future**. + json_data: dict, optional + JSON dictionary to create a ``CreateShellBLResults`` object with provided parameters. + + Examples + -------- + >>> create_shell_blresults = prime.CreateShellBLResults(model = model) + """ + _default_params = {} + + def __initialize( + self, + error_code: ErrorCode, + warning_codes: List[WarningCode]): + self._error_code = ErrorCode(error_code) + self._warning_codes = warning_codes + + def __init__( + self, + model: CommunicationManager=None, + error_code: ErrorCode = None, + warning_codes: List[WarningCode] = None, + json_data : dict = None, + **kwargs): + """Initialize a ``CreateShellBLResults`` object. + + Parameters + ---------- + model: Model + Model to create a ``CreateShellBLResults`` object with default parameters. + error_code: ErrorCode, optional + Error code associated with the failure of operation. + + **This is a beta parameter**. **The behavior and name may change in the future**. + warning_codes: List[WarningCode], optional + Warning codes associated with the operation. + + **This is a beta parameter**. **The behavior and name may change in the future**. + json_data: dict, optional + JSON dictionary to create a ``CreateShellBLResults`` object with provided parameters. + + Examples + -------- + >>> create_shell_blresults = prime.CreateShellBLResults(model = model) + """ + if json_data: + self.__initialize( + ErrorCode(json_data["errorCode"] if "errorCode" in json_data else None), + [WarningCode(data) for data in json_data["warningCodes"]] if "warningCodes" in json_data else None) + else: + all_field_specified = all(arg is not None for arg in [error_code, warning_codes]) + if all_field_specified: + self.__initialize( + error_code, + warning_codes) + else: + if model is None: + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") + else: + param_json = model._communicator.initialize_params(model, "CreateShellBLResults") + json_data = param_json["CreateShellBLResults"] if "CreateShellBLResults" in param_json else {} + self.__initialize( + error_code if error_code is not None else ( CreateShellBLResults._default_params["error_code"] if "error_code" in CreateShellBLResults._default_params else ErrorCode(json_data["errorCode"] if "errorCode" in json_data else None)), + warning_codes if warning_codes is not None else ( CreateShellBLResults._default_params["warning_codes"] if "warning_codes" in CreateShellBLResults._default_params else [WarningCode(data) for data in (json_data["warningCodes"] if "warningCodes" in json_data else None)])) + self._custom_params = kwargs + if model is not None: + [ model._logger.warning(f'Unsupported argument : {key}') for key in kwargs ] + [setattr(type(self), key, property(lambda self, key = key: self._custom_params[key] if key in self._custom_params else None, + lambda self, value, key = key : self._custom_params.update({ key: value }))) for key in kwargs] + self._freeze() + + @staticmethod + def set_default( + error_code: ErrorCode = None, + warning_codes: List[WarningCode] = None): + """Set the default values of the ``CreateShellBLResults`` object. + + Parameters + ---------- + error_code: ErrorCode, optional + Error code associated with the failure of operation. + warning_codes: List[WarningCode], optional + Warning codes associated with the operation. + """ + args = locals() + [CreateShellBLResults._default_params.update({ key: value }) for key, value in args.items() if value is not None] + + @staticmethod + def print_default(): + """Print the default values of ``CreateShellBLResults`` object. + + Examples + -------- + >>> CreateShellBLResults.print_default() + """ + message = "" + message += ''.join(str(key) + ' : ' + str(value) + '\n' for key, value in CreateShellBLResults._default_params.items()) + print(message) + + def _jsonify(self) -> Dict[str, Any]: + json_data = {} + if self._error_code is not None: + json_data["errorCode"] = self._error_code + if self._warning_codes is not None: + json_data["warningCodes"] = [data for data in self._warning_codes] + [ json_data.update({ utils.to_camel_case(key) : value }) for key, value in self._custom_params.items()] + return json_data + + def __str__(self) -> str: + message = "error_code : %s\nwarning_codes : %s" % (self._error_code, '[' + ''.join('\n' + str(data) for data in self._warning_codes) + ']') + message += ''.join('\n' + str(key) + ' : ' + str(value) for key, value in self._custom_params.items()) + return message + + @property + def error_code(self) -> ErrorCode: + """Error code associated with the failure of operation. + + **This is a beta parameter**. **The behavior and name may change in the future**. + """ + return self._error_code + + @error_code.setter + def error_code(self, value: ErrorCode): + self._error_code = value + + @property + def warning_codes(self) -> List[WarningCode]: + """Warning codes associated with the operation. + + **This is a beta parameter**. **The behavior and name may change in the future**. + """ + return self._warning_codes + + @warning_codes.setter + def warning_codes(self, value: List[WarningCode]): + self._warning_codes = value + +class ShellBLParams(CoreObject): + """Parameters used to generate ShellBL. + + Parameters + ---------- + model: Model + Model to create a ``ShellBLParams`` object with default parameters. + json_data: dict, optional + JSON dictionary to create a ``ShellBLParams`` object with provided parameters. + + Examples + -------- + >>> shell_blparams = prime.ShellBLParams(model = model) + """ + _default_params = {} + + def __initialize( + self): + pass + + def __init__( + self, + model: CommunicationManager=None, + json_data : dict = None, + **kwargs): + """Initialize a ``ShellBLParams`` object. + + Parameters + ---------- + model: Model + Model to create a ``ShellBLParams`` object with default parameters. + json_data: dict, optional + JSON dictionary to create a ``ShellBLParams`` object with provided parameters. + + Examples + -------- + >>> shell_blparams = prime.ShellBLParams(model = model) + """ + if json_data: + self.__initialize() + else: + all_field_specified = all(arg is not None for arg in []) + if all_field_specified: + self.__initialize() + else: + if model is None: + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") + else: + param_json = model._communicator.initialize_params(model, "ShellBLParams") + json_data = param_json["ShellBLParams"] if "ShellBLParams" in param_json else {} + self.__initialize() + self._custom_params = kwargs + if model is not None: + [ model._logger.warning(f'Unsupported argument : {key}') for key in kwargs ] + [setattr(type(self), key, property(lambda self, key = key: self._custom_params[key] if key in self._custom_params else None, + lambda self, value, key = key : self._custom_params.update({ key: value }))) for key in kwargs] + self._freeze() + + @staticmethod + def set_default(): + """Set the default values of the ``ShellBLParams`` object. + + """ + args = locals() + [ShellBLParams._default_params.update({ key: value }) for key, value in args.items() if value is not None] + + @staticmethod + def print_default(): + """Print the default values of ``ShellBLParams`` object. + + Examples + -------- + >>> ShellBLParams.print_default() + """ + message = "" + message += ''.join(str(key) + ' : ' + str(value) + '\n' for key, value in ShellBLParams._default_params.items()) + print(message) + + def _jsonify(self) -> Dict[str, Any]: + json_data = {} + [ json_data.update({ utils.to_camel_case(key) : value }) for key, value in self._custom_params.items()] + return json_data + + def __str__(self) -> str: + message = "" % () + message += ''.join('\n' + str(key) + ' : ' + str(value) for key, value in self._custom_params.items()) + if len(message) == 0: + message = 'The object has no parameters to print.' + return message diff --git a/src/ansys/meshing/prime/autogen/thinvolumecontrol.py b/src/ansys/meshing/prime/autogen/thinvolumecontrol.py index 27ba81b85d..9b280691c5 100644 --- a/src/ansys/meshing/prime/autogen/thinvolumecontrol.py +++ b/src/ansys/meshing/prime/autogen/thinvolumecontrol.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/thinvolumecontrolstructs.py b/src/ansys/meshing/prime/autogen/thinvolumecontrolstructs.py index 1aa1745548..21a685b622 100644 --- a/src/ansys/meshing/prime/autogen/thinvolumecontrolstructs.py +++ b/src/ansys/meshing/prime/autogen/thinvolumecontrolstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/topodata.py b/src/ansys/meshing/prime/autogen/topodata.py index c7fa607af5..8aa00d20f5 100644 --- a/src/ansys/meshing/prime/autogen/topodata.py +++ b/src/ansys/meshing/prime/autogen/topodata.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/topodatastructs.py b/src/ansys/meshing/prime/autogen/topodatastructs.py index 72fd2d7274..6c865a8714 100644 --- a/src/ansys/meshing/prime/autogen/topodatastructs.py +++ b/src/ansys/meshing/prime/autogen/topodatastructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/toposearchstructs.py b/src/ansys/meshing/prime/autogen/toposearchstructs.py index cb2031db95..cee7f114a9 100644 --- a/src/ansys/meshing/prime/autogen/toposearchstructs.py +++ b/src/ansys/meshing/prime/autogen/toposearchstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/topoutilities.py b/src/ansys/meshing/prime/autogen/topoutilities.py index 2eff4289e0..4eebb2cd29 100644 --- a/src/ansys/meshing/prime/autogen/topoutilities.py +++ b/src/ansys/meshing/prime/autogen/topoutilities.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager @@ -6,7 +28,7 @@ from typing import List, Any, Union class TopoUtilities(CoreObject): - """Performs various general surface utilities algorithms. For example, copy zonelets, resolve surface intersections. + """Performs various general topology utility algorithms. For example, fill hole. Parameters ---------- diff --git a/src/ansys/meshing/prime/autogen/topoutilitystructs.py b/src/ansys/meshing/prime/autogen/topoutilitystructs.py index 76b566eed1..9df9b8b1a2 100644 --- a/src/ansys/meshing/prime/autogen/topoutilitystructs.py +++ b/src/ansys/meshing/prime/autogen/topoutilitystructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/transform.py b/src/ansys/meshing/prime/autogen/transform.py index 3effaca50e..ea298e63c1 100644 --- a/src/ansys/meshing/prime/autogen/transform.py +++ b/src/ansys/meshing/prime/autogen/transform.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager @@ -54,9 +76,17 @@ def transform_zonelets(self, part_id : int, zonelets : Iterable[int], params : T Examples -------- - >>> transform_params = prime.TransformParams(model = model) + >>> params = prime.TransformParams(model=model) + >>> # scale by a factor of 2 using a 4x4 transformation matrix + >>> params.transformation_matrix = [ + >>> 2, 0, 0, 0, + >>> 0, 2, 0, 0, + >>> 0, 0, 2, 0, + >>> 0, 0, 0, 1, + >>> ] + >>> part = model.get_part_by_name("part_name") >>> zonelets = part.get_face_zonelets() - >>> results = surface_utilities.transform_zonelets(part.id, zonelets, params) + >>> result = prime.SurfaceUtilities(model).transform_zonelets(part.id, zonelets, params) """ if not isinstance(part_id, int): diff --git a/src/ansys/meshing/prime/autogen/transformstructs.py b/src/ansys/meshing/prime/autogen/transformstructs.py index cbbb6ef733..4d49abde86 100644 --- a/src/ansys/meshing/prime/autogen/transformstructs.py +++ b/src/ansys/meshing/prime/autogen/transformstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/volumecontrol.py b/src/ansys/meshing/prime/autogen/volumecontrol.py index a6bf946ae0..37e6fae1fe 100644 --- a/src/ansys/meshing/prime/autogen/volumecontrol.py +++ b/src/ansys/meshing/prime/autogen/volumecontrol.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/volumecontrolstructs.py b/src/ansys/meshing/prime/autogen/volumecontrolstructs.py index 2d42bc745e..3568fe8c86 100644 --- a/src/ansys/meshing/prime/autogen/volumecontrolstructs.py +++ b/src/ansys/meshing/prime/autogen/volumecontrolstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/volumemeshtool.py b/src/ansys/meshing/prime/autogen/volumemeshtool.py index 5df17335ab..c21ec19297 100644 --- a/src/ansys/meshing/prime/autogen/volumemeshtool.py +++ b/src/ansys/meshing/prime/autogen/volumemeshtool.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/volumemeshtoolstructs.py b/src/ansys/meshing/prime/autogen/volumemeshtoolstructs.py index 3c3f1f9e88..91a5d45a5e 100644 --- a/src/ansys/meshing/prime/autogen/volumemeshtoolstructs.py +++ b/src/ansys/meshing/prime/autogen/volumemeshtoolstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/volumesearch.py b/src/ansys/meshing/prime/autogen/volumesearch.py index e6e00e9274..362c34dd73 100644 --- a/src/ansys/meshing/prime/autogen/volumesearch.py +++ b/src/ansys/meshing/prime/autogen/volumesearch.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/volumesearchstructs.py b/src/ansys/meshing/prime/autogen/volumesearchstructs.py index 899a2f826d..c2bbfd9eec 100644 --- a/src/ansys/meshing/prime/autogen/volumesearchstructs.py +++ b/src/ansys/meshing/prime/autogen/volumesearchstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/volumesweeper.py b/src/ansys/meshing/prime/autogen/volumesweeper.py index 7309586ae8..999799ad54 100644 --- a/src/ansys/meshing/prime/autogen/volumesweeper.py +++ b/src/ansys/meshing/prime/autogen/volumesweeper.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/volumesweeperstructs.py b/src/ansys/meshing/prime/autogen/volumesweeperstructs.py index 8466a47af6..e639cb86b6 100644 --- a/src/ansys/meshing/prime/autogen/volumesweeperstructs.py +++ b/src/ansys/meshing/prime/autogen/volumesweeperstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/vtcomposer.py b/src/ansys/meshing/prime/autogen/vtcomposer.py index 0aadd81e82..10def9faa9 100644 --- a/src/ansys/meshing/prime/autogen/vtcomposer.py +++ b/src/ansys/meshing/prime/autogen/vtcomposer.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/vtcomposerstructs.py b/src/ansys/meshing/prime/autogen/vtcomposerstructs.py index c497c33f80..6a577ffcba 100644 --- a/src/ansys/meshing/prime/autogen/vtcomposerstructs.py +++ b/src/ansys/meshing/prime/autogen/vtcomposerstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/autogen/wrapper.py b/src/ansys/meshing/prime/autogen/wrapper.py index e1888b48f6..3d42df0adc 100644 --- a/src/ansys/meshing/prime/autogen/wrapper.py +++ b/src/ansys/meshing/prime/autogen/wrapper.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/wrappercontrol.py b/src/ansys/meshing/prime/autogen/wrappercontrol.py index ea97b6561a..446265a201 100644 --- a/src/ansys/meshing/prime/autogen/wrappercontrol.py +++ b/src/ansys/meshing/prime/autogen/wrappercontrol.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ from __future__ import annotations from ansys.meshing.prime.internals.comm_manager import CommunicationManager diff --git a/src/ansys/meshing/prime/autogen/wrapperstructs.py b/src/ansys/meshing/prime/autogen/wrapperstructs.py index 4efa2e1e8f..b55ac5d593 100644 --- a/src/ansys/meshing/prime/autogen/wrapperstructs.py +++ b/src/ansys/meshing/prime/autogen/wrapperstructs.py @@ -1,3 +1,25 @@ +# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + """ Auto-generated file. DO NOT MODIFY """ import enum from typing import Dict, Any, Union, List, Iterable diff --git a/src/ansys/meshing/prime/core/controldata.py b/src/ansys/meshing/prime/core/controldata.py index fbcdf12675..36843f5a03 100644 --- a/src/ansys/meshing/prime/core/controldata.py +++ b/src/ansys/meshing/prime/core/controldata.py @@ -32,6 +32,7 @@ from ansys.meshing.prime.autogen.multizonecontrol import MultiZoneControl from ansys.meshing.prime.autogen.primeconfig import ErrorCode from ansys.meshing.prime.autogen.prismcontrol import PrismControl +from ansys.meshing.prime.autogen.shellblcontrol import ShellBLControl from ansys.meshing.prime.autogen.thinvolumecontrol import ThinVolumeControl from ansys.meshing.prime.core.periodiccontrol import PeriodicControl from ansys.meshing.prime.core.sizecontrol import SizeControl @@ -68,6 +69,7 @@ def __init__(self, model: Model, id: int, object_id: int, name: str): self._thin_volume_controls = [] self._volume_controls = [] self._periodic_controls = [] + self._shell_bl_controls = [] _ControlData.__init__(self, model, id, object_id, name) def get_wrapper_control_by_name(self, name) -> WrapperControl: @@ -151,7 +153,6 @@ def create_prism_control(self) -> PrismControl: PrismControl Prism control. - Examples -------- >>> prism_control = model.control_data.create_prism_control() @@ -162,6 +163,24 @@ def create_prism_control(self) -> PrismControl: self._prism_controls.append(new_prism_control) return new_prism_control + def create_shell_bl_control(self) -> ShellBLControl: + """Create a ShellBL control. + + Returns + ------- + ShellBLControl + ShellBL Control. + + Examples + -------- + >>> shell_bl_control = model.control_data.create_shell_bl_control() + + """ + res = _ControlData.create_shell_bl_control(self) + new_shell_bl_control = ShellBLControl(self._model, res[0], res[1], res[2]) + self._shell_bl_controls.append(new_shell_bl_control) + return new_shell_bl_control + def create_thin_volume_control(self) -> ThinVolumeControl: """Create a thin volume control. @@ -266,6 +285,29 @@ def get_prism_control_by_name(self, name: str) -> PrismControl: return prism_control return None + def get_shell_bl_control_by_name(self, name: str) -> ShellBLControl: + """Get a shell bl control by name. + + Parameters + ---------- + name : str + Name of the shell bl control. + + Returns + ------- + ShellBLControl + Shell BL control. + + Examples + -------- + >>> shell_bl_control = model.control_data.get_shell_bl_control_by_name("ShellBLControl-1") + + """ + for shell_bl_control in self._shell_bl_controls: + if shell_bl_control.name == name: + return shell_bl_control + return None + def get_thin_volume_control_by_name(self, name: str) -> ThinVolumeControl: """Get a thin volume control by name. @@ -323,6 +365,10 @@ def delete_controls(self, control_ids: Iterable[int]) -> DeleteResults: if prism_control.id == id: self._prism_controls.remove(prism_control) break + for shell_bl_control in self._shell_bl_controls: + if shell_bl_control.id == id: + self._shell_bl_controls.remove(shell_bl_control) + break for thin_volume_control in self._thin_volume_controls: if thin_volume_control.id == id: self._thin_volume_controls.remove(thin_volume_control) @@ -347,6 +393,9 @@ def _update_size_controls(self, c_data: List): 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] + def _update_shell_bl_controls(self, c_data: List): + self._shell_bl_controls = [ShellBLControl(self._model, c[0], c[1], c[2]) for c in c_data] + def _update_wrapper_controls(self, c_data: List): self._wrapper_controls = [WrapperControl(self._model, c[0], c[1], c[2]) for c in c_data] @@ -467,6 +516,22 @@ def thin_volume_controls(self) -> List[ThinVolumeControl]: """ return self._thin_volume_controls + @property + def shell_bl_controls(self) -> List[ShellBLControl]: + """Get the shell bl controls. + + Returns + ------- + List[ShellBLControl] + List of shell bl controls. + + Examples + -------- + >>> shell_bl_control = model.control_data.shell_bl_controls + + """ + return self._shell_bl_controls + @property def wrapper_controls(self) -> List[WrapperControl]: """Get the wrapper controls. @@ -489,7 +554,7 @@ def multi_zone_controls(self) -> List[MultiZoneControl]: Returns ------- List[MultiZoneControl] - Returns the list of mutlizone controls. + Returns the list of multizone controls. Examples -------- diff --git a/src/ansys/meshing/prime/core/fileio.py b/src/ansys/meshing/prime/core/fileio.py index e5ff7fff10..a5cd66b116 100644 --- a/src/ansys/meshing/prime/core/fileio.py +++ b/src/ansys/meshing/prime/core/fileio.py @@ -342,9 +342,10 @@ def initialize_cdb_export_params( """ Initialize specific CDB export parameters based on the given version. - This function sets the use_compact_format and export_fasteners_as_swgen - parameters of the provided ExportMapdlCdbParams object based on the given - major and minor version numbers. Other parameters remain unchanged. + This function sets the use_compact_format, export_fasteners_as_swgen and + export_rigid_bodies_as_rbgen parameters of the provided ExportMapdlCdbParams + object based on the given major and minor version numbers. + Other parameters remain unchanged. Parameters ---------- @@ -365,9 +366,9 @@ def initialize_cdb_export_params( **This is a beta API**. **The behavior and implementation may change in future**. The version is formed as "r", e.g., "24r1", "25r2". - If the version is greater than or equal to "25r1", the use_compact_format and - export_fasteners_as_swgen parameters are set to True; otherwise, they are set - to False. + If the version is greater than or equal to "25r1", the use_compact_format, + export_fasteners_as_swgen and export_rigid_bodies_as_rbgen parameters are set + to True. Otherwise, they are set to False. Examples -------- @@ -378,6 +379,8 @@ def initialize_cdb_export_params( False >>> params.export_fasteners_as_swgen False + >>> params.export_rigid_bodies_as_swgen + False >>> file_io = prime.FileIO(model=model) >>> params = prime.ExportMapdlCdbParams() @@ -386,10 +389,13 @@ def initialize_cdb_export_params( True >>> params.export_fasteners_as_swgen True + >>> params.export_rigid_bodies_as_swgen + True """ version = f"{major_version}r{minor_version}" params.use_compact_format = version >= "25r1" params.export_fasteners_as_swgen = version >= "25r1" + params.export_rigid_bodies_as_rbgen = version >= "25r1" return params def import_fluent_meshing_meshes( @@ -595,10 +601,10 @@ def import_cad(self, file_name: str, params: ImportCadParams) -> ImportCadResult Supported CAD file formats on Windows are: - \*.scdoc \*.fmd \*.agdb \*.pmdb \*.meshdat \*.mechdat \*.dsdb \*.cmdb \*.sat \*.sab - \*.dwg \*.dxf \*.model \*.exp \*.CATPart \*.CATProduct \*.cgr \*.3dxml \*.prt\* \*.asm\* - \*.iges \*.igs \*.ipt \*.iam \*.jt \*.prt \*.x_t \*.x_b \*.par \*.psm \*.asm \*.sldprt - \*.sldasm \*.step \*.stp \*.stl \*.plmxml \*.tgf + \*.scdoc \*.scdocx \*.dsco \*.fmd \*.agdb \*.pmdb \*.meshdat \*.mechdat \*.dsdb \*.cmdb + \*.sat \*.sab \*.dwg \*.dxf \*.model \*.exp \*.CATPart \*.CATProduct \*.cgr \*.3dxml + \*.prt\* \*.asm\* \*.iges \*.igs \*.ipt \*.iam \*.jt \*.prt \*.x_t \*.x_b \*.par \*.psm + \*.asm \*.sldprt \*.sldasm \*.step \*.stp \*.stl \*.plmxml \*.tgf Supported CAD file formats on Linux are: @@ -606,7 +612,8 @@ def import_cad(self, file_name: str, params: ImportCadParams) -> ImportCadResult \*.CATPart \*.CATProduct \*.iges \*.igs \*.jt \*.x_t \*.x_b \*.step \*.stp \*.stl \*.plmxml \*.tgf - See the documentation for a comprehensive list of supported formats. + Refer **Reading and writing files** section in **User guide** for a + comprehensive list of supported formats. Parameters ---------- @@ -625,12 +632,11 @@ def import_cad(self, file_name: str, params: ImportCadParams) -> ImportCadResult -------- >>> import ansys.meshing.prime as prime >>> # connect client to server and get model from it - >>> client = prime.Client(ip="localhost", port=50060) - >>> model = client.model + >>> client = prime.Client(ip="localhost", port=50060) + >>> model = client.model >>> file_io = prime.FileIO(model=model) - >>> params = ImportCadParams(model=model) - >>> results = file_io.import_cad( - "/tmp/my_cad.x_t", params=params) + >>> params = prime.ImportCadParams(model=model) + >>> results = file_io.import_cad("/tmp/my_cad.x_t", params=params) """ with utils.file_read_context(self._model, file_name) as temp_file_name: diff --git a/src/ansys/meshing/prime/core/mapdlcdbexportutils.py b/src/ansys/meshing/prime/core/mapdlcdbexportutils.py index 3f27465044..c21c14b4fa 100644 --- a/src/ansys/meshing/prime/core/mapdlcdbexportutils.py +++ b/src/ansys/meshing/prime/core/mapdlcdbexportutils.py @@ -686,6 +686,8 @@ def __init__(self, model: prime.Model, raw_materials_data, zone_data): self._logger = model.python_logger def _map_zone_type_with_material(self): + if self._zone_data is None: + return for zone in self._zone_data: zone_details = self._zone_data[zone] if 'Type' not in zone_details: @@ -1908,7 +1910,13 @@ def _get_commands(self, boundary_data): ) self._ampl_commands += ampl_commands # ampl_processor.write_amplitude_table_to_file(ampl_commands) - for i in range(first, last): + if last > 7: + self._logger.warning( + f"Warning: only " + f"({[i for i in range(first, min(last,7))]}) " + f"boundary data dofs from {first} to {last} are processed" + ) + for i in range(first, min(last, 7)): if data_line['node_set'].isnumeric(): boundary_commands += f"D, {data_line['node_set']}, {dof_map[i]}, " else: @@ -3339,6 +3347,15 @@ def get_output_analysis_data(self, output_data): output_analysis_commands += "OUTRES, EANGL, NONE\n" pass output_analysis_commands += "\n" + + if self._model_application == prime.CdbAnalysisType.OUTERPANELSTIFFNESS: + output_analysis_commands += "ESEL,S,ENAME,,181\n" + output_analysis_commands += "ESEL,A,ENAME,,281\n" + output_analysis_commands += "CM,SHELL_THICKNESS_STORAGE,ELEM\n" + output_analysis_commands += "ALLSEL\n" + output_analysis_commands += "OUTRES, MISC, LAST, SHELL_THICKNESS_STORAGE, ,\n" + output_analysis_commands += "\n" + number_interval_to_table = False for output in output_data: minimum_time_interval = self.get_output_time_interval() @@ -3468,7 +3485,7 @@ def get_output_analysis_data(self, output_data): ) output_analysis_commands += "ALLSEL\n" else: - output_analysis_commands += "ESEL,S,ELEM,,174\n" + output_analysis_commands += "ESEL,S,ENAME,,174\n" output_analysis_commands += "CM,All_CONTACT,ELEM\n" output_analysis_commands += "ALLSEL\n" output_analysis_commands += "OUTRES, " @@ -4227,7 +4244,8 @@ def generate_mapdl_commands( analysis_settings = '' json_simulation_data = json.loads(simulation_data) if json_simulation_data is None: - model.python_logger.warning("Simulation Data is empty") + if not simulation_data == 'null': + model.python_logger.warning("Simulation data is empty") return all_mat_cmds, analysis_settings if "Materials" in json_simulation_data and json_simulation_data["Materials"] is not None: mp = _MaterialProcessor( diff --git a/src/ansys/meshing/prime/core/model.py b/src/ansys/meshing/prime/core/model.py index 8adf40f0a8..ff1f54162e 100644 --- a/src/ansys/meshing/prime/core/model.py +++ b/src/ansys/meshing/prime/core/model.py @@ -98,6 +98,7 @@ def _sync_up_model(self): part_data = res["Parts"] sc_data = res["SizeControl"] pc_data = res["PrismControl"] + shc_data = res["ShellBLControl"] wc_data = res["WrapperControl"] mc_data = res["MultiZoneControl"] vc_data = res["VolumeControl"] @@ -117,6 +118,7 @@ def _sync_up_model(self): self._control_data = ControlData(self, -1, res["ControlData"], "") self._control_data._update_size_controls(sc_data) self._control_data._update_prism_controls(pc_data) + self._control_data._update_shell_bl_controls(shc_data) self._control_data._update_wrapper_controls(wc_data) self._control_data._update_multi_zone_controls(mc_data) self._control_data._update_volume_controls(vc_data) diff --git a/src/ansys/meshing/prime/core/surfer.py b/src/ansys/meshing/prime/core/surfer.py index 0d682bb6bc..bc2a3ec640 100644 --- a/src/ansys/meshing/prime/core/surfer.py +++ b/src/ansys/meshing/prime/core/surfer.py @@ -29,8 +29,10 @@ # isort: split from ansys.meshing.prime.autogen.coreobject import CoreObject from ansys.meshing.prime.autogen.surferstructs import ( + CreateShellBLResults, LocalSurferParams, LocalSurferResults, + ShellBLParams, SurferParams, SurferResults, ) @@ -84,6 +86,37 @@ def mesh_topo_faces( with _Surfer(model=self._model, part_id=part_id) as surfer: return surfer.mesh_topo_faces(topo_faces, params) + def create_shell_bl_using_controls( + self, part_id: int, shellbl_control_ids: Iterable[int], shellbl_params: ShellBLParams + ) -> CreateShellBLResults: + """Create ShellBL using data stored in controls. + + Parameters + ---------- + part_id : int + Id of the part. + shellbl_control_ids : Iterable[int] + Ids of ShellBL control. + shellbl_params : ShellBLParams + Parameters related to ShellBL. + + Returns + ------- + CreateShellBLResults + Returns the CreateShellBLResults. + + Examples + -------- + >>> results = surfer.create_shell_bl_using_controls( + part_id, shellbl_control_ids, shellbl_params + ) + + """ + with _Surfer(model=self._model, part_id=part_id) as surfer: + return surfer.create_shell_bl_using_controls( + part_id, shellbl_control_ids, shellbl_params + ) + def remesh_face_zonelets_locally( self, part_id: int, diff --git a/src/ansys/meshing/prime/internals/error_handling.py b/src/ansys/meshing/prime/internals/error_handling.py index 8ee7f361a0..9ac1abb1a3 100644 --- a/src/ansys/meshing/prime/internals/error_handling.py +++ b/src/ansys/meshing/prime/internals/error_handling.py @@ -224,6 +224,7 @@ ErrorCode.WRAPPERPATCHFLOWREGIONS_FAILED: "Failed to create patching surfaces.", ErrorCode.WRAPPERPATCHFLOWREGIONS_TOOSMALLHOLESIZE: "Provided hole size is too small hole for dead region.", ErrorCode.WRAPPERPATCHFLOWREGIONS_INVALIDBASESIZE: "Base size specified for patching should be positive double.", + ErrorCode.WRAPPERPATCHFLOWREGIONS_EMPTYORINVALIDINPUT: "Provided face zonelet ids for dead region are empty or invalid.", ErrorCode.INVALIDWRAPPERCONTROL: "Invalid wrapper control.", ErrorCode.WRAPPERCLOSEGAPS_INVALIDGAPSIZE: "Gap size specified for close gaps should be positive double.", ErrorCode.WRAPPERCLOSEGAPS_INVALIDSCOPE: "Scope specified for close gaps is invalid.", @@ -335,6 +336,16 @@ ErrorCode.ZEROELEMENTSREADFROMCDBFILE: "No mesh elements found. Check the input CDB file.", ErrorCode.ZERONODESREADFROMCDBFILE: "No nodes found. Check the input CDB file.", ErrorCode.ZEROELEMENTSFORCDBEXPORT: "No mesh elements found for CDB export. Check if the model is meshed, or set write_by_zones in ExportMapdlCdbParams to false if zones are not defined.", + ErrorCode.SHELLBLFAILED: "ShellBL creation failed.", + ErrorCode.SHELLBLQUADS: "ShellBL quads.", + ErrorCode.SHELLBLNOMESH: "ShellBL is not supported for unmeshed topofaces.", + ErrorCode.SHELLBLFEWLAYERS: "Only few ShellBL layers are created.", + ErrorCode.SHELLBLWRONGTOPO: "Found topofaces with invalid topology.", + ErrorCode.OGRIDREFINEFAILED: "Post refinement of ShellBl quads failed.", + ErrorCode.SPLITTOTRIFAILED: "ShellBL quads split to triangles failed.", + ErrorCode.INVALIDSHELLBLCONTROLS: "Invalid ShellBL controls.", + ErrorCode.INVALIDSHELLBLCONTROLS_INCORRECTSCOPEENTITY: "Invalid scope entity.", + ErrorCode.PERIODICEDGESNOTSUPPORTEDFORSHELLBL: "Periodic surfaces selected for ShellBL generation are not supported.", } prime_warning_messages = { diff --git a/src/ansys/meshing/prime/internals/logger.py b/src/ansys/meshing/prime/internals/logger.py index 88e5cba1d0..b57adf96f6 100644 --- a/src/ansys/meshing/prime/internals/logger.py +++ b/src/ansys/meshing/prime/internals/logger.py @@ -48,7 +48,7 @@ class PrimeLogger(object, metaclass=SingletonType): _logger = None - def __init__(self, level: int = logging.ERROR, logger_name: str = "PyPrimeMesh"): + def __init__(self, level: int = logging.WARNING, logger_name: str = "PyPrimeMesh"): """Logger initializer.""" self._logger = logging.getLogger(logger_name) self._logger.setLevel(level) diff --git a/src/ansys/meshing/prime/params/primestructs.py b/src/ansys/meshing/prime/params/primestructs.py index 44b223fb5d..b05a02bbfb 100644 --- a/src/ansys/meshing/prime/params/primestructs.py +++ b/src/ansys/meshing/prime/params/primestructs.py @@ -45,6 +45,7 @@ from ansys.meshing.prime.autogen.periodiccontrolstructs import * from ansys.meshing.prime.autogen.prismcontrolstructs import * from ansys.meshing.prime.autogen.scaffolderstructs import * +from ansys.meshing.prime.autogen.shellblcontrolstructs import * from ansys.meshing.prime.autogen.sizecontrolstructs import * from ansys.meshing.prime.autogen.sizefieldstructs import * from ansys.meshing.prime.autogen.splittoolstructs import *