Skip to content

Commit

Permalink
MAINT: update code from ADO 0.7.0.dev20 (#934)
Browse files Browse the repository at this point in the history
Co-authored-by: pyansys-ci-bot <[email protected]>
  • Loading branch information
rchopade7 and pyansys-ci-bot authored Nov 8, 2024
1 parent a5af946 commit 8962ade
Show file tree
Hide file tree
Showing 14 changed files with 172 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

env:
DOCKER_IMAGE_NAME: ghcr.io/ansys/prime
DOCKER_IMAGE_TAG: '25.1.0.dev19'
DOCKER_IMAGE_TAG: '25.1.0.dev20'
MAIN_PYTHON_VERSION: '3.10'
PACKAGE_NAME: 'ansys-meshing-prime'
PACKAGE_NAMESPACE: 'ansys.meshing.prime'
Expand Down
1 change: 1 addition & 0 deletions doc/changelog.d/934.maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MAINT: update code from ADO 0.7.0.dev20
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"

[project]
name = "ansys-meshing-prime"
version = "0.7.0.dev19"
version = "0.7.0.dev20"
description = "PyPrimeMesh is a Python client to Ansys Prime Server, which delivers core Ansys meshing technology."
readme = "README.md"
requires-python = ">=3.10,<4"
Expand Down
6 changes: 6 additions & 0 deletions src/ansys/meshing/prime/autogen/igastructs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,8 @@ class QuadToSplineParams(CoreObject):
**This is a beta parameter**. **The behavior and name may change in the future**.
zone_name_shell_thickness_pairs: Dict[str, Union[str, int, float, bool]], optional
Zone name and thickness pair list. For example, {"Zone1Name": Zone1Thickness, "Zone2Name": Zone2Thickness, ...}.
**This is a beta parameter**. **The behavior and name may change in the future**.
project_on_geometry: bool, optional
Option to project on geometry.
Expand Down Expand Up @@ -1161,6 +1163,8 @@ def __init__(
**This is a beta parameter**. **The behavior and name may change in the future**.
zone_name_shell_thickness_pairs: Dict[str, Union[str, int, float, bool]], optional
Zone name and thickness pair list. For example, {"Zone1Name": Zone1Thickness, "Zone2Name": Zone2Thickness, ...}.
**This is a beta parameter**. **The behavior and name may change in the future**.
project_on_geometry: bool, optional
Option to project on geometry.
Expand Down Expand Up @@ -1387,6 +1391,8 @@ def separate_by_zone(self, value: bool):
@property
def zone_name_shell_thickness_pairs(self) -> Dict[str, Union[str, int, float, bool]]:
"""Zone name and thickness pair list. For example, {"Zone1Name": Zone1Thickness, "Zone2Name": Zone2Thickness, ...}.
**This is a beta parameter**. **The behavior and name may change in the future**.
"""
return self._zone_name_shell_thickness_pairs

Expand Down
7 changes: 5 additions & 2 deletions src/ansys/meshing/prime/autogen/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ def set_suggested_size_field_name(self, size_field_id : int, name : str) -> SetN
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
Expand All @@ -316,7 +317,8 @@ def get_size_field_name(self, size_field_id : int) -> str:
-------
str
Returns the name of the size field.
Notes
-----
**This is a beta API**. **The behavior and implementation may change in future**.
Expand Down Expand Up @@ -604,7 +606,8 @@ def set_working_directory(self, path : str):
Examples
--------
>>> model = prime.local_model
>>> client = prime.launch_prime()
>>> model = client.model
>>> zones = model.set_working_directory("C:/input_files")
"""
Expand Down
2 changes: 2 additions & 0 deletions src/ansys/meshing/prime/autogen/primeconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,8 @@ class WarningCode(enum.IntEnum):
"""Writing of contact pairs skipped."""
WRITINGTIESSKIPPED = 11103
"""Writing of ties skipped."""
WRITINGZONELETOFLABELTOELEMENTCOMPONENTSKIPPED = 11104
"""Writing of zonelet skipped while exporting label as element component."""
VT_SKIPPEDPROTECTEDENTITIES = 100001
"""Input contains protected entities which have been skipped.
Expand Down
24 changes: 24 additions & 0 deletions src/ansys/meshing/prime/autogen/shellblcontrolstructs.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,20 @@ class ShellBLControlGrowthParams(CoreObject):
Model to create a ``ShellBLControlGrowthParams`` object with default parameters.
n_layers: int, optional
Number of layers to be generated.
**This is a beta parameter**. **The behavior and name may change in the future**.
offset_type: ShellBLOffsetType, optional
Offset type for ShellBL.
**This is a beta parameter**. **The behavior and name may change in the future**.
growth_rate: float, optional
Ratio of heights of current layer to previous layer.
**This is a beta parameter**. **The behavior and name may change in the future**.
first_height: float, optional
Height of first layer of ShellBL.
**This is a beta parameter**. **The behavior and name may change in the future**.
json_data: dict, optional
JSON dictionary to create a ``ShellBLControlGrowthParams`` object with provided parameters.
Expand Down Expand Up @@ -82,12 +90,20 @@ def __init__(
Model to create a ``ShellBLControlGrowthParams`` object with default parameters.
n_layers: int, optional
Number of layers to be generated.
**This is a beta parameter**. **The behavior and name may change in the future**.
offset_type: ShellBLOffsetType, optional
Offset type for ShellBL.
**This is a beta parameter**. **The behavior and name may change in the future**.
growth_rate: float, optional
Ratio of heights of current layer to previous layer.
**This is a beta parameter**. **The behavior and name may change in the future**.
first_height: float, optional
Height of first layer of ShellBL.
**This is a beta parameter**. **The behavior and name may change in the future**.
json_data: dict, optional
JSON dictionary to create a ``ShellBLControlGrowthParams`` object with provided parameters.
Expand Down Expand Up @@ -182,6 +198,8 @@ def __str__(self) -> str:
@property
def n_layers(self) -> int:
"""Number of layers to be generated.
**This is a beta parameter**. **The behavior and name may change in the future**.
"""
return self._n_layers

Expand All @@ -192,6 +210,8 @@ def n_layers(self, value: int):
@property
def offset_type(self) -> ShellBLOffsetType:
"""Offset type for ShellBL.
**This is a beta parameter**. **The behavior and name may change in the future**.
"""
return self._offset_type

Expand All @@ -202,6 +222,8 @@ def offset_type(self, value: ShellBLOffsetType):
@property
def growth_rate(self) -> float:
"""Ratio of heights of current layer to previous layer.
**This is a beta parameter**. **The behavior and name may change in the future**.
"""
return self._growth_rate

Expand All @@ -212,6 +234,8 @@ def growth_rate(self, value: float):
@property
def first_height(self) -> float:
"""Height of first layer of ShellBL.
**This is a beta parameter**. **The behavior and name may change in the future**.
"""
return self._first_height

Expand Down
20 changes: 10 additions & 10 deletions src/ansys/meshing/prime/autogen/surfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,17 +194,17 @@ def remesh_face_zonelets_locally(self, face_zonelets : Iterable[int], register_i
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:
def create_shell_bl_using_controls(self, part_id : int, shell_bl_control_ids : Iterable[int], shell_bl_params : ShellBLParams) -> CreateShellBLResults:
""" Creates ShellBL using data stored in controls.
Parameters
----------
part_id : int
Id of the part.
shellbl_control_ids : Iterable[int]
shell_bl_control_ids : Iterable[int]
Ids of ShellBL control.
shellbl_params : ShellBLParams
shell_bl_params : ShellBLParams
Parameters related to ShellBL.
Returns
Expand All @@ -219,18 +219,18 @@ def create_shell_bl_using_controls(self, part_id : int, shellbl_control_ids : It
Examples
--------
>>> results = surfer.create_shellbl_using_controls(part_id,shellbl_control_ids,shellbl_params)
>>> results = surfer.create_shell_bl_using_controls(part_id,shell_bl_control_ids,shell_bl_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.")
if not isinstance(shell_bl_control_ids, Iterable):
raise TypeError("Invalid argument type passed for 'shell_bl_control_ids'. Valid argument type is Iterable[int].")
if not isinstance(shell_bl_params, ShellBLParams):
raise TypeError("Invalid argument type passed for 'shell_bl_params'. Valid argument type is ShellBLParams.")
args = {"part_id" : part_id,
"shellbl_control_ids" : shellbl_control_ids,
"shellbl_params" : shellbl_params._jsonify()}
"shell_bl_control_ids" : shell_bl_control_ids,
"shell_bl_params" : shell_bl_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)
Expand Down
10 changes: 9 additions & 1 deletion src/ansys/meshing/prime/autogen/toposearchstructs.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,15 @@ class TopoSearchField(enum.IntEnum):
"""Diagnoses topofaces with small topoedges.
**This is a beta parameter**. **The behavior and name may change in the future**."""
NUMBEROFFIELDS = 7
INCORRECTBOUNDARYORIENTATIONTOPOFACES = 7
"""Diagnoses topofaces with incorrect boundary orientations.
**This is a beta parameter**. **The behavior and name may change in the future**."""
INCONSISTENTNORMALORIENTATIONTOPOFACES = 8
"""Diagnoses topofaces with inconsistent normal orientations.
**This is a beta parameter**. **The behavior and name may change in the future**."""
NUMBEROFFIELDS = 9
"""Diagnoses all topofaces.
**This is a beta parameter**. **The behavior and name may change in the future**."""
7 changes: 3 additions & 4 deletions src/ansys/meshing/prime/core/fileio.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,11 +631,10 @@ def import_cad(self, file_name: str, params: ImportCadParams) -> ImportCadResult
Examples
--------
>>> 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
>>> prime_client = prime.launch_prime()
>>> model = prime_client.model
>>> file_io = prime.FileIO(model=model)
>>> params = prime.ImportCadParams(model=model)
>>> params = prime.ImportCadParams(model=model)
>>> results = file_io.import_cad("/tmp/my_cad.x_t", params=params)
"""
Expand Down
Loading

0 comments on commit 8962ade

Please sign in to comment.