From 6a5047d3884b11391eb40445de6bbdcccdd69b76 Mon Sep 17 00:00:00 2001 From: rchopade7 <163139281+rchopade7@users.noreply.github.com> Date: Fri, 15 Mar 2024 19:58:05 +0530 Subject: [PATCH] MAINT: Update code from ADO - 0.6.0.dev4 (#739) Co-authored-by: srpyprime <94401560+srpyprime@users.noreply.github.com> Co-authored-by: Kathy Pippert <84872299+PipKat@users.noreply.github.com> --- .github/workflows/ci_cd.yml | 2 +- pyproject.toml | 2 +- .../meshing/prime/autogen/connectstructs.py | 230 ++++---- .../meshing/prime/autogen/fileiostructs.py | 338 ++++++------ .../meshing/prime/autogen/primeconfig.py | 33 +- .../meshing/prime/autogen/surfaceutilities.py | 103 ++-- .../prime/autogen/surfaceutilitystructs.py | 495 +++++++++++++----- .../meshing/prime/internals/error_handling.py | 28 +- 8 files changed, 777 insertions(+), 454 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index e799f3477d..42f053e015 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: '24.2.0.dev2' + DOCKER_IMAGE_TAG: '24.2.0.dev4' MAIN_PYTHON_VERSION: '3.9' PACKAGE_NAME: 'ansys-meshing-prime' PACKAGE_NAMESPACE: 'ansys.meshing.prime' diff --git a/pyproject.toml b/pyproject.toml index 04b78870f7..c6e6ecb67d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi" [project] name = "ansys-meshing-prime" -version = "0.6.0.dev2" +version = "0.6.0.dev4" description = "PyPrimeMesh is a Python client to Ansys Prime Server, which delivers core Ansys meshing technology." readme = "README.md" requires-python = ">=3.8,<4" diff --git a/src/ansys/meshing/prime/autogen/connectstructs.py b/src/ansys/meshing/prime/autogen/connectstructs.py index 5c3174073f..2594cfd332 100644 --- a/src/ansys/meshing/prime/autogen/connectstructs.py +++ b/src/ansys/meshing/prime/autogen/connectstructs.py @@ -63,18 +63,18 @@ def __init__( zone_id1: int = None, json_data : dict = None, **kwargs): - """Initializes the OverlapPairs. + """Initialize a ``OverlapPairs`` object. Parameters ---------- model: Model - Model to create a OverlapPairs object with default parameters. + Model to create a ``OverlapPairs`` object with default parameters. zone_id0: int, optional Id of one overlapping face zonelet. zone_id1: int, optional Id of other overlapping face zonelet. json_data: dict, optional - JSON dictionary to create a OverlapPairs object with provided parameters. + JSON dictionary to create a ``OverlapPairs`` object with provided parameters. Examples -------- @@ -92,7 +92,7 @@ def __init__( zone_id1) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "OverlapPairs") json_data = param_json["OverlapPairs"] if "OverlapPairs" in param_json else {} @@ -110,7 +110,7 @@ def __init__( def set_default( zone_id0: int = None, zone_id1: int = None): - """Set the default values of OverlapPairs. + """Set the default values of the ``OverlapPairs`` object. Parameters ---------- @@ -124,7 +124,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of OverlapPairs. + """Print the default values of ``OverlapPairs`` object. Examples -------- @@ -190,12 +190,12 @@ def __init__( error_code: ErrorCode = None, json_data : dict = None, **kwargs): - """Initializes the OverlapSearchResults. + """Initialize a ``OverlapSearchResults`` object. Parameters ---------- model: Model - Model to create a OverlapSearchResults object with default parameters. + Model to create a ``OverlapSearchResults`` object with default parameters. n_pairs: int, optional Number of pairs. overlap_pairs: List[OverlapPairs], optional @@ -203,7 +203,7 @@ def __init__( error_code: ErrorCode, optional Error Code associated with failure of operation. json_data: dict, optional - JSON dictionary to create a OverlapSearchResults object with provided parameters. + JSON dictionary to create a ``OverlapSearchResults`` object with provided parameters. Examples -------- @@ -223,7 +223,7 @@ def __init__( error_code) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "OverlapSearchResults") json_data = param_json["OverlapSearchResults"] if "OverlapSearchResults" in param_json else {} @@ -243,7 +243,7 @@ def set_default( n_pairs: int = None, overlap_pairs: List[OverlapPairs] = None, error_code: ErrorCode = None): - """Set the default values of OverlapSearchResults. + """Set the default values of the ``OverlapSearchResults`` object. Parameters ---------- @@ -259,7 +259,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of OverlapSearchResults. + """Print the default values of ``OverlapSearchResults`` object. Examples -------- @@ -334,18 +334,18 @@ def __init__( warning_codes: List[WarningCode] = None, json_data : dict = None, **kwargs): - """Initializes the ConnectResults. + """Initialize a ``ConnectResults`` object. Parameters ---------- model: Model - Model to create a ConnectResults object with default parameters. + Model to create a ``ConnectResults`` object with default parameters. error_code: ErrorCode, optional Error Code associated with failure of operation. warning_codes: List[WarningCode], optional Warning codes associated with the operation. json_data: dict, optional - JSON dictionary to create a ConnectResults object with provided parameters. + JSON dictionary to create a ``ConnectResults`` object with provided parameters. Examples -------- @@ -363,7 +363,7 @@ def __init__( warning_codes) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "ConnectResults") json_data = param_json["ConnectResults"] if "ConnectResults" in param_json else {} @@ -381,7 +381,7 @@ def __init__( def set_default( error_code: ErrorCode = None, warning_codes: List[WarningCode] = None): - """Set the default values of ConnectResults. + """Set the default values of the ``ConnectResults`` object. Parameters ---------- @@ -395,7 +395,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of ConnectResults. + """Print the default values of ``ConnectResults`` object. Examples -------- @@ -467,12 +467,12 @@ def __init__( collapse_target_skewness: float = None, json_data : dict = None, **kwargs): - """Initializes the IntersectParams. + """Initialize a ``IntersectParams`` object. Parameters ---------- model: Model - Model to create a IntersectParams object with default parameters. + Model to create a ``IntersectParams`` object with default parameters. tolerance: float, optional Intersection tolerance. use_absolute_tolerance: bool, optional @@ -484,7 +484,7 @@ def __init__( collapse_target_skewness: float, optional Perform collapse on faces with skewness above the provided target skewness. json_data: dict, optional - JSON dictionary to create a IntersectParams object with provided parameters. + JSON dictionary to create a ``IntersectParams`` object with provided parameters. Examples -------- @@ -508,7 +508,7 @@ def __init__( collapse_target_skewness) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "IntersectParams") json_data = param_json["IntersectParams"] if "IntersectParams" in param_json else {} @@ -532,7 +532,7 @@ def set_default( remesh: bool = None, collapse_feature_angle: float = None, collapse_target_skewness: float = None): - """Set the default values of IntersectParams. + """Set the default values of the ``IntersectParams`` object. Parameters ---------- @@ -552,7 +552,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of IntersectParams. + """Print the default values of ``IntersectParams`` object. Examples -------- @@ -660,12 +660,12 @@ def __init__( overlap_zone_name: str = None, json_data : dict = None, **kwargs): - """Initializes the JoinParams. + """Initialize a ``JoinParams`` object. Parameters ---------- model: Model - Model to create a JoinParams object with default parameters. + Model to create a ``JoinParams`` object with default parameters. tolerance: float, optional Overlap tolerance between overlapping zonelets. use_absolute_tolerance: bool, optional @@ -677,7 +677,7 @@ def __init__( overlap_zone_name: str, optional Zone id to be assigned to overlap zonelets belonging to different zones. json_data: dict, optional - JSON dictionary to create a JoinParams object with provided parameters. + JSON dictionary to create a ``JoinParams`` object with provided parameters. Examples -------- @@ -701,7 +701,7 @@ def __init__( overlap_zone_name) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "JoinParams") json_data = param_json["JoinParams"] if "JoinParams" in param_json else {} @@ -725,7 +725,7 @@ def set_default( remesh: bool = None, match_angle: float = None, overlap_zone_name: str = None): - """Set the default values of JoinParams. + """Set the default values of the ``JoinParams`` object. Parameters ---------- @@ -745,7 +745,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of JoinParams. + """Print the default values of ``JoinParams`` object. Examples -------- @@ -847,21 +847,21 @@ def __init__( keep_cutters: bool = None, json_data : dict = None, **kwargs): - """Initializes the SubtractVolumesParams. + """Initialize a ``SubtractVolumesParams`` object. Parameters ---------- model: Model - Model to create a SubtractVolumesParams object with default parameters. + Model to create a ``SubtractVolumesParams`` object with default parameters. 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 analyze overlapping or intersecting cutter volumes. keep_cutters: bool, optional Option to retain cutter volumes. - This parameter is a Beta. Parameter behavior and name may change in future. + This is a beta parameter. The behavior and name may change in the future. json_data: dict, optional - JSON dictionary to create a SubtractVolumesParams object with provided parameters. + JSON dictionary to create a ``SubtractVolumesParams`` object with provided parameters. Examples -------- @@ -881,7 +881,7 @@ def __init__( keep_cutters) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "SubtractVolumesParams") json_data = param_json["SubtractVolumesParams"] if "SubtractVolumesParams" in param_json else {} @@ -901,7 +901,7 @@ def set_default( ignore_face_zonelets: Iterable[int] = None, check_cutters: bool = None, keep_cutters: bool = None): - """Set the default values of SubtractVolumesParams. + """Set the default values of the ``SubtractVolumesParams`` object. Parameters ---------- @@ -917,7 +917,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of SubtractVolumesParams. + """Print the default values of ``SubtractVolumesParams`` object. Examples -------- @@ -966,7 +966,7 @@ def check_cutters(self, value: bool): @property def keep_cutters(self) -> bool: """Option to retain cutter volumes. - This parameter is a Beta. Parameter behavior and name may change in future. + This is a beta parameter. The behavior and name may change in the future. """ return self._keep_cutters @@ -993,18 +993,18 @@ def __init__( warning_codes: List[WarningCode] = None, json_data : dict = None, **kwargs): - """Initializes the SubtractVolumesResults. + """Initialize a ``SubtractVolumesResults`` object. Parameters ---------- model: Model - Model to create a SubtractVolumesResults object with default parameters. + Model to create a ``SubtractVolumesResults`` object with default parameters. error_code: ErrorCode, optional Error code associated with the volume subtract operation. warning_codes: List[WarningCode], optional Warning codes associated with the volume subtract operation. json_data: dict, optional - JSON dictionary to create a SubtractVolumesResults object with provided parameters. + JSON dictionary to create a ``SubtractVolumesResults`` object with provided parameters. Examples -------- @@ -1022,7 +1022,7 @@ def __init__( warning_codes) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "SubtractVolumesResults") json_data = param_json["SubtractVolumesResults"] if "SubtractVolumesResults" in param_json else {} @@ -1040,7 +1040,7 @@ def __init__( def set_default( error_code: ErrorCode = None, warning_codes: List[WarningCode] = None): - """Set the default values of SubtractVolumesResults. + """Set the default values of the ``SubtractVolumesResults`` object. Parameters ---------- @@ -1054,7 +1054,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of SubtractVolumesResults. + """Print the default values of ``SubtractVolumesResults`` object. Examples -------- @@ -1126,12 +1126,12 @@ def __init__( type: StitchType = None, json_data : dict = None, **kwargs): - """Initializes the StitchParams. + """Initialize a ``StitchParams`` object. Parameters ---------- model: Model - Model to create a StitchParams object with default parameters. + Model to create a ``StitchParams`` object with default parameters. tolerance: float, optional Distance tolerance for stitching boundaries. use_absolute_tolerance: bool, optional @@ -1143,7 +1143,7 @@ def __init__( type: StitchType, optional Stitch type depending on nature of surface boundary edges to be stitched. json_data: dict, optional - JSON dictionary to create a StitchParams object with provided parameters. + JSON dictionary to create a ``StitchParams`` object with provided parameters. Examples -------- @@ -1167,7 +1167,7 @@ def __init__( type) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "StitchParams") json_data = param_json["StitchParams"] if "StitchParams" in param_json else {} @@ -1191,7 +1191,7 @@ def set_default( remesh: bool = None, enable_multi_threading: bool = None, type: StitchType = None): - """Set the default values of StitchParams. + """Set the default values of the ``StitchParams`` object. Parameters ---------- @@ -1211,7 +1211,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of StitchParams. + """Print the default values of ``StitchParams`` object. Examples -------- @@ -1313,17 +1313,17 @@ def __init__( merge_node_type: MergeNodeType = None, json_data : dict = None, **kwargs): - """Initializes the MergeBoundaryNodesParams. + """Initialize a ``MergeBoundaryNodesParams`` object. Parameters ---------- model: Model - Model to create a MergeBoundaryNodesParams object with default parameters. + Model to create a ``MergeBoundaryNodesParams`` object with default parameters. tolerance: float, optional use_absolute_tolerance: bool, optional merge_node_type: MergeNodeType, optional json_data: dict, optional - JSON dictionary to create a MergeBoundaryNodesParams object with provided parameters. + JSON dictionary to create a ``MergeBoundaryNodesParams`` object with provided parameters. Examples -------- @@ -1343,7 +1343,7 @@ def __init__( merge_node_type) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "MergeBoundaryNodesParams") json_data = param_json["MergeBoundaryNodesParams"] if "MergeBoundaryNodesParams" in param_json else {} @@ -1363,7 +1363,7 @@ def set_default( tolerance: float = None, use_absolute_tolerance: bool = None, merge_node_type: MergeNodeType = None): - """Set the default values of MergeBoundaryNodesParams. + """Set the default values of the ``MergeBoundaryNodesParams`` object. Parameters ---------- @@ -1376,7 +1376,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of MergeBoundaryNodesParams. + """Print the default values of ``MergeBoundaryNodesParams`` object. Examples -------- @@ -1451,16 +1451,16 @@ def __init__( error_code: ErrorCode = None, json_data : dict = None, **kwargs): - """Initializes the MergeBoundaryNodesResults. + """Initialize a ``MergeBoundaryNodesResults`` object. Parameters ---------- model: Model - Model to create a MergeBoundaryNodesResults object with default parameters. + Model to create a ``MergeBoundaryNodesResults`` object with default parameters. error_code: ErrorCode, optional Error Code associated with failure of merge nodes operation. json_data: dict, optional - JSON dictionary to create a MergeBoundaryNodesResults object with provided parameters. + JSON dictionary to create a ``MergeBoundaryNodesResults`` object with provided parameters. Examples -------- @@ -1476,7 +1476,7 @@ def __init__( error_code) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "MergeBoundaryNodesResults") json_data = param_json["MergeBoundaryNodesResults"] if "MergeBoundaryNodesResults" in param_json else {} @@ -1492,7 +1492,7 @@ def __init__( @staticmethod def set_default( error_code: ErrorCode = None): - """Set the default values of MergeBoundaryNodesResults. + """Set the default values of the ``MergeBoundaryNodesResults`` object. Parameters ---------- @@ -1504,7 +1504,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of MergeBoundaryNodesResults. + """Print the default values of ``MergeBoundaryNodesResults`` object. Examples -------- @@ -1585,12 +1585,12 @@ def __init__( fuse_edges_only: bool = None, json_data : dict = None, **kwargs): - """Initializes the FuseParams. + """Initialize a ``FuseParams`` object. Parameters ---------- model: Model - Model to create a FuseParams object with default parameters. + Model to create a ``FuseParams`` object with default parameters. use_absolute_tolerance: bool, optional When true, gap tolerance and side tolerance provided are absolute values. gap_tolerance: float, optional @@ -1615,9 +1615,9 @@ def __init__( Faces zonelets with angle less than the provided value are considered for fuse operation. fuse_edges_only: bool, optional Fuse edges only. - This parameter is a Beta. Parameter behavior and name may change in future. + This is a beta parameter. The behavior and name may change in the future. json_data: dict, optional - JSON dictionary to create a FuseParams object with provided parameters. + JSON dictionary to create a ``FuseParams`` object with provided parameters. Examples -------- @@ -1655,7 +1655,7 @@ def __init__( fuse_edges_only) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "FuseParams") json_data = param_json["FuseParams"] if "FuseParams" in param_json else {} @@ -1693,7 +1693,7 @@ def set_default( separate: bool = None, angle: float = None, fuse_edges_only: bool = None): - """Set the default values of FuseParams. + """Set the default values of the ``FuseParams`` object. Parameters ---------- @@ -1727,7 +1727,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of FuseParams. + """Print the default values of ``FuseParams`` object. Examples -------- @@ -1884,7 +1884,7 @@ def angle(self, value: float): @property def fuse_edges_only(self) -> bool: """Fuse edges only. - This parameter is a Beta. Parameter behavior and name may change in future. + This is a beta parameter. The behavior and name may change in the future. """ return self._fuse_edges_only @@ -1901,10 +1901,14 @@ def __initialize( self, fused_pairs: int, fused_area: float, - error_code: ErrorCode): + error_code: ErrorCode, + warning_codes: List[WarningCode], + intersecting_locations: Iterable[float]): self._fused_pairs = fused_pairs self._fused_area = fused_area self._error_code = ErrorCode(error_code) + self._warning_codes = warning_codes + self._intersecting_locations = intersecting_locations if isinstance(intersecting_locations, np.ndarray) else np.array(intersecting_locations, dtype=np.double) if intersecting_locations is not None else None def __init__( self, @@ -1912,22 +1916,28 @@ def __init__( fused_pairs: int = None, fused_area: float = None, error_code: ErrorCode = None, + warning_codes: List[WarningCode] = None, + intersecting_locations: Iterable[float] = None, json_data : dict = None, **kwargs): - """Initializes the FuseResults. + """Initialize a ``FuseResults`` object. Parameters ---------- model: Model - Model to create a FuseResults object with default parameters. + Model to create a ``FuseResults`` object with default parameters. fused_pairs: int, optional - The number of face region pairs that were fused. + Number of face region pairs that were fused. fused_area: float, optional - The total area of fused regions from both source and target faces. + Total area of fused regions from both source and target faces. error_code: ErrorCode, optional - Error Code associated with failure of fuse operation. + Error code associated with failure of the fuse operation. + warning_codes: List[WarningCode], optional + Warning codes associated with the fuse operation. + intersecting_locations: Iterable[float], optional + Locations where the fuse operation did not remove self-intersections in the input. Each location corresponds to a patch of faces where self-intersections exist. The number of elements in intersecting locations are in multiples of three. For example, zero, three, six, nine, and so on. Each triplet corresponds to coordinates in x, y, and z. For example, if the intersecting locations contain (a, b, c, d, e, f), then (a, b, c) represent the first location and (d, e, f) represent the second location. json_data: dict, optional - JSON dictionary to create a FuseResults object with provided parameters. + JSON dictionary to create a ``FuseResults`` object with provided parameters. Examples -------- @@ -1937,24 +1947,30 @@ def __init__( self.__initialize( json_data["fusedPairs"] if "fusedPairs" in json_data else None, json_data["fusedArea"] if "fusedArea" in json_data else None, - ErrorCode(json_data["errorCode"] if "errorCode" in json_data else None)) + 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, + json_data["intersectingLocations"] if "intersectingLocations" in json_data else None) else: - all_field_specified = all(arg is not None for arg in [fused_pairs, fused_area, error_code]) + all_field_specified = all(arg is not None for arg in [fused_pairs, fused_area, error_code, warning_codes, intersecting_locations]) if all_field_specified: self.__initialize( fused_pairs, fused_area, - error_code) + error_code, + warning_codes, + intersecting_locations) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "FuseResults") json_data = param_json["FuseResults"] if "FuseResults" in param_json else {} self.__initialize( fused_pairs if fused_pairs is not None else ( FuseResults._default_params["fused_pairs"] if "fused_pairs" in FuseResults._default_params else (json_data["fusedPairs"] if "fusedPairs" in json_data else None)), fused_area if fused_area is not None else ( FuseResults._default_params["fused_area"] if "fused_area" in FuseResults._default_params else (json_data["fusedArea"] if "fusedArea" in json_data else None)), - error_code if error_code is not None else ( FuseResults._default_params["error_code"] if "error_code" in FuseResults._default_params else ErrorCode(json_data["errorCode"] if "errorCode" in json_data else None))) + error_code if error_code is not None else ( FuseResults._default_params["error_code"] if "error_code" in FuseResults._default_params else ErrorCode(json_data["errorCode"] if "errorCode" in json_data else None)), + warning_codes if warning_codes is not None else ( FuseResults._default_params["warning_codes"] if "warning_codes" in FuseResults._default_params else [WarningCode(data) for data in (json_data["warningCodes"] if "warningCodes" in json_data else None)]), + intersecting_locations if intersecting_locations is not None else ( FuseResults._default_params["intersecting_locations"] if "intersecting_locations" in FuseResults._default_params else (json_data["intersectingLocations"] if "intersectingLocations" 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 ] @@ -1966,24 +1982,30 @@ def __init__( def set_default( fused_pairs: int = None, fused_area: float = None, - error_code: ErrorCode = None): - """Set the default values of FuseResults. + error_code: ErrorCode = None, + warning_codes: List[WarningCode] = None, + intersecting_locations: Iterable[float] = None): + """Set the default values of the ``FuseResults`` object. Parameters ---------- fused_pairs: int, optional - The number of face region pairs that were fused. + Number of face region pairs that were fused. fused_area: float, optional - The total area of fused regions from both source and target faces. + Total area of fused regions from both source and target faces. error_code: ErrorCode, optional - Error Code associated with failure of fuse operation. + Error code associated with failure of the fuse operation. + warning_codes: List[WarningCode], optional + Warning codes associated with the fuse operation. + intersecting_locations: Iterable[float], optional + Locations where the fuse operation did not remove self-intersections in the input. Each location corresponds to a patch of faces where self-intersections exist. The number of elements in intersecting locations are in multiples of three. For example, zero, three, six, nine, and so on. Each triplet corresponds to coordinates in x, y, and z. For example, if the intersecting locations contain (a, b, c, d, e, f), then (a, b, c) represent the first location and (d, e, f) represent the second location. """ args = locals() [FuseResults._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 FuseResults. + """Print the default values of ``FuseResults`` object. Examples -------- @@ -2001,17 +2023,21 @@ def _jsonify(self) -> Dict[str, Any]: json_data["fusedArea"] = self._fused_area 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] + if self._intersecting_locations is not None: + json_data["intersectingLocations"] = self._intersecting_locations [ 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 = "fused_pairs : %s\nfused_area : %s\nerror_code : %s" % (self._fused_pairs, self._fused_area, self._error_code) + message = "fused_pairs : %s\nfused_area : %s\nerror_code : %s\nwarning_codes : %s\nintersecting_locations : %s" % (self._fused_pairs, self._fused_area, self._error_code, '[' + ''.join('\n' + str(data) for data in self._warning_codes) + ']', self._intersecting_locations) message += ''.join('\n' + str(key) + ' : ' + str(value) for key, value in self._custom_params.items()) return message @property def fused_pairs(self) -> int: - """The number of face region pairs that were fused. + """Number of face region pairs that were fused. """ return self._fused_pairs @@ -2021,7 +2047,7 @@ def fused_pairs(self, value: int): @property def fused_area(self) -> float: - """The total area of fused regions from both source and target faces. + """Total area of fused regions from both source and target faces. """ return self._fused_area @@ -2031,10 +2057,30 @@ def fused_area(self, value: float): @property def error_code(self) -> ErrorCode: - """Error Code associated with failure of fuse operation. + """Error code associated with failure of the fuse operation. """ 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 fuse operation. + """ + return self._warning_codes + + @warning_codes.setter + def warning_codes(self, value: List[WarningCode]): + self._warning_codes = value + + @property + def intersecting_locations(self) -> Iterable[float]: + """Locations where the fuse operation did not remove self-intersections in the input. Each location corresponds to a patch of faces where self-intersections exist. The number of elements in intersecting locations are in multiples of three. For example, zero, three, six, nine, and so on. Each triplet corresponds to coordinates in x, y, and z. For example, if the intersecting locations contain (a, b, c, d, e, f), then (a, b, c) represent the first location and (d, e, f) represent the second location. + """ + return self._intersecting_locations + + @intersecting_locations.setter + def intersecting_locations(self, value: Iterable[float]): + self._intersecting_locations = value diff --git a/src/ansys/meshing/prime/autogen/fileiostructs.py b/src/ansys/meshing/prime/autogen/fileiostructs.py index 2d4084fbc5..2ef86d4190 100644 --- a/src/ansys/meshing/prime/autogen/fileiostructs.py +++ b/src/ansys/meshing/prime/autogen/fileiostructs.py @@ -106,16 +106,16 @@ def __init__( append: bool = None, json_data : dict = None, **kwargs): - """Initializes the FileReadParams. + """Initialize a ``FileReadParams`` object. Parameters ---------- model: Model - Model to create a FileReadParams object with default parameters. + Model to create a ``FileReadParams`` object with default parameters. append: bool, optional Option to append imported mesh to existing mesh instead of resetting model to imported mesh. json_data: dict, optional - JSON dictionary to create a FileReadParams object with provided parameters. + JSON dictionary to create a ``FileReadParams`` object with provided parameters. Examples -------- @@ -131,7 +131,7 @@ def __init__( append) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "FileReadParams") json_data = param_json["FileReadParams"] if "FileReadParams" in param_json else {} @@ -147,7 +147,7 @@ def __init__( @staticmethod def set_default( append: bool = None): - """Set the default values of FileReadParams. + """Set the default values of the ``FileReadParams`` object. Parameters ---------- @@ -159,7 +159,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of FileReadParams. + """Print the default values of ``FileReadParams`` object. Examples -------- @@ -210,18 +210,18 @@ def __init__( size_field_ids: Iterable[int] = None, json_data : dict = None, **kwargs): - """Initializes the SizeFieldFileReadResults. + """Initialize a ``SizeFieldFileReadResults`` object. Parameters ---------- model: Model - Model to create a SizeFieldFileReadResults object with default parameters. + Model to create a ``SizeFieldFileReadResults`` object with default parameters. error_code: ErrorCode, optional Error code if size field file read operation was unsuccessful. size_field_ids: Iterable[int], optional Ids of size fields read by read size field operation. json_data: dict, optional - JSON dictionary to create a SizeFieldFileReadResults object with provided parameters. + JSON dictionary to create a ``SizeFieldFileReadResults`` object with provided parameters. Examples -------- @@ -239,7 +239,7 @@ def __init__( size_field_ids) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "SizeFieldFileReadResults") json_data = param_json["SizeFieldFileReadResults"] if "SizeFieldFileReadResults" in param_json else {} @@ -257,7 +257,7 @@ def __init__( def set_default( error_code: ErrorCode = None, size_field_ids: Iterable[int] = None): - """Set the default values of SizeFieldFileReadResults. + """Set the default values of the ``SizeFieldFileReadResults`` object. Parameters ---------- @@ -271,7 +271,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of SizeFieldFileReadResults. + """Print the default values of ``SizeFieldFileReadResults`` object. Examples -------- @@ -331,16 +331,16 @@ def __init__( error_code: ErrorCode = None, json_data : dict = None, **kwargs): - """Initializes the FileReadResults. + """Initialize a ``FileReadResults`` object. Parameters ---------- model: Model - Model to create a FileReadResults object with default parameters. + Model to create a ``FileReadResults`` object with default parameters. error_code: ErrorCode, optional Error code if file read operation was unsuccessful. json_data: dict, optional - JSON dictionary to create a FileReadResults object with provided parameters. + JSON dictionary to create a ``FileReadResults`` object with provided parameters. Examples -------- @@ -356,7 +356,7 @@ def __init__( error_code) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "FileReadResults") json_data = param_json["FileReadResults"] if "FileReadResults" in param_json else {} @@ -372,7 +372,7 @@ def __init__( @staticmethod def set_default( error_code: ErrorCode = None): - """Set the default values of FileReadResults. + """Set the default values of the ``FileReadResults`` object. Parameters ---------- @@ -384,7 +384,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of FileReadResults. + """Print the default values of ``FileReadResults`` object. Examples -------- @@ -430,14 +430,14 @@ def __init__( model: CommunicationManager=None, json_data : dict = None, **kwargs): - """Initializes the FileWriteParams. + """Initialize a ``FileWriteParams`` object. Parameters ---------- model: Model - Model to create a FileWriteParams object with default parameters. + Model to create a ``FileWriteParams`` object with default parameters. json_data: dict, optional - JSON dictionary to create a FileWriteParams object with provided parameters. + JSON dictionary to create a ``FileWriteParams`` object with provided parameters. Examples -------- @@ -451,7 +451,7 @@ def __init__( self.__initialize() else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "FileWriteParams") json_data = param_json["FileWriteParams"] if "FileWriteParams" in param_json else {} @@ -465,7 +465,7 @@ def __init__( @staticmethod def set_default(): - """Set the default values of FileWriteParams. + """Set the default values of the ``FileWriteParams`` object. """ args = locals() @@ -473,7 +473,7 @@ def set_default(): @staticmethod def print_default(): - """Print the default values of FileWriteParams. + """Print the default values of ``FileWriteParams`` object. Examples -------- @@ -514,18 +514,18 @@ def __init__( warning_codes: List[WarningCode] = None, json_data : dict = None, **kwargs): - """Initializes the FileWriteResults. + """Initialize a ``FileWriteResults`` object. Parameters ---------- model: Model - Model to create a FileWriteResults object with default parameters. + Model to create a ``FileWriteResults`` object with default parameters. error_code: ErrorCode, optional Error code if file write operation is unsuccessful. warning_codes: List[WarningCode], optional Warning codes associated with the file write operation. json_data: dict, optional - JSON dictionary to create a FileWriteResults object with provided parameters. + JSON dictionary to create a ``FileWriteResults`` object with provided parameters. Examples -------- @@ -543,7 +543,7 @@ def __init__( warning_codes) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "FileWriteResults") json_data = param_json["FileWriteResults"] if "FileWriteResults" in param_json else {} @@ -561,7 +561,7 @@ def __init__( def set_default( error_code: ErrorCode = None, warning_codes: List[WarningCode] = None): - """Set the default values of FileWriteResults. + """Set the default values of the ``FileWriteResults`` object. Parameters ---------- @@ -575,7 +575,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of FileWriteResults. + """Print the default values of ``FileWriteResults`` object. Examples -------- @@ -635,16 +635,16 @@ def __init__( append: bool = None, json_data : dict = None, **kwargs): - """Initializes the ReadSizeFieldParams. + """Initialize a ``ReadSizeFieldParams`` object. Parameters ---------- model: Model - Model to create a ReadSizeFieldParams object with default parameters. + Model to create a ``ReadSizeFieldParams`` object with default parameters. append: bool, optional Option to append the size fields from file. json_data: dict, optional - JSON dictionary to create a ReadSizeFieldParams object with provided parameters. + JSON dictionary to create a ``ReadSizeFieldParams`` object with provided parameters. Examples -------- @@ -660,7 +660,7 @@ def __init__( append) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "ReadSizeFieldParams") json_data = param_json["ReadSizeFieldParams"] if "ReadSizeFieldParams" in param_json else {} @@ -676,7 +676,7 @@ def __init__( @staticmethod def set_default( append: bool = None): - """Set the default values of ReadSizeFieldParams. + """Set the default values of the ``ReadSizeFieldParams`` object. Parameters ---------- @@ -688,7 +688,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of ReadSizeFieldParams. + """Print the default values of ``ReadSizeFieldParams`` object. Examples -------- @@ -736,16 +736,16 @@ def __init__( write_only_active_size_fields: bool = None, json_data : dict = None, **kwargs): - """Initializes the WriteSizeFieldParams. + """Initialize a ``WriteSizeFieldParams`` object. Parameters ---------- model: Model - Model to create a WriteSizeFieldParams object with default parameters. + Model to create a ``WriteSizeFieldParams`` object with default parameters. write_only_active_size_fields: bool, optional Option to write only active size fields into the file. json_data: dict, optional - JSON dictionary to create a WriteSizeFieldParams object with provided parameters. + JSON dictionary to create a ``WriteSizeFieldParams`` object with provided parameters. Examples -------- @@ -761,7 +761,7 @@ def __init__( write_only_active_size_fields) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "WriteSizeFieldParams") json_data = param_json["WriteSizeFieldParams"] if "WriteSizeFieldParams" in param_json else {} @@ -777,7 +777,7 @@ def __init__( @staticmethod def set_default( write_only_active_size_fields: bool = None): - """Set the default values of WriteSizeFieldParams. + """Set the default values of the ``WriteSizeFieldParams`` object. Parameters ---------- @@ -789,7 +789,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of WriteSizeFieldParams. + """Print the default values of ``WriteSizeFieldParams`` object. Examples -------- @@ -837,16 +837,16 @@ def __init__( cff_format: bool = None, json_data : dict = None, **kwargs): - """Initializes the ExportFluentCaseParams. + """Initialize a ``ExportFluentCaseParams`` object. Parameters ---------- model: Model - Model to create a ExportFluentCaseParams object with default parameters. + Model to create a ``ExportFluentCaseParams`` object with default parameters. cff_format: bool, optional Option to specify whether to export Fluent case file in CFF format (.cas.h5) or legacy format (.cas, .cas.gz). json_data: dict, optional - JSON dictionary to create a ExportFluentCaseParams object with provided parameters. + JSON dictionary to create a ``ExportFluentCaseParams`` object with provided parameters. Examples -------- @@ -862,7 +862,7 @@ def __init__( cff_format) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "ExportFluentCaseParams") json_data = param_json["ExportFluentCaseParams"] if "ExportFluentCaseParams" in param_json else {} @@ -878,7 +878,7 @@ def __init__( @staticmethod def set_default( cff_format: bool = None): - """Set the default values of ExportFluentCaseParams. + """Set the default values of the ``ExportFluentCaseParams`` object. Parameters ---------- @@ -890,7 +890,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of ExportFluentCaseParams. + """Print the default values of ``ExportFluentCaseParams`` object. Examples -------- @@ -936,14 +936,14 @@ def __init__( model: CommunicationManager=None, json_data : dict = None, **kwargs): - """Initializes the ExportFluentMeshingMeshParams. + """Initialize a ``ExportFluentMeshingMeshParams`` object. Parameters ---------- model: Model - Model to create a ExportFluentMeshingMeshParams object with default parameters. + Model to create a ``ExportFluentMeshingMeshParams`` object with default parameters. json_data: dict, optional - JSON dictionary to create a ExportFluentMeshingMeshParams object with provided parameters. + JSON dictionary to create a ``ExportFluentMeshingMeshParams`` object with provided parameters. Examples -------- @@ -957,7 +957,7 @@ def __init__( self.__initialize() else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "ExportFluentMeshingMeshParams") json_data = param_json["ExportFluentMeshingMeshParams"] if "ExportFluentMeshingMeshParams" in param_json else {} @@ -971,7 +971,7 @@ def __init__( @staticmethod def set_default(): - """Set the default values of ExportFluentMeshingMeshParams. + """Set the default values of the ``ExportFluentMeshingMeshParams`` object. """ args = locals() @@ -979,7 +979,7 @@ def set_default(): @staticmethod def print_default(): - """Print the default values of ExportFluentMeshingMeshParams. + """Print the default values of ``ExportFluentMeshingMeshParams`` object. Examples -------- @@ -1017,16 +1017,16 @@ def __init__( part_ids: Iterable[int] = None, json_data : dict = None, **kwargs): - """Initializes the ExportSTLParams. + """Initialize a ``ExportSTLParams`` object. Parameters ---------- model: Model - Model to create a ExportSTLParams object with default parameters. + Model to create a ``ExportSTLParams`` object with default parameters. part_ids: Iterable[int], optional Ids of parts to export. json_data: dict, optional - JSON dictionary to create a ExportSTLParams object with provided parameters. + JSON dictionary to create a ``ExportSTLParams`` object with provided parameters. Examples -------- @@ -1042,7 +1042,7 @@ def __init__( part_ids) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "ExportSTLParams") json_data = param_json["ExportSTLParams"] if "ExportSTLParams" in param_json else {} @@ -1058,7 +1058,7 @@ def __init__( @staticmethod def set_default( part_ids: Iterable[int] = None): - """Set the default values of ExportSTLParams. + """Set the default values of the ``ExportSTLParams`` object. Parameters ---------- @@ -1070,7 +1070,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of ExportSTLParams. + """Print the default values of ``ExportSTLParams`` object. Examples -------- @@ -1133,12 +1133,12 @@ def __init__( max_edge_size: float = None, json_data : dict = None, **kwargs): - """Initializes the CadRefacetingParams. + """Initialize a ``CadRefacetingParams`` object. Parameters ---------- model: Model - Model to create a CadRefacetingParams object with default parameters. + Model to create a ``CadRefacetingParams`` object with default parameters. cad_faceter: CadFaceter, optional Specify the available choices for faceter. The available options are Acis, Parasolid. faceting_resolution: CadRefacetingResolution, optional @@ -1152,7 +1152,7 @@ def __init__( max_edge_size: float, optional Set maximum edge size of the facets. json_data: dict, optional - JSON dictionary to create a CadRefacetingParams object with provided parameters. + JSON dictionary to create a ``CadRefacetingParams`` object with provided parameters. Examples -------- @@ -1178,7 +1178,7 @@ def __init__( max_edge_size) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "CadRefacetingParams") json_data = param_json["CadRefacetingParams"] if "CadRefacetingParams" in param_json else {} @@ -1204,7 +1204,7 @@ def set_default( custom_normal_angle_tolerance: float = None, max_edge_size_limit: CadRefacetingMaxEdgeSizeLimit = None, max_edge_size: float = None): - """Set the default values of CadRefacetingParams. + """Set the default values of the ``CadRefacetingParams`` object. Parameters ---------- @@ -1226,7 +1226,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of CadRefacetingParams. + """Print the default values of ``CadRefacetingParams`` object. Examples -------- @@ -1364,12 +1364,12 @@ def __init__( validate_shared_topology: bool = None, json_data : dict = None, **kwargs): - """Initializes the ImportCadParams. + """Initialize a ``ImportCadParams`` object. Parameters ---------- model: Model - Model to create a ImportCadParams object with default parameters. + Model to create a ``ImportCadParams`` object with default parameters. append: bool, optional Append imported CAD into existing model when true. ansys_release: str, optional @@ -1393,7 +1393,7 @@ def __init__( validate_shared_topology: bool, optional Specify whether to validate the shared topology information. json_data: dict, optional - JSON dictionary to create a ImportCadParams object with provided parameters. + JSON dictionary to create a ``ImportCadParams`` object with provided parameters. Examples -------- @@ -1429,7 +1429,7 @@ def __init__( validate_shared_topology) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "ImportCadParams") json_data = param_json["ImportCadParams"] if "ImportCadParams" in param_json else {} @@ -1465,7 +1465,7 @@ def set_default( stitch_tolerance: float = None, cad_update_parameters: Dict[str, Union[str, int, float, bool]] = None, validate_shared_topology: bool = None): - """Set the default values of ImportCadParams. + """Set the default values of the ``ImportCadParams`` object. Parameters ---------- @@ -1497,7 +1497,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of ImportCadParams. + """Print the default values of ``ImportCadParams`` object. Examples -------- @@ -1668,18 +1668,18 @@ def __init__( cad_parameters: Dict[str, Union[str, int, float, bool]] = None, json_data : dict = None, **kwargs): - """Initializes the ImportCadResults. + """Initialize a ``ImportCadResults`` object. Parameters ---------- model: Model - Model to create a ImportCadResults object with default parameters. + Model to create a ``ImportCadResults`` object with default parameters. error_code: ErrorCode, optional Error code associated with failure of operation. cad_parameters: Dict[str, Union[str, int, float, bool]], optional Returns the parameters associated with CAD. Available only with WorkBench CAD Reader route. json_data: dict, optional - JSON dictionary to create a ImportCadResults object with provided parameters. + JSON dictionary to create a ``ImportCadResults`` object with provided parameters. Examples -------- @@ -1697,7 +1697,7 @@ def __init__( cad_parameters) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "ImportCadResults") json_data = param_json["ImportCadResults"] if "ImportCadResults" in param_json else {} @@ -1715,7 +1715,7 @@ def __init__( def set_default( error_code: ErrorCode = None, cad_parameters: Dict[str, Union[str, int, float, bool]] = None): - """Set the default values of ImportCadResults. + """Set the default values of the ``ImportCadResults`` object. Parameters ---------- @@ -1729,7 +1729,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of ImportCadResults. + """Print the default values of ``ImportCadResults`` object. Examples -------- @@ -1792,18 +1792,18 @@ def __init__( enable_multi_threading: bool = None, json_data : dict = None, **kwargs): - """Initializes the ImportFluentMeshingMeshParams. + """Initialize a ``ImportFluentMeshingMeshParams`` object. Parameters ---------- model: Model - Model to create a ImportFluentMeshingMeshParams object with default parameters. + Model to create a ``ImportFluentMeshingMeshParams`` object with default parameters. append: bool, optional Option to append imported mesh to existing mesh instead of resetting model to imported mesh. enable_multi_threading: bool, optional Option to import multiple files in parallel using multithreading. json_data: dict, optional - JSON dictionary to create a ImportFluentMeshingMeshParams object with provided parameters. + JSON dictionary to create a ``ImportFluentMeshingMeshParams`` object with provided parameters. Examples -------- @@ -1821,7 +1821,7 @@ def __init__( enable_multi_threading) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "ImportFluentMeshingMeshParams") json_data = param_json["ImportFluentMeshingMeshParams"] if "ImportFluentMeshingMeshParams" in param_json else {} @@ -1839,7 +1839,7 @@ def __init__( def set_default( append: bool = None, enable_multi_threading: bool = None): - """Set the default values of ImportFluentMeshingMeshParams. + """Set the default values of the ``ImportFluentMeshingMeshParams`` object. Parameters ---------- @@ -1853,7 +1853,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of ImportFluentMeshingMeshParams. + """Print the default values of ``ImportFluentMeshingMeshParams`` object. Examples -------- @@ -1916,18 +1916,18 @@ def __init__( new_parts_created: Iterable[int] = None, json_data : dict = None, **kwargs): - """Initializes the ImportFluentMeshingMeshResults. + """Initialize a ``ImportFluentMeshingMeshResults`` object. Parameters ---------- model: Model - Model to create a ImportFluentMeshingMeshResults object with default parameters. + Model to create a ``ImportFluentMeshingMeshResults`` object with default parameters. error_code: ErrorCode, optional Error code associated with the failure of operation. new_parts_created: Iterable[int], optional Ids of new parts created for each file unreferenced fluent meshing mesh zones. json_data: dict, optional - JSON dictionary to create a ImportFluentMeshingMeshResults object with provided parameters. + JSON dictionary to create a ``ImportFluentMeshingMeshResults`` object with provided parameters. Examples -------- @@ -1945,7 +1945,7 @@ def __init__( new_parts_created) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "ImportFluentMeshingMeshResults") json_data = param_json["ImportFluentMeshingMeshResults"] if "ImportFluentMeshingMeshResults" in param_json else {} @@ -1963,7 +1963,7 @@ def __init__( def set_default( error_code: ErrorCode = None, new_parts_created: Iterable[int] = None): - """Set the default values of ImportFluentMeshingMeshResults. + """Set the default values of the ``ImportFluentMeshingMeshResults`` object. Parameters ---------- @@ -1977,7 +1977,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of ImportFluentMeshingMeshResults. + """Print the default values of ``ImportFluentMeshingMeshResults`` object. Examples -------- @@ -2037,16 +2037,16 @@ def __init__( append: bool = None, json_data : dict = None, **kwargs): - """Initializes the ImportFluentCaseParams. + """Initialize a ``ImportFluentCaseParams`` object. Parameters ---------- model: Model - Model to create a ImportFluentCaseParams object with default parameters. + Model to create a ``ImportFluentCaseParams`` object with default parameters. append: bool, optional Option to append imported case instead of resetting model to imported case. json_data: dict, optional - JSON dictionary to create a ImportFluentCaseParams object with provided parameters. + JSON dictionary to create a ``ImportFluentCaseParams`` object with provided parameters. Examples -------- @@ -2062,7 +2062,7 @@ def __init__( append) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "ImportFluentCaseParams") json_data = param_json["ImportFluentCaseParams"] if "ImportFluentCaseParams" in param_json else {} @@ -2078,7 +2078,7 @@ def __init__( @staticmethod def set_default( append: bool = None): - """Set the default values of ImportFluentCaseParams. + """Set the default values of the ``ImportFluentCaseParams`` object. Parameters ---------- @@ -2090,7 +2090,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of ImportFluentCaseParams. + """Print the default values of ``ImportFluentCaseParams`` object. Examples -------- @@ -2138,16 +2138,16 @@ def __init__( error_code: ErrorCode = None, json_data : dict = None, **kwargs): - """Initializes the ImportFluentCaseResults. + """Initialize a ``ImportFluentCaseResults`` object. Parameters ---------- model: Model - Model to create a ImportFluentCaseResults object with default parameters. + Model to create a ``ImportFluentCaseResults`` object with default parameters. error_code: ErrorCode, optional Error code associated with failure of operation. json_data: dict, optional - JSON dictionary to create a ImportFluentCaseResults object with provided parameters. + JSON dictionary to create a ``ImportFluentCaseResults`` object with provided parameters. Examples -------- @@ -2163,7 +2163,7 @@ def __init__( error_code) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "ImportFluentCaseResults") json_data = param_json["ImportFluentCaseResults"] if "ImportFluentCaseResults" in param_json else {} @@ -2179,7 +2179,7 @@ def __init__( @staticmethod def set_default( error_code: ErrorCode = None): - """Set the default values of ImportFluentCaseResults. + """Set the default values of the ``ImportFluentCaseResults`` object. Parameters ---------- @@ -2191,7 +2191,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of ImportFluentCaseResults. + """Print the default values of ``ImportFluentCaseResults`` object. Examples -------- @@ -2242,16 +2242,16 @@ def __init__( append: bool = None, json_data : dict = None, **kwargs): - """Initializes the ImportMapdlCdbParams. + """Initialize a ``ImportMapdlCdbParams`` object. Parameters ---------- model: Model - Model to create a ImportMapdlCdbParams object with default parameters. + Model to create a ``ImportMapdlCdbParams`` object with default parameters. drop_mid_nodes: bool, optional append: bool, optional json_data: dict, optional - JSON dictionary to create a ImportMapdlCdbParams object with provided parameters. + JSON dictionary to create a ``ImportMapdlCdbParams`` object with provided parameters. Examples -------- @@ -2269,7 +2269,7 @@ def __init__( append) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "ImportMapdlCdbParams") json_data = param_json["ImportMapdlCdbParams"] if "ImportMapdlCdbParams" in param_json else {} @@ -2287,7 +2287,7 @@ def __init__( def set_default( drop_mid_nodes: bool = None, append: bool = None): - """Set the default values of ImportMapdlCdbParams. + """Set the default values of the ``ImportMapdlCdbParams`` object. Parameters ---------- @@ -2299,7 +2299,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of ImportMapdlCdbParams. + """Print the default values of ``ImportMapdlCdbParams`` object. Examples -------- @@ -2361,16 +2361,16 @@ def __init__( error_code: ErrorCode = None, json_data : dict = None, **kwargs): - """Initializes the ImportMapdlCdbResults. + """Initialize a ``ImportMapdlCdbResults`` object. Parameters ---------- model: Model - Model to create a ImportMapdlCdbResults object with default parameters. + Model to create a ``ImportMapdlCdbResults`` object with default parameters. error_code: ErrorCode, optional Error code associated with failure of operation. json_data: dict, optional - JSON dictionary to create a ImportMapdlCdbResults object with provided parameters. + JSON dictionary to create a ``ImportMapdlCdbResults`` object with provided parameters. Examples -------- @@ -2386,7 +2386,7 @@ def __init__( error_code) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "ImportMapdlCdbResults") json_data = param_json["ImportMapdlCdbResults"] if "ImportMapdlCdbResults" in param_json else {} @@ -2402,7 +2402,7 @@ def __init__( @staticmethod def set_default( error_code: ErrorCode = None): - """Set the default values of ImportMapdlCdbResults. + """Set the default values of the ``ImportMapdlCdbResults`` object. Parameters ---------- @@ -2414,7 +2414,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of ImportMapdlCdbResults. + """Print the default values of ``ImportMapdlCdbResults`` object. Examples -------- @@ -2477,32 +2477,32 @@ def __init__( simulation_type: CdbSimulationType = None, json_data : dict = None, **kwargs): - """Initializes the ExportMapdlCdbParams. + """Initialize a ``ExportMapdlCdbParams`` object. Parameters ---------- model: Model - Model to create a ExportMapdlCdbParams object with default parameters. + Model to create a ``ExportMapdlCdbParams`` object with default parameters. material_properties: str, optional - Materials in CDB format that will be added to the file. - This parameter is a Beta. Parameter behavior and name may change in future. + Materials in CDB format to be added to the file. + This is a beta parameter. The behavior and name may change in the future. boundary_conditions: str, optional - Boundary conditions in CDB format that will be appended to the file. - This parameter is a Beta. Parameter behavior and name may change in future. + Boundary conditions in CDB format to be added to the file. + This is a beta parameter. The behavior and name may change in the future. write_cells: bool, optional Option to write out cells as part of the file. - This parameter is a Beta. Parameter behavior and name may change in future. + This is a beta parameter. The behavior and name may change in the future. enable_face_based_labels: bool, optional Option to write element components for labels. - This parameter is a Beta. Parameter behavior and name may change in future. + This is a beta parameter. The behavior and name may change in the future. write_by_zones: bool, optional Option to write zones in the file. - This parameter is a Beta. Parameter behavior and name may change in future. + This is a beta parameter. The behavior and name may change in the future. simulation_type: CdbSimulationType, optional Simulation type for the file. - This parameter is a Beta. Parameter behavior and name may change in future. + This is a beta parameter. The behavior and name may change in the future. json_data: dict, optional - JSON dictionary to create a ExportMapdlCdbParams object with provided parameters. + JSON dictionary to create a ``ExportMapdlCdbParams`` object with provided parameters. Examples -------- @@ -2528,7 +2528,7 @@ def __init__( simulation_type) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "ExportMapdlCdbParams") json_data = param_json["ExportMapdlCdbParams"] if "ExportMapdlCdbParams" in param_json else {} @@ -2554,14 +2554,14 @@ def set_default( enable_face_based_labels: bool = None, write_by_zones: bool = None, simulation_type: CdbSimulationType = None): - """Set the default values of ExportMapdlCdbParams. + """Set the default values of the ``ExportMapdlCdbParams`` object. Parameters ---------- material_properties: str, optional - Materials in CDB format that will be added to the file. + Materials in CDB format to be added to the file. boundary_conditions: str, optional - Boundary conditions in CDB format that will be appended to the file. + Boundary conditions in CDB format to be added to the file. write_cells: bool, optional Option to write out cells as part of the file. enable_face_based_labels: bool, optional @@ -2576,7 +2576,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of ExportMapdlCdbParams. + """Print the default values of ``ExportMapdlCdbParams`` object. Examples -------- @@ -2610,8 +2610,8 @@ def __str__(self) -> str: @property def material_properties(self) -> str: - """Materials in CDB format that will be added to the file. - This parameter is a Beta. Parameter behavior and name may change in future. + """Materials in CDB format to be added to the file. + This is a beta parameter. The behavior and name may change in the future. """ return self._material_properties @@ -2621,8 +2621,8 @@ def material_properties(self, value: str): @property def boundary_conditions(self) -> str: - """Boundary conditions in CDB format that will be appended to the file. - This parameter is a Beta. Parameter behavior and name may change in future. + """Boundary conditions in CDB format to be added to the file. + This is a beta parameter. The behavior and name may change in the future. """ return self._boundary_conditions @@ -2633,7 +2633,7 @@ def boundary_conditions(self, value: str): @property def write_cells(self) -> bool: """Option to write out cells as part of the file. - This parameter is a Beta. Parameter behavior and name may change in future. + This is a beta parameter. The behavior and name may change in the future. """ return self._write_cells @@ -2644,7 +2644,7 @@ def write_cells(self, value: bool): @property def enable_face_based_labels(self) -> bool: """Option to write element components for labels. - This parameter is a Beta. Parameter behavior and name may change in future. + This is a beta parameter. The behavior and name may change in the future. """ return self._enable_face_based_labels @@ -2655,7 +2655,7 @@ def enable_face_based_labels(self, value: bool): @property def write_by_zones(self) -> bool: """Option to write zones in the file. - This parameter is a Beta. Parameter behavior and name may change in future. + This is a beta parameter. The behavior and name may change in the future. """ return self._write_by_zones @@ -2666,7 +2666,7 @@ def write_by_zones(self, value: bool): @property def simulation_type(self) -> CdbSimulationType: """Simulation type for the file. - This parameter is a Beta. Parameter behavior and name may change in future. + This is a beta parameter. The behavior and name may change in the future. """ return self._simulation_type @@ -2690,16 +2690,16 @@ def __init__( error_code: ErrorCode = None, json_data : dict = None, **kwargs): - """Initializes the ExportMapdlCdbResults. + """Initialize a ``ExportMapdlCdbResults`` object. Parameters ---------- model: Model - Model to create a ExportMapdlCdbResults object with default parameters. + Model to create a ``ExportMapdlCdbResults`` object with default parameters. error_code: ErrorCode, optional Error code associated with failure of operation. json_data: dict, optional - JSON dictionary to create a ExportMapdlCdbResults object with provided parameters. + JSON dictionary to create a ``ExportMapdlCdbResults`` object with provided parameters. Examples -------- @@ -2715,7 +2715,7 @@ def __init__( error_code) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "ExportMapdlCdbResults") json_data = param_json["ExportMapdlCdbResults"] if "ExportMapdlCdbResults" in param_json else {} @@ -2731,7 +2731,7 @@ def __init__( @staticmethod def set_default( error_code: ErrorCode = None): - """Set the default values of ExportMapdlCdbResults. + """Set the default values of the ``ExportMapdlCdbResults`` object. Parameters ---------- @@ -2743,7 +2743,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of ExportMapdlCdbResults. + """Print the default values of ``ExportMapdlCdbResults`` object. Examples -------- @@ -2776,7 +2776,7 @@ def error_code(self, value: ErrorCode): self._error_code = value class ExportLSDynaIgaKeywordFileParams(CoreObject): - """Parameters for exporting LS-Dyna IGA keyword file. + """Parameters for exporting LS-DYNA IGA keyword file. """ _default_params = {} @@ -2789,14 +2789,14 @@ def __init__( model: CommunicationManager=None, json_data : dict = None, **kwargs): - """Initializes the ExportLSDynaIgaKeywordFileParams. + """Initialize a ``ExportLSDynaIgaKeywordFileParams`` object. Parameters ---------- model: Model - Model to create a ExportLSDynaIgaKeywordFileParams object with default parameters. + Model to create a ``ExportLSDynaIgaKeywordFileParams`` object with default parameters. json_data: dict, optional - JSON dictionary to create a ExportLSDynaIgaKeywordFileParams object with provided parameters. + JSON dictionary to create a ``ExportLSDynaIgaKeywordFileParams`` object with provided parameters. Examples -------- @@ -2810,7 +2810,7 @@ def __init__( self.__initialize() else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "ExportLSDynaIgaKeywordFileParams") json_data = param_json["ExportLSDynaIgaKeywordFileParams"] if "ExportLSDynaIgaKeywordFileParams" in param_json else {} @@ -2824,7 +2824,7 @@ def __init__( @staticmethod def set_default(): - """Set the default values of ExportLSDynaIgaKeywordFileParams. + """Set the default values of the ``ExportLSDynaIgaKeywordFileParams`` object. """ args = locals() @@ -2832,7 +2832,7 @@ def set_default(): @staticmethod def print_default(): - """Print the default values of ExportLSDynaIgaKeywordFileParams. + """Print the default values of ``ExportLSDynaIgaKeywordFileParams`` object. Examples -------- @@ -2873,18 +2873,18 @@ def __init__( id_start: int = None, json_data : dict = None, **kwargs): - """Initializes the ExportBoundaryFittedSplineParams. + """Initialize a ``ExportBoundaryFittedSplineParams`` object. Parameters ---------- model: Model - Model to create a ExportBoundaryFittedSplineParams object with default parameters. + Model to create a ``ExportBoundaryFittedSplineParams`` object with default parameters. id_offset: int, optional Offset value for IGA entity ids between parts. id_start: int, optional Start ids for IGA entities. json_data: dict, optional - JSON dictionary to create a ExportBoundaryFittedSplineParams object with provided parameters. + JSON dictionary to create a ``ExportBoundaryFittedSplineParams`` object with provided parameters. Examples -------- @@ -2902,7 +2902,7 @@ def __init__( id_start) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "ExportBoundaryFittedSplineParams") json_data = param_json["ExportBoundaryFittedSplineParams"] if "ExportBoundaryFittedSplineParams" in param_json else {} @@ -2920,7 +2920,7 @@ def __init__( def set_default( id_offset: int = None, id_start: int = None): - """Set the default values of ExportBoundaryFittedSplineParams. + """Set the default values of the ``ExportBoundaryFittedSplineParams`` object. Parameters ---------- @@ -2934,7 +2934,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of ExportBoundaryFittedSplineParams. + """Print the default values of ``ExportBoundaryFittedSplineParams`` object. Examples -------- @@ -2992,14 +2992,14 @@ def __init__( model: CommunicationManager=None, json_data : dict = None, **kwargs): - """Initializes the ImportAbaqusParams. + """Initialize a ``ImportAbaqusParams`` object. Parameters ---------- model: Model - Model to create a ImportAbaqusParams object with default parameters. + Model to create a ``ImportAbaqusParams`` object with default parameters. json_data: dict, optional - JSON dictionary to create a ImportAbaqusParams object with provided parameters. + JSON dictionary to create a ``ImportAbaqusParams`` object with provided parameters. Examples -------- @@ -3013,7 +3013,7 @@ def __init__( self.__initialize() else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "ImportAbaqusParams") json_data = param_json["ImportAbaqusParams"] if "ImportAbaqusParams" in param_json else {} @@ -3027,7 +3027,7 @@ def __init__( @staticmethod def set_default(): - """Set the default values of ImportAbaqusParams. + """Set the default values of the ``ImportAbaqusParams`` object. """ args = locals() @@ -3035,7 +3035,7 @@ def set_default(): @staticmethod def print_default(): - """Print the default values of ImportAbaqusParams. + """Print the default values of ``ImportAbaqusParams`` object. Examples -------- @@ -3073,16 +3073,16 @@ def __init__( error_code: ErrorCode = None, json_data : dict = None, **kwargs): - """Initializes the ImportAbaqusResults. + """Initialize a ``ImportAbaqusResults`` object. Parameters ---------- model: Model - Model to create a ImportAbaqusResults object with default parameters. + Model to create a ``ImportAbaqusResults`` object with default parameters. error_code: ErrorCode, optional Error code associated with failure of operation. json_data: dict, optional - JSON dictionary to create a ImportAbaqusResults object with provided parameters. + JSON dictionary to create a ``ImportAbaqusResults`` object with provided parameters. Examples -------- @@ -3098,7 +3098,7 @@ def __init__( error_code) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "ImportAbaqusResults") json_data = param_json["ImportAbaqusResults"] if "ImportAbaqusResults" in param_json else {} @@ -3114,7 +3114,7 @@ def __init__( @staticmethod def set_default( error_code: ErrorCode = None): - """Set the default values of ImportAbaqusResults. + """Set the default values of the ``ImportAbaqusResults`` object. Parameters ---------- @@ -3126,7 +3126,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of ImportAbaqusResults. + """Print the default values of ``ImportAbaqusResults`` object. Examples -------- diff --git a/src/ansys/meshing/prime/autogen/primeconfig.py b/src/ansys/meshing/prime/autogen/primeconfig.py index 4cbdc16bbe..cfb795885f 100644 --- a/src/ansys/meshing/prime/autogen/primeconfig.py +++ b/src/ansys/meshing/prime/autogen/primeconfig.py @@ -150,6 +150,8 @@ class ErrorCode(enum.IntEnum): """Pyramid meshing failed.""" DELETEMESHFAILED = 142 """Deleting mesh failed.""" + INCREMENTALVOLUMEMESHINGNOTSUPPORTED = 143 + """Incremental volume meshing is not supported.""" OUTOFMEMORY = 200 """Out of memory.""" INTERRUPTED = 201 @@ -308,6 +310,8 @@ class ErrorCode(enum.IntEnum): """Merge zonelets is not supported for part with topology data.""" MERGEVOLUMESNOTSUPPORTEDFORTOPOLOGYPART = 1207 """Merge volumes is not supported for part with topology data.""" + NOTSUPPORTEDFORPOLYMESHPART = 1208 + """Operation does not support poly elements.""" MERGEPARTSFAILED = 1301 """Merge parts failed.""" MERGEPARTSWANDWOTOPO = 1302 @@ -538,16 +542,19 @@ class ErrorCode(enum.IntEnum): """Resolution Factor should be greater than 0 but less than or equal to 1.""" WRAPPERLEAKINGFLUIDREGIONS = 3444 """Two or more fluid regions leaking into each other. - This parameter is a Beta. Parameter behavior and name may change in future.""" + This is a beta parameter. The behavior and name may change in the future.""" WRAPPERPATCHFLOWREGIONS_INVALIDHOLESIZE = 3445 """Hole size specified for dead region should be positive double. - This parameter is a Beta. Parameter behavior and name may change in future.""" + This is a beta parameter. The behavior and name may change in the future.""" WRAPPERPATCHFLOWREGIONS_FAILED = 3446 """Unable to create patch surfaces. - This parameter is a Beta. Parameter behavior and name may change in future.""" + This is a beta parameter. The behavior and name may change in the future.""" WRAPPERPATCHFLOWREGIONS_TOOSMALLHOLESIZE = 3447 """Too small hole size provided for dead region. - This parameter is a Beta. Parameter behavior and name may change in future.""" + This is a beta parameter. The behavior and name may change in the future.""" + 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.""" CELLSEPARATIONFAILED = 6000 """Cell separation failed.""" NOCELLSSEPARATED = 6001 @@ -600,6 +607,8 @@ class ErrorCode(enum.IntEnum): """Some bodies are intersecting or incorrectly defined.""" STACKER_BASEFACEUNMESHED = 10111 """Base face list input has unmeshed topofaces.""" + FACEZONELETSHAVECELLSCONNECTED = 10205 + """Face zonelets have cells connected.""" INVALIDTHINVOLUMECONTROLS = 12101 """Invalid input provided for thin volume control.""" THINVOLUMECONTROLINVALIDSOURCESCOPE = 12102 @@ -636,10 +645,10 @@ class ErrorCode(enum.IntEnum): """Bad shape properties.""" AUTOQUADMESHER_NEGATIVEINPUTPARAMETER = 15000 """Autoquadmesher error codes. - This parameter is a Beta. Parameter behavior and name may change in future.""" + This is a beta parameter. The behavior and name may change in the future.""" AUTOQUADMESHER_INVALIDMINMAXSIZES = 15001 """Difference in maximum value and minimum value is negative. - This parameter is a Beta. Parameter behavior and name may change in future.""" + This is a beta parameter. The behavior and name may change in the future.""" class WarningCode(enum.IntEnum): """Warning codes associated with the PyPrimeMesh operation. @@ -680,6 +689,10 @@ class WarningCode(enum.IntEnum): """Degenerate input.""" ALIGN_OPERATIONINTERRUPTED = 1900 """Align operation interrupted.""" + FUSEOVERLAPREMOVALINCOMPLETE = 4500 + """Self intersections found. Use Fuse operation to remove it.""" + REMOVEOVERLAPWITHINTERSECT = 4501 + """Self intersections found. Use Intersect operation to remove it.""" IGA_NOGEOMZONELETFORSPLINEFITTING = 5001 """Invalid input for IGA.""" NOHOLESFOUNDONPLANE = 5501 @@ -728,5 +741,13 @@ class WarningCode(enum.IntEnum): """CAD geometry not found for some or all topo entities. Projected on facets for those topo entites.""" DUPLICATEINPUT = 8001 """Duplicate items in input.""" + UNPROCESSEDKEYWORDSINABAQUSFILE = 11001 + """Unprocessed Abaqus keywords have been found.""" + EXPORTMAPDLANALYSISSETTINGSFAILED = 11101 + """Export MAPDL analysis settings failed.""" + WRITINGCONTACTPAIRSSKIPPED = 11102 + """Writing of contact pairs skipped.""" + WRITINGTIESSKIPPED = 11103 + """Writing of ties skipped.""" MULTIZONEMESHER_SURFACESCOPEVOLUMESCOPEINCONSISTENCY = 110001 """MultiZone warning codes""" diff --git a/src/ansys/meshing/prime/autogen/surfaceutilities.py b/src/ansys/meshing/prime/autogen/surfaceutilities.py index b5172fb8bb..d888bd5ed8 100644 --- a/src/ansys/meshing/prime/autogen/surfaceutilities.py +++ b/src/ansys/meshing/prime/autogen/surfaceutilities.py @@ -51,7 +51,7 @@ def get_bounding_box_of_zonelets(self, zonelets : Iterable[int]) -> BoundingBox: """ if not isinstance(zonelets, Iterable): - raise TypeError("Invalid argument type passed for zonelets, valid argument type is Iterable[int].") + raise TypeError("Invalid argument type passed for 'zonelets'. Valid argument type is Iterable[int].") args = {"zonelets" : zonelets} command_name = "PrimeMesh::SurfaceUtilities/GetBoundingBoxOfZonelets" self._model._print_logs_before_command("get_bounding_box_of_zonelets", args) @@ -85,11 +85,11 @@ def fix_invalid_normal_nodes_of_face_zonelets(self, part_id : int, face_zonelets """ if not isinstance(part_id, int): - raise TypeError("Invalid argument type passed for part_id, valid argument type is int.") + raise TypeError("Invalid argument type passed for 'part_id'. Valid argument type is int.") if not isinstance(face_zonelets, Iterable): - raise TypeError("Invalid argument type passed for face_zonelets, valid argument type is Iterable[int].") + raise TypeError("Invalid argument type passed for 'face_zonelets'. Valid argument type is Iterable[int].") if not isinstance(params, FixInvalidNormalNodeParams): - raise TypeError("Invalid argument type passed for params, valid argument type is FixInvalidNormalNodeParams.") + raise TypeError("Invalid argument type passed for 'params'. Valid argument type is FixInvalidNormalNodeParams.") args = {"part_id" : part_id, "face_zonelets" : face_zonelets, "params" : params._jsonify()} @@ -125,11 +125,11 @@ def copy_face_zonelets(self, face_zonelets : Iterable[int], target_part_id : int """ if not isinstance(face_zonelets, Iterable): - raise TypeError("Invalid argument type passed for face_zonelets, valid argument type is Iterable[int].") + raise TypeError("Invalid argument type passed for 'face_zonelets'. Valid argument type is Iterable[int].") if not isinstance(target_part_id, int): - raise TypeError("Invalid argument type passed for target_part_id, valid argument type is int.") + raise TypeError("Invalid argument type passed for 'target_part_id'. Valid argument type is int.") if not isinstance(params, CopyZoneletsParams): - raise TypeError("Invalid argument type passed for params, valid argument type is CopyZoneletsParams.") + raise TypeError("Invalid argument type passed for 'params'. Valid argument type is CopyZoneletsParams.") args = {"face_zonelets" : face_zonelets, "target_part_id" : target_part_id, "params" : params._jsonify()} @@ -167,13 +167,13 @@ def fill_holes_at_plane(self, part_id : int, face_zonelets : Iterable[int], plan """ if not isinstance(part_id, int): - raise TypeError("Invalid argument type passed for part_id, valid argument type is int.") + raise TypeError("Invalid argument type passed for 'part_id'. Valid argument type is int.") if not isinstance(face_zonelets, Iterable): - raise TypeError("Invalid argument type passed for face_zonelets, valid argument type is Iterable[int].") + raise TypeError("Invalid argument type passed for 'face_zonelets'. Valid argument type is Iterable[int].") if not isinstance(plane_points, Iterable): - raise TypeError("Invalid argument type passed for plane_points, valid argument type is Iterable[float].") + raise TypeError("Invalid argument type passed for 'plane_points'. Valid argument type is Iterable[float].") if not isinstance(params, FillHolesAtPlaneParams): - raise TypeError("Invalid argument type passed for params, valid argument type is FillHolesAtPlaneParams.") + raise TypeError("Invalid argument type passed for 'params'. Valid argument type is FillHolesAtPlaneParams.") args = {"part_id" : part_id, "face_zonelets" : face_zonelets, "plane_points" : plane_points, @@ -210,11 +210,11 @@ def create_cap_on_face_zonelets(self, part_id : int, face_zonelets : Iterable[in """ if not isinstance(part_id, int): - raise TypeError("Invalid argument type passed for part_id, valid argument type is int.") + raise TypeError("Invalid argument type passed for 'part_id'. Valid argument type is int.") if not isinstance(face_zonelets, Iterable): - raise TypeError("Invalid argument type passed for face_zonelets, valid argument type is Iterable[int].") + raise TypeError("Invalid argument type passed for 'face_zonelets'. Valid argument type is Iterable[int].") if not isinstance(params, CreateCapParams): - raise TypeError("Invalid argument type passed for params, valid argument type is CreateCapParams.") + raise TypeError("Invalid argument type passed for 'params'. Valid argument type is CreateCapParams.") args = {"part_id" : part_id, "face_zonelets" : face_zonelets, "params" : params._jsonify()} @@ -249,11 +249,11 @@ def delete_unwetted_surfaces(self, face_zonelet_ids : Iterable[int], live_materi """ if not isinstance(face_zonelet_ids, Iterable): - raise TypeError("Invalid argument type passed for face_zonelet_ids, valid argument type is Iterable[int].") + raise TypeError("Invalid argument type passed for 'face_zonelet_ids'. Valid argument type is Iterable[int].") if not isinstance(live_material_point_names, List): - raise TypeError("Invalid argument type passed for live_material_point_names, valid argument type is List[str].") + raise TypeError("Invalid argument type passed for 'live_material_point_names'. Valid argument type is List[str].") if not isinstance(params, DeleteUnwettedParams): - raise TypeError("Invalid argument type passed for params, valid argument type is DeleteUnwettedParams.") + raise TypeError("Invalid argument type passed for 'params'. Valid argument type is DeleteUnwettedParams.") args = {"face_zonelet_ids" : face_zonelet_ids, "live_material_point_names" : live_material_point_names, "params" : params._jsonify()} @@ -286,9 +286,9 @@ def resolve_intersections(self, face_zonelet_ids : Iterable[int], params : Resol """ if not isinstance(face_zonelet_ids, Iterable): - raise TypeError("Invalid argument type passed for face_zonelet_ids, valid argument type is Iterable[int].") + raise TypeError("Invalid argument type passed for 'face_zonelet_ids'. Valid argument type is Iterable[int].") if not isinstance(params, ResolveIntersectionsParams): - raise TypeError("Invalid argument type passed for params, valid argument type is ResolveIntersectionsParams.") + raise TypeError("Invalid argument type passed for 'params'. Valid argument type is ResolveIntersectionsParams.") args = {"face_zonelet_ids" : face_zonelet_ids, "params" : params._jsonify()} command_name = "PrimeMesh::SurfaceUtilities/ResolveIntersections" @@ -320,9 +320,9 @@ def smooth_dihedral_face_nodes(self, zonelets : Iterable[int], params : SmoothDi """ if not isinstance(zonelets, Iterable): - raise TypeError("Invalid argument type passed for zonelets, valid argument type is Iterable[int].") + raise TypeError("Invalid argument type passed for 'zonelets'. Valid argument type is Iterable[int].") if not isinstance(params, SmoothDihedralFaceNodesParams): - raise TypeError("Invalid argument type passed for params, valid argument type is SmoothDihedralFaceNodesParams.") + raise TypeError("Invalid argument type passed for 'params'. Valid argument type is SmoothDihedralFaceNodesParams.") args = {"zonelets" : zonelets, "params" : params._jsonify()} command_name = "PrimeMesh::SurfaceUtilities/SmoothDihedralFaceNodes" @@ -355,9 +355,9 @@ def refine_at_contacts(self, part_ids : Iterable[int], params : RefineAtContacts """ if not isinstance(part_ids, Iterable): - raise TypeError("Invalid argument type passed for part_ids, valid argument type is Iterable[int].") + raise TypeError("Invalid argument type passed for 'part_ids'. Valid argument type is Iterable[int].") if not isinstance(params, RefineAtContactsParams): - raise TypeError("Invalid argument type passed for params, valid argument type is RefineAtContactsParams.") + raise TypeError("Invalid argument type passed for 'params'. Valid argument type is RefineAtContactsParams.") args = {"part_ids" : part_ids, "params" : params._jsonify()} command_name = "PrimeMesh::SurfaceUtilities/RefineAtContacts" @@ -389,9 +389,9 @@ def add_thickness(self, zonelets : Iterable[int], params : AddThicknessParams) - """ if not isinstance(zonelets, Iterable): - raise TypeError("Invalid argument type passed for zonelets, valid argument type is Iterable[int].") + raise TypeError("Invalid argument type passed for 'zonelets'. Valid argument type is Iterable[int].") if not isinstance(params, AddThicknessParams): - raise TypeError("Invalid argument type passed for params, valid argument type is AddThicknessParams.") + raise TypeError("Invalid argument type passed for 'params'. Valid argument type is AddThicknessParams.") args = {"zonelets" : zonelets, "params" : params._jsonify()} command_name = "PrimeMesh::SurfaceUtilities/AddThickness" @@ -423,9 +423,9 @@ def create_boi(self, face_zonelet_ids : Iterable[int], params : CreateBOIParams) """ if not isinstance(face_zonelet_ids, Iterable): - raise TypeError("Invalid argument type passed for face_zonelet_ids, valid argument type is Iterable[int].") + raise TypeError("Invalid argument type passed for 'face_zonelet_ids'. Valid argument type is Iterable[int].") if not isinstance(params, CreateBOIParams): - raise TypeError("Invalid argument type passed for params, valid argument type is CreateBOIParams.") + raise TypeError("Invalid argument type passed for 'params'. Valid argument type is CreateBOIParams.") args = {"face_zonelet_ids" : face_zonelet_ids, "params" : params._jsonify()} command_name = "PrimeMesh::SurfaceUtilities/CreateBOI" @@ -459,11 +459,11 @@ def create_contact_patch(self, source_zonelets : Iterable[int], target_zonelets """ if not isinstance(source_zonelets, Iterable): - raise TypeError("Invalid argument type passed for source_zonelets, valid argument type is Iterable[int].") + raise TypeError("Invalid argument type passed for 'source_zonelets'. Valid argument type is Iterable[int].") if not isinstance(target_zonelets, Iterable): - raise TypeError("Invalid argument type passed for target_zonelets, valid argument type is Iterable[int].") + raise TypeError("Invalid argument type passed for 'target_zonelets'. Valid argument type is Iterable[int].") if not isinstance(params, CreateContactPatchParams): - raise TypeError("Invalid argument type passed for params, valid argument type is CreateContactPatchParams.") + raise TypeError("Invalid argument type passed for 'params'. Valid argument type is CreateContactPatchParams.") args = {"source_zonelets" : source_zonelets, "target_zonelets" : target_zonelets, "params" : params._jsonify()} @@ -496,9 +496,9 @@ def stretch_free_boundaries(self, face_zonelet_ids : Iterable[int], params : Str """ if not isinstance(face_zonelet_ids, Iterable): - raise TypeError("Invalid argument type passed for face_zonelet_ids, valid argument type is Iterable[int].") + raise TypeError("Invalid argument type passed for 'face_zonelet_ids'. Valid argument type is Iterable[int].") if not isinstance(params, StretchFreeBoundariesParams): - raise TypeError("Invalid argument type passed for params, valid argument type is StretchFreeBoundariesParams.") + raise TypeError("Invalid argument type passed for 'params'. Valid argument type is StretchFreeBoundariesParams.") args = {"face_zonelet_ids" : face_zonelet_ids, "params" : params._jsonify()} command_name = "PrimeMesh::SurfaceUtilities/StretchFreeBoundaries" @@ -506,3 +506,42 @@ def stretch_free_boundaries(self, face_zonelet_ids : Iterable[int], params : Str result = self._comm.serve(self._model, command_name, self._object_id, args=args) self._model._print_logs_after_command("stretch_free_boundaries", StretchFreeBoundariesResults(model = self._model, json_data = result)) return StretchFreeBoundariesResults(model = self._model, json_data = result) + + def triangulate_face_zonelets(self, face_zonelet_ids : Iterable[int], params : TriangulateParams) -> TriangulateResults: + """ Split faces in zonelets to get triangular faces. + + + Parameters + ---------- + face_zonelet_ids : Iterable[int] + Ids of face zonelets. + params : TriangulateParams + Parameters to control the split operation. + + Returns + ------- + TriangulateResults + Returns the TriangulateResults. + + + Notes + ----- + This is a Beta API. The Behavior and implementation may change in future. + + Examples + -------- + >>> result = surf_utils.triangulate_face_zonelets(face_zonelet_ids, params) + + """ + if not isinstance(face_zonelet_ids, Iterable): + raise TypeError("Invalid argument type passed for 'face_zonelet_ids'. Valid argument type is Iterable[int].") + if not isinstance(params, TriangulateParams): + raise TypeError("Invalid argument type passed for 'params'. Valid argument type is TriangulateParams.") + args = {"face_zonelet_ids" : face_zonelet_ids, + "params" : params._jsonify()} + command_name = "PrimeMesh::SurfaceUtilities/TriangulateFaceZonelets" + self._model._print_beta_api_warning("triangulate_face_zonelets") + self._model._print_logs_before_command("triangulate_face_zonelets", args) + result = self._comm.serve(self._model, command_name, self._object_id, args=args) + self._model._print_logs_after_command("triangulate_face_zonelets", TriangulateResults(model = self._model, json_data = result)) + return TriangulateResults(model = self._model, json_data = result) diff --git a/src/ansys/meshing/prime/autogen/surfaceutilitystructs.py b/src/ansys/meshing/prime/autogen/surfaceutilitystructs.py index d5476bd502..738e59f068 100644 --- a/src/ansys/meshing/prime/autogen/surfaceutilitystructs.py +++ b/src/ansys/meshing/prime/autogen/surfaceutilitystructs.py @@ -66,12 +66,12 @@ def __init__( label: str = None, json_data : dict = None, **kwargs): - """Initializes the FixInvalidNormalNodeParams. + """Initialize a ``FixInvalidNormalNodeParams`` object. Parameters ---------- model: Model - Model to create a FixInvalidNormalNodeParams object with default parameters. + Model to create a ``FixInvalidNormalNodeParams`` object with default parameters. nugget_size: float, optional Relative size used to create nugget at invalid normal node. The size is relative to mesh size at the node. nugget_mesh_size: float, optional @@ -79,7 +79,7 @@ def __init__( label: str, optional Label to set on new face zonelets created. json_data: dict, optional - JSON dictionary to create a FixInvalidNormalNodeParams object with provided parameters. + JSON dictionary to create a ``FixInvalidNormalNodeParams`` object with provided parameters. Examples -------- @@ -99,7 +99,7 @@ def __init__( label) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "FixInvalidNormalNodeParams") json_data = param_json["FixInvalidNormalNodeParams"] if "FixInvalidNormalNodeParams" in param_json else {} @@ -119,7 +119,7 @@ def set_default( nugget_size: float = None, nugget_mesh_size: float = None, label: str = None): - """Set the default values of FixInvalidNormalNodeParams. + """Set the default values of the ``FixInvalidNormalNodeParams`` object. Parameters ---------- @@ -135,7 +135,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of FixInvalidNormalNodeParams. + """Print the default values of ``FixInvalidNormalNodeParams`` object. Examples -------- @@ -207,16 +207,16 @@ def __init__( error_code: ErrorCode = None, json_data : dict = None, **kwargs): - """Initializes the FixInvalidNormalNodeResults. + """Initialize a ``FixInvalidNormalNodeResults`` object. Parameters ---------- model: Model - Model to create a FixInvalidNormalNodeResults object with default parameters. + Model to create a ``FixInvalidNormalNodeResults`` object with default parameters. error_code: ErrorCode, optional Error code associated with failure of operation. json_data: dict, optional - JSON dictionary to create a FixInvalidNormalNodeResults object with provided parameters. + JSON dictionary to create a ``FixInvalidNormalNodeResults`` object with provided parameters. Examples -------- @@ -232,7 +232,7 @@ def __init__( error_code) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "FixInvalidNormalNodeResults") json_data = param_json["FixInvalidNormalNodeResults"] if "FixInvalidNormalNodeResults" in param_json else {} @@ -248,7 +248,7 @@ def __init__( @staticmethod def set_default( error_code: ErrorCode = None): - """Set the default values of FixInvalidNormalNodeResults. + """Set the default values of the ``FixInvalidNormalNodeResults`` object. Parameters ---------- @@ -260,7 +260,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of FixInvalidNormalNodeResults. + """Print the default values of ``FixInvalidNormalNodeResults`` object. Examples -------- @@ -311,18 +311,18 @@ def __init__( suggested_zone_name: str = None, json_data : dict = None, **kwargs): - """Initializes the FillHolesAtPlaneParams. + """Initialize a ``FillHolesAtPlaneParams`` object. Parameters ---------- model: Model - Model to create a FillHolesAtPlaneParams object with default parameters. + Model to create a ``FillHolesAtPlaneParams`` object with default parameters. create_zone: bool, optional Option to create a face zone for the zonelets created to fill holes. suggested_zone_name: str, optional Suggested name to be set on merged part. If the suggested name is empty, the parameter uses the default name. json_data: dict, optional - JSON dictionary to create a FillHolesAtPlaneParams object with provided parameters. + JSON dictionary to create a ``FillHolesAtPlaneParams`` object with provided parameters. Examples -------- @@ -340,7 +340,7 @@ def __init__( suggested_zone_name) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "FillHolesAtPlaneParams") json_data = param_json["FillHolesAtPlaneParams"] if "FillHolesAtPlaneParams" in param_json else {} @@ -358,7 +358,7 @@ def __init__( def set_default( create_zone: bool = None, suggested_zone_name: str = None): - """Set the default values of FillHolesAtPlaneParams. + """Set the default values of the ``FillHolesAtPlaneParams`` object. Parameters ---------- @@ -372,7 +372,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of FillHolesAtPlaneParams. + """Print the default values of ``FillHolesAtPlaneParams`` object. Examples -------- @@ -444,12 +444,12 @@ def __init__( created_zone_id: int = None, json_data : dict = None, **kwargs): - """Initializes the FillHolesAtPlaneResults. + """Initialize a ``FillHolesAtPlaneResults`` object. Parameters ---------- model: Model - Model to create a FillHolesAtPlaneResults object with default parameters. + Model to create a ``FillHolesAtPlaneResults`` object with default parameters. error_code: ErrorCode, optional Error code associated with the failure of operation. warning_codes: List[WarningCode], optional @@ -461,7 +461,7 @@ def __init__( created_zone_id: int, optional Id assigned to zone created. json_data: dict, optional - JSON dictionary to create a FillHolesAtPlaneResults object with provided parameters. + JSON dictionary to create a ``FillHolesAtPlaneResults`` object with provided parameters. Examples -------- @@ -485,7 +485,7 @@ def __init__( created_zone_id) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "FillHolesAtPlaneResults") json_data = param_json["FillHolesAtPlaneResults"] if "FillHolesAtPlaneResults" in param_json else {} @@ -509,7 +509,7 @@ def set_default( created_face_zonelets: Iterable[int] = None, assigned_zone_name: str = None, created_zone_id: int = None): - """Set the default values of FillHolesAtPlaneResults. + """Set the default values of the ``FillHolesAtPlaneResults`` object. Parameters ---------- @@ -529,7 +529,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of FillHolesAtPlaneResults. + """Print the default values of ``FillHolesAtPlaneResults`` object. Examples -------- @@ -623,14 +623,14 @@ def __init__( model: CommunicationManager=None, json_data : dict = None, **kwargs): - """Initializes the CreateCapParams. + """Initialize a ``CreateCapParams`` object. Parameters ---------- model: Model - Model to create a CreateCapParams object with default parameters. + Model to create a ``CreateCapParams`` object with default parameters. json_data: dict, optional - JSON dictionary to create a CreateCapParams object with provided parameters. + JSON dictionary to create a ``CreateCapParams`` object with provided parameters. Examples -------- @@ -644,7 +644,7 @@ def __init__( self.__initialize() else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "CreateCapParams") json_data = param_json["CreateCapParams"] if "CreateCapParams" in param_json else {} @@ -658,7 +658,7 @@ def __init__( @staticmethod def set_default(): - """Set the default values of CreateCapParams. + """Set the default values of the ``CreateCapParams`` object. """ args = locals() @@ -666,7 +666,7 @@ def set_default(): @staticmethod def print_default(): - """Print the default values of CreateCapParams. + """Print the default values of ``CreateCapParams`` object. Examples -------- @@ -707,18 +707,18 @@ def __init__( created_face_zonelets: Iterable[int] = None, json_data : dict = None, **kwargs): - """Initializes the CreateCapResults. + """Initialize a ``CreateCapResults`` object. Parameters ---------- model: Model - Model to create a CreateCapResults object with default parameters. + Model to create a ``CreateCapResults`` object with default parameters. error_code: ErrorCode, optional Error code associated with the failure of operation. created_face_zonelets: Iterable[int], optional Ids of cap face zonelets created. json_data: dict, optional - JSON dictionary to create a CreateCapResults object with provided parameters. + JSON dictionary to create a ``CreateCapResults`` object with provided parameters. Examples -------- @@ -736,7 +736,7 @@ def __init__( created_face_zonelets) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "CreateCapResults") json_data = param_json["CreateCapResults"] if "CreateCapResults" in param_json else {} @@ -754,7 +754,7 @@ def __init__( def set_default( error_code: ErrorCode = None, created_face_zonelets: Iterable[int] = None): - """Set the default values of CreateCapResults. + """Set the default values of the ``CreateCapResults`` object. Parameters ---------- @@ -768,7 +768,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of CreateCapResults. + """Print the default values of ``CreateCapResults`` object. Examples -------- @@ -826,14 +826,14 @@ def __init__( model: CommunicationManager=None, json_data : dict = None, **kwargs): - """Initializes the DeleteUnwettedParams. + """Initialize a ``DeleteUnwettedParams`` object. Parameters ---------- model: Model - Model to create a DeleteUnwettedParams object with default parameters. + Model to create a ``DeleteUnwettedParams`` object with default parameters. json_data: dict, optional - JSON dictionary to create a DeleteUnwettedParams object with provided parameters. + JSON dictionary to create a ``DeleteUnwettedParams`` object with provided parameters. Examples -------- @@ -847,7 +847,7 @@ def __init__( self.__initialize() else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "DeleteUnwettedParams") json_data = param_json["DeleteUnwettedParams"] if "DeleteUnwettedParams" in param_json else {} @@ -861,7 +861,7 @@ def __init__( @staticmethod def set_default(): - """Set the default values of DeleteUnwettedParams. + """Set the default values of the ``DeleteUnwettedParams`` object. """ args = locals() @@ -869,7 +869,7 @@ def set_default(): @staticmethod def print_default(): - """Print the default values of DeleteUnwettedParams. + """Print the default values of ``DeleteUnwettedParams`` object. Examples -------- @@ -907,16 +907,16 @@ def __init__( error_code: ErrorCode = None, json_data : dict = None, **kwargs): - """Initializes the DeleteUnwettedResult. + """Initialize a ``DeleteUnwettedResult`` object. Parameters ---------- model: Model - Model to create a DeleteUnwettedResult object with default parameters. + Model to create a ``DeleteUnwettedResult`` object with default parameters. error_code: ErrorCode, optional Error code associated with delete unwetted surfaces operation. json_data: dict, optional - JSON dictionary to create a DeleteUnwettedResult object with provided parameters. + JSON dictionary to create a ``DeleteUnwettedResult`` object with provided parameters. Examples -------- @@ -932,7 +932,7 @@ def __init__( error_code) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "DeleteUnwettedResult") json_data = param_json["DeleteUnwettedResult"] if "DeleteUnwettedResult" in param_json else {} @@ -948,7 +948,7 @@ def __init__( @staticmethod def set_default( error_code: ErrorCode = None): - """Set the default values of DeleteUnwettedResult. + """Set the default values of the ``DeleteUnwettedResult`` object. Parameters ---------- @@ -960,7 +960,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of DeleteUnwettedResult. + """Print the default values of ``DeleteUnwettedResult`` object. Examples -------- @@ -1008,16 +1008,16 @@ def __init__( number_of_threads: int = None, json_data : dict = None, **kwargs): - """Initializes the ResolveIntersectionsParams. + """Initialize a ``ResolveIntersectionsParams`` object. Parameters ---------- model: Model - Model to create a ResolveIntersectionsParams object with default parameters. + Model to create a ``ResolveIntersectionsParams`` object with default parameters. number_of_threads: int, optional Number of threads for resolve intersections multithreaded operation. json_data: dict, optional - JSON dictionary to create a ResolveIntersectionsParams object with provided parameters. + JSON dictionary to create a ``ResolveIntersectionsParams`` object with provided parameters. Examples -------- @@ -1033,7 +1033,7 @@ def __init__( number_of_threads) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "ResolveIntersectionsParams") json_data = param_json["ResolveIntersectionsParams"] if "ResolveIntersectionsParams" in param_json else {} @@ -1049,7 +1049,7 @@ def __init__( @staticmethod def set_default( number_of_threads: int = None): - """Set the default values of ResolveIntersectionsParams. + """Set the default values of the ``ResolveIntersectionsParams`` object. Parameters ---------- @@ -1061,7 +1061,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of ResolveIntersectionsParams. + """Print the default values of ``ResolveIntersectionsParams`` object. Examples -------- @@ -1109,16 +1109,16 @@ def __init__( error_code: ErrorCode = None, json_data : dict = None, **kwargs): - """Initializes the ResolveIntersectionResult. + """Initialize a ``ResolveIntersectionResult`` object. Parameters ---------- model: Model - Model to create a ResolveIntersectionResult object with default parameters. + Model to create a ``ResolveIntersectionResult`` object with default parameters. error_code: ErrorCode, optional Errror code associated with a resolve intersections operation. json_data: dict, optional - JSON dictionary to create a ResolveIntersectionResult object with provided parameters. + JSON dictionary to create a ``ResolveIntersectionResult`` object with provided parameters. Examples -------- @@ -1134,7 +1134,7 @@ def __init__( error_code) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "ResolveIntersectionResult") json_data = param_json["ResolveIntersectionResult"] if "ResolveIntersectionResult" in param_json else {} @@ -1150,7 +1150,7 @@ def __init__( @staticmethod def set_default( error_code: ErrorCode = None): - """Set the default values of ResolveIntersectionResult. + """Set the default values of the ``ResolveIntersectionResult`` object. Parameters ---------- @@ -1162,7 +1162,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of ResolveIntersectionResult. + """Print the default values of ``ResolveIntersectionResult`` object. Examples -------- @@ -1216,12 +1216,12 @@ def __init__( trace_edges: bool = None, json_data : dict = None, **kwargs): - """Initializes the SubtractZoneletsParams. + """Initialize a ``SubtractZoneletsParams`` object. Parameters ---------- model: Model - Model to create a SubtractZoneletsParams object with default parameters. + Model to create a ``SubtractZoneletsParams`` object with default parameters. retain_cutter: bool, optional Retain the zonelets used for removal. extract_edges: bool, optional @@ -1229,7 +1229,7 @@ def __init__( trace_edges: bool, optional Trace edges of intersection on target. Only works if extractEdges is true. json_data: dict, optional - JSON dictionary to create a SubtractZoneletsParams object with provided parameters. + JSON dictionary to create a ``SubtractZoneletsParams`` object with provided parameters. Examples -------- @@ -1249,7 +1249,7 @@ def __init__( trace_edges) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "SubtractZoneletsParams") json_data = param_json["SubtractZoneletsParams"] if "SubtractZoneletsParams" in param_json else {} @@ -1269,7 +1269,7 @@ def set_default( retain_cutter: bool = None, extract_edges: bool = None, trace_edges: bool = None): - """Set the default values of SubtractZoneletsParams. + """Set the default values of the ``SubtractZoneletsParams`` object. Parameters ---------- @@ -1285,7 +1285,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of SubtractZoneletsParams. + """Print the default values of ``SubtractZoneletsParams`` object. Examples -------- @@ -1360,18 +1360,18 @@ def __init__( error_code: ErrorCode = None, json_data : dict = None, **kwargs): - """Initializes the SubtractZoneletsResults. + """Initialize a ``SubtractZoneletsResults`` object. Parameters ---------- model: Model - Model to create a SubtractZoneletsResults object with default parameters. + Model to create a ``SubtractZoneletsResults`` object with default parameters. processing_time: float, optional Processing time for subtract operation. error_code: ErrorCode, optional Error Code associated with subtract operation. json_data: dict, optional - JSON dictionary to create a SubtractZoneletsResults object with provided parameters. + JSON dictionary to create a ``SubtractZoneletsResults`` object with provided parameters. Examples -------- @@ -1389,7 +1389,7 @@ def __init__( error_code) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "SubtractZoneletsResults") json_data = param_json["SubtractZoneletsResults"] if "SubtractZoneletsResults" in param_json else {} @@ -1407,7 +1407,7 @@ def __init__( def set_default( processing_time: float = None, error_code: ErrorCode = None): - """Set the default values of SubtractZoneletsResults. + """Set the default values of the ``SubtractZoneletsResults`` object. Parameters ---------- @@ -1421,7 +1421,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of SubtractZoneletsResults. + """Print the default values of ``SubtractZoneletsResults`` object. Examples -------- @@ -1487,12 +1487,12 @@ def __init__( type: SmoothType = None, json_data : dict = None, **kwargs): - """Initializes the SmoothDihedralFaceNodesParams. + """Initialize a ``SmoothDihedralFaceNodesParams`` object. Parameters ---------- model: Model - Model to create a SmoothDihedralFaceNodesParams object with default parameters. + Model to create a ``SmoothDihedralFaceNodesParams`` object with default parameters. min_dihedral_angle: float, optional Minimum angle to be used to identify dihedral faces. tolerance: float, optional @@ -1500,7 +1500,7 @@ def __init__( type: SmoothType, optional Option to inflate neighbor nodes of dihedral face edges or smooth dihedral face edge nodes to improve dihedral angle. json_data: dict, optional - JSON dictionary to create a SmoothDihedralFaceNodesParams object with provided parameters. + JSON dictionary to create a ``SmoothDihedralFaceNodesParams`` object with provided parameters. Examples -------- @@ -1520,7 +1520,7 @@ def __init__( type) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "SmoothDihedralFaceNodesParams") json_data = param_json["SmoothDihedralFaceNodesParams"] if "SmoothDihedralFaceNodesParams" in param_json else {} @@ -1540,7 +1540,7 @@ def set_default( min_dihedral_angle: float = None, tolerance: float = None, type: SmoothType = None): - """Set the default values of SmoothDihedralFaceNodesParams. + """Set the default values of the ``SmoothDihedralFaceNodesParams`` object. Parameters ---------- @@ -1556,7 +1556,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of SmoothDihedralFaceNodesParams. + """Print the default values of ``SmoothDihedralFaceNodesParams`` object. Examples -------- @@ -1631,18 +1631,18 @@ def __init__( error_code: ErrorCode = None, json_data : dict = None, **kwargs): - """Initializes the SmoothDihedralFaceNodesResults. + """Initialize a ``SmoothDihedralFaceNodesResults`` object. Parameters ---------- model: Model - Model to create a SmoothDihedralFaceNodesResults object with default parameters. + Model to create a ``SmoothDihedralFaceNodesResults`` object with default parameters. n_nodes_smoothed: int, optional Number of dihedral face nodes smoothed. error_code: ErrorCode, optional Error Code associated with creating offset surface. json_data: dict, optional - JSON dictionary to create a SmoothDihedralFaceNodesResults object with provided parameters. + JSON dictionary to create a ``SmoothDihedralFaceNodesResults`` object with provided parameters. Examples -------- @@ -1660,7 +1660,7 @@ def __init__( error_code) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "SmoothDihedralFaceNodesResults") json_data = param_json["SmoothDihedralFaceNodesResults"] if "SmoothDihedralFaceNodesResults" in param_json else {} @@ -1678,7 +1678,7 @@ def __init__( def set_default( n_nodes_smoothed: int = None, error_code: ErrorCode = None): - """Set the default values of SmoothDihedralFaceNodesResults. + """Set the default values of the ``SmoothDihedralFaceNodesResults`` object. Parameters ---------- @@ -1692,7 +1692,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of SmoothDihedralFaceNodesResults. + """Print the default values of ``SmoothDihedralFaceNodesResults`` object. Examples -------- @@ -1761,12 +1761,12 @@ def __init__( project_on_geometry: bool = None, json_data : dict = None, **kwargs): - """Initializes the RefineAtContactsParams. + """Initialize a ``RefineAtContactsParams`` object. Parameters ---------- model: Model - Model to create a RefineAtContactsParams object with default parameters. + Model to create a ``RefineAtContactsParams`` object with default parameters. contact_tolerance: float, optional Maximum tolerance used to identify face elements as contacts. relative_tolerance: bool, optional @@ -1776,7 +1776,7 @@ def __init__( project_on_geometry: bool, optional Project on geometry on remesh. json_data: dict, optional - JSON dictionary to create a RefineAtContactsParams object with provided parameters. + JSON dictionary to create a ``RefineAtContactsParams`` object with provided parameters. Examples -------- @@ -1798,7 +1798,7 @@ def __init__( project_on_geometry) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "RefineAtContactsParams") json_data = param_json["RefineAtContactsParams"] if "RefineAtContactsParams" in param_json else {} @@ -1820,7 +1820,7 @@ def set_default( relative_tolerance: bool = None, refine_max_size: float = None, project_on_geometry: bool = None): - """Set the default values of RefineAtContactsParams. + """Set the default values of the ``RefineAtContactsParams`` object. Parameters ---------- @@ -1838,7 +1838,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of RefineAtContactsParams. + """Print the default values of ``RefineAtContactsParams`` object. Examples -------- @@ -1928,12 +1928,12 @@ def __init__( error_code: ErrorCode = None, json_data : dict = None, **kwargs): - """Initializes the RefineAtContactsResults. + """Initialize a ``RefineAtContactsResults`` object. Parameters ---------- model: Model - Model to create a RefineAtContactsResults object with default parameters. + Model to create a ``RefineAtContactsResults`` object with default parameters. n_refined: int, optional Number of face elements identified for refinement. size_field_id: int, optional @@ -1941,7 +1941,7 @@ def __init__( error_code: ErrorCode, optional ErrorCode associated with the refine contacts operation. json_data: dict, optional - JSON dictionary to create a RefineAtContactsResults object with provided parameters. + JSON dictionary to create a ``RefineAtContactsResults`` object with provided parameters. Examples -------- @@ -1961,7 +1961,7 @@ def __init__( error_code) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "RefineAtContactsResults") json_data = param_json["RefineAtContactsResults"] if "RefineAtContactsResults" in param_json else {} @@ -1981,7 +1981,7 @@ def set_default( n_refined: int = None, size_field_id: int = None, error_code: ErrorCode = None): - """Set the default values of RefineAtContactsResults. + """Set the default values of the ``RefineAtContactsResults`` object. Parameters ---------- @@ -1997,7 +1997,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of RefineAtContactsResults. + """Print the default values of ``RefineAtContactsResults`` object. Examples -------- @@ -2078,12 +2078,12 @@ def __init__( fix_intersections: bool = None, json_data : dict = None, **kwargs): - """Initializes the AddThicknessParams. + """Initialize a ``AddThicknessParams`` object. Parameters ---------- model: Model - Model to create a AddThicknessParams object with default parameters. + Model to create a ``AddThicknessParams`` object with default parameters. thickness: float, optional To assign the offset distance of inflation. reverse_face_normal: bool, optional @@ -2093,7 +2093,7 @@ def __init__( fix_intersections: bool, optional Fix intersections in concave regions. json_data: dict, optional - JSON dictionary to create a AddThicknessParams object with provided parameters. + JSON dictionary to create a ``AddThicknessParams`` object with provided parameters. Examples -------- @@ -2115,7 +2115,7 @@ def __init__( fix_intersections) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "AddThicknessParams") json_data = param_json["AddThicknessParams"] if "AddThicknessParams" in param_json else {} @@ -2137,7 +2137,7 @@ def set_default( reverse_face_normal: bool = None, suggested_part_name: str = None, fix_intersections: bool = None): - """Set the default values of AddThicknessParams. + """Set the default values of the ``AddThicknessParams`` object. Parameters ---------- @@ -2155,7 +2155,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of AddThicknessParams. + """Print the default values of ``AddThicknessParams`` object. Examples -------- @@ -2242,18 +2242,18 @@ def __init__( part_id: int = None, json_data : dict = None, **kwargs): - """Initializes the AddThicknessResults. + """Initialize a ``AddThicknessResults`` object. Parameters ---------- model: Model - Model to create a AddThicknessResults object with default parameters. + Model to create a ``AddThicknessResults`` object with default parameters. error_code: ErrorCode, optional Error code associated with failure of operation. part_id: int, optional The created thickness part id. json_data: dict, optional - JSON dictionary to create a AddThicknessResults object with provided parameters. + JSON dictionary to create a ``AddThicknessResults`` object with provided parameters. Examples -------- @@ -2271,7 +2271,7 @@ def __init__( part_id) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "AddThicknessResults") json_data = param_json["AddThicknessResults"] if "AddThicknessResults" in param_json else {} @@ -2289,7 +2289,7 @@ def __init__( def set_default( error_code: ErrorCode = None, part_id: int = None): - """Set the default values of AddThicknessResults. + """Set the default values of the ``AddThicknessResults`` object. Parameters ---------- @@ -2303,7 +2303,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of AddThicknessResults. + """Print the default values of ``AddThicknessResults`` object. Examples -------- @@ -2390,12 +2390,12 @@ def __init__( number_of_threads: int = None, json_data : dict = None, **kwargs): - """Initializes the CreateBOIParams. + """Initialize a ``CreateBOIParams`` object. Parameters ---------- model: Model - Model to create a CreateBOIParams object with default parameters. + Model to create a ``CreateBOIParams`` object with default parameters. boi_type: BOIType, optional Type of BOI offsetting. perform_initial_wrap: bool, optional @@ -2417,7 +2417,7 @@ def __init__( number_of_threads: int, optional Number of threads for multithreading. json_data: dict, optional - JSON dictionary to create a CreateBOIParams object with provided parameters. + JSON dictionary to create a ``CreateBOIParams`` object with provided parameters. Examples -------- @@ -2451,7 +2451,7 @@ def __init__( number_of_threads) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "CreateBOIParams") json_data = param_json["CreateBOIParams"] if "CreateBOIParams" in param_json else {} @@ -2485,7 +2485,7 @@ def set_default( suggested_part_name: str = None, suggested_label_prefix: str = None, number_of_threads: int = None): - """Set the default values of CreateBOIParams. + """Set the default values of the ``CreateBOIParams`` object. Parameters ---------- @@ -2515,7 +2515,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of CreateBOIParams. + """Print the default values of ``CreateBOIParams`` object. Examples -------- @@ -2674,18 +2674,18 @@ def __init__( part_id: int = None, json_data : dict = None, **kwargs): - """Initializes the CreateBOIResults. + """Initialize a ``CreateBOIResults`` object. Parameters ---------- model: Model - Model to create a CreateBOIResults object with default parameters. + Model to create a ``CreateBOIResults`` object with default parameters. error_code: ErrorCode, optional Error code associated with failure of operation. part_id: int, optional The BOI part id. json_data: dict, optional - JSON dictionary to create a CreateBOIResults object with provided parameters. + JSON dictionary to create a ``CreateBOIResults`` object with provided parameters. Examples -------- @@ -2703,7 +2703,7 @@ def __init__( part_id) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "CreateBOIResults") json_data = param_json["CreateBOIResults"] if "CreateBOIResults" in param_json else {} @@ -2721,7 +2721,7 @@ def __init__( def set_default( error_code: ErrorCode = None, part_id: int = None): - """Set the default values of CreateBOIResults. + """Set the default values of the ``CreateBOIResults`` object. Parameters ---------- @@ -2735,7 +2735,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of CreateBOIResults. + """Print the default values of ``CreateBOIResults`` object. Examples -------- @@ -2807,12 +2807,12 @@ def __init__( suggested_label_prefix: str = None, json_data : dict = None, **kwargs): - """Initializes the CreateContactPatchParams. + """Initialize a ``CreateContactPatchParams`` object. Parameters ---------- model: Model - Model to create a CreateContactPatchParams object with default parameters. + Model to create a ``CreateContactPatchParams`` object with default parameters. contact_patch_axis: ContactPatchAxis, optional Assigns the contact patch direction. offset_distance: float, optional @@ -2824,7 +2824,7 @@ def __init__( suggested_label_prefix: str, optional Suggested label name for created contact patch surfaces. json_data: dict, optional - JSON dictionary to create a CreateContactPatchParams object with provided parameters. + JSON dictionary to create a ``CreateContactPatchParams`` object with provided parameters. Examples -------- @@ -2848,7 +2848,7 @@ def __init__( suggested_label_prefix) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "CreateContactPatchParams") json_data = param_json["CreateContactPatchParams"] if "CreateContactPatchParams" in param_json else {} @@ -2872,7 +2872,7 @@ def set_default( grouping_tolerance: float = None, suggested_part_name: str = None, suggested_label_prefix: str = None): - """Set the default values of CreateContactPatchParams. + """Set the default values of the ``CreateContactPatchParams`` object. Parameters ---------- @@ -2892,7 +2892,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of CreateContactPatchParams. + """Print the default values of ``CreateContactPatchParams`` object. Examples -------- @@ -2991,18 +2991,18 @@ def __init__( part_id: int = None, json_data : dict = None, **kwargs): - """Initializes the CreateContactPatchResults. + """Initialize a ``CreateContactPatchResults`` object. Parameters ---------- model: Model - Model to create a CreateContactPatchResults object with default parameters. + Model to create a ``CreateContactPatchResults`` object with default parameters. error_code: ErrorCode, optional Error code associated with the contact patch creation operation. part_id: int, optional Contact patch part id. json_data: dict, optional - JSON dictionary to create a CreateContactPatchResults object with provided parameters. + JSON dictionary to create a ``CreateContactPatchResults`` object with provided parameters. Examples -------- @@ -3020,7 +3020,7 @@ def __init__( part_id) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "CreateContactPatchResults") json_data = param_json["CreateContactPatchResults"] if "CreateContactPatchResults" in param_json else {} @@ -3038,7 +3038,7 @@ def __init__( def set_default( error_code: ErrorCode = None, part_id: int = None): - """Set the default values of CreateContactPatchResults. + """Set the default values of the ``CreateContactPatchResults`` object. Parameters ---------- @@ -3052,7 +3052,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of CreateContactPatchResults. + """Print the default values of ``CreateContactPatchResults`` object. Examples -------- @@ -3110,14 +3110,14 @@ def __init__( model: CommunicationManager=None, json_data : dict = None, **kwargs): - """Initializes the StretchFreeBoundariesParams. + """Initialize a ``StretchFreeBoundariesParams`` object. Parameters ---------- model: Model - Model to create a StretchFreeBoundariesParams object with default parameters. + Model to create a ``StretchFreeBoundariesParams`` object with default parameters. json_data: dict, optional - JSON dictionary to create a StretchFreeBoundariesParams object with provided parameters. + JSON dictionary to create a ``StretchFreeBoundariesParams`` object with provided parameters. Examples -------- @@ -3131,7 +3131,7 @@ def __init__( self.__initialize() else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "StretchFreeBoundariesParams") json_data = param_json["StretchFreeBoundariesParams"] if "StretchFreeBoundariesParams" in param_json else {} @@ -3145,7 +3145,7 @@ def __init__( @staticmethod def set_default(): - """Set the default values of StretchFreeBoundariesParams. + """Set the default values of the ``StretchFreeBoundariesParams`` object. """ args = locals() @@ -3153,7 +3153,7 @@ def set_default(): @staticmethod def print_default(): - """Print the default values of StretchFreeBoundariesParams. + """Print the default values of ``StretchFreeBoundariesParams`` object. Examples -------- @@ -3191,16 +3191,16 @@ def __init__( error_code: ErrorCode = None, json_data : dict = None, **kwargs): - """Initializes the StretchFreeBoundariesResults. + """Initialize a ``StretchFreeBoundariesResults`` object. Parameters ---------- model: Model - Model to create a StretchFreeBoundariesResults object with default parameters. + Model to create a ``StretchFreeBoundariesResults`` object with default parameters. error_code: ErrorCode, optional Error code associated with failure of operation. json_data: dict, optional - JSON dictionary to create a StretchFreeBoundariesResults object with provided parameters. + JSON dictionary to create a ``StretchFreeBoundariesResults`` object with provided parameters. Examples -------- @@ -3216,7 +3216,7 @@ def __init__( error_code) else: if model is None: - raise ValueError("Invalid assignment. Either pass model or specify all properties") + raise ValueError("Invalid assignment. Either pass a model or specify all properties.") else: param_json = model._communicator.initialize_params(model, "StretchFreeBoundariesResults") json_data = param_json["StretchFreeBoundariesResults"] if "StretchFreeBoundariesResults" in param_json else {} @@ -3232,7 +3232,7 @@ def __init__( @staticmethod def set_default( error_code: ErrorCode = None): - """Set the default values of StretchFreeBoundariesResults. + """Set the default values of the ``StretchFreeBoundariesResults`` object. Parameters ---------- @@ -3244,7 +3244,7 @@ def set_default( @staticmethod def print_default(): - """Print the default values of StretchFreeBoundariesResults. + """Print the default values of ``StretchFreeBoundariesResults`` object. Examples -------- @@ -3275,3 +3275,210 @@ def error_code(self) -> ErrorCode: @error_code.setter def error_code(self, value: ErrorCode): self._error_code = value + +class TriangulateParams(CoreObject): + """Provides the parameters used for triangulation operation. + """ + _default_params = {} + + def __initialize( + self): + pass + + def __init__( + self, + model: CommunicationManager=None, + json_data : dict = None, + **kwargs): + """Initialize a ``TriangulateParams`` object. + + Parameters + ---------- + model: Model + Model to create a ``TriangulateParams`` object with default parameters. + json_data: dict, optional + JSON dictionary to create a ``TriangulateParams`` object with provided parameters. + + Examples + -------- + >>> triangulate_params = prime.TriangulateParams(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, "TriangulateParams") + json_data = param_json["TriangulateParams"] if "TriangulateParams" 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 ``TriangulateParams`` object. + + """ + args = locals() + [TriangulateParams._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 ``TriangulateParams`` object. + + Examples + -------- + >>> TriangulateParams.print_default() + """ + message = "" + message += ''.join(str(key) + ' : ' + str(value) + '\n' for key, value in TriangulateParams._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 + +class TriangulateResults(CoreObject): + """Results associated with triangulate operation. + """ + _default_params = {} + + def __initialize( + self, + error_code: ErrorCode, + n_faces_triangulated: int): + self._error_code = ErrorCode(error_code) + self._n_faces_triangulated = n_faces_triangulated + + def __init__( + self, + model: CommunicationManager=None, + error_code: ErrorCode = None, + n_faces_triangulated: int = None, + json_data : dict = None, + **kwargs): + """Initialize a ``TriangulateResults`` object. + + Parameters + ---------- + model: Model + Model to create a ``TriangulateResults`` object with default parameters. + error_code: ErrorCode, optional + Error code associated with failure of the operation. + This is a beta parameter. The behavior and name may change in the future. + n_faces_triangulated: int, optional + Number of faces that were triangulated. + This is a beta parameter. The behavior and name may change in the future. + json_data: dict, optional + JSON dictionary to create a ``TriangulateResults`` object with provided parameters. + + Examples + -------- + >>> triangulate_results = prime.TriangulateResults(model = model) + """ + if json_data: + self.__initialize( + ErrorCode(json_data["errorCode"] if "errorCode" in json_data else None), + json_data["nFacesTriangulated"] if "nFacesTriangulated" in json_data else None) + else: + all_field_specified = all(arg is not None for arg in [error_code, n_faces_triangulated]) + if all_field_specified: + self.__initialize( + error_code, + n_faces_triangulated) + 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, "TriangulateResults") + json_data = param_json["TriangulateResults"] if "TriangulateResults" in param_json else {} + self.__initialize( + error_code if error_code is not None else ( TriangulateResults._default_params["error_code"] if "error_code" in TriangulateResults._default_params else ErrorCode(json_data["errorCode"] if "errorCode" in json_data else None)), + n_faces_triangulated if n_faces_triangulated is not None else ( TriangulateResults._default_params["n_faces_triangulated"] if "n_faces_triangulated" in TriangulateResults._default_params else (json_data["nFacesTriangulated"] if "nFacesTriangulated" 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, + n_faces_triangulated: int = None): + """Set the default values of the ``TriangulateResults`` object. + + Parameters + ---------- + error_code: ErrorCode, optional + Error code associated with failure of the operation. + n_faces_triangulated: int, optional + Number of faces that were triangulated. + """ + args = locals() + [TriangulateResults._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 ``TriangulateResults`` object. + + Examples + -------- + >>> TriangulateResults.print_default() + """ + message = "" + message += ''.join(str(key) + ' : ' + str(value) + '\n' for key, value in TriangulateResults._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._n_faces_triangulated is not None: + json_data["nFacesTriangulated"] = self._n_faces_triangulated + [ 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\nn_faces_triangulated : %s" % (self._error_code, self._n_faces_triangulated) + 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 failure of the 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 n_faces_triangulated(self) -> int: + """Number of faces that were triangulated. + This is a beta parameter. The behavior and name may change in the future. + """ + return self._n_faces_triangulated + + @n_faces_triangulated.setter + def n_faces_triangulated(self, value: int): + self._n_faces_triangulated = value diff --git a/src/ansys/meshing/prime/internals/error_handling.py b/src/ansys/meshing/prime/internals/error_handling.py index 068fa5c594..4bba02ac0e 100644 --- a/src/ansys/meshing/prime/internals/error_handling.py +++ b/src/ansys/meshing/prime/internals/error_handling.py @@ -46,6 +46,7 @@ ErrorCode.INVALIDPRISMCONTROLS: "Conflict of prism settings on zonelets or invalid prism controls selected.", ErrorCode.PERIODICSURFACESNOTSUPPORTEDFORPRISMS: "Periodic surfaces selected for prism generation, not supported.", ErrorCode.ALREADYVOLUMEMESHED: "Already volume meshed.", + ErrorCode.INCREMENTALVOLUMEMESHINGNOTSUPPORTED: "Incremental volume meshing is not supported.", ErrorCode.VOLUMESNOTUPTODATE: "Volumes are not up to date. Update volumes and try again.", ErrorCode.QUADRATICMESHSUPPORTEDONLYFORTETS: "Quadratic meshing is supported only for tetrahedrons.", ErrorCode.NOACTIVESFFOUND: "Active size fields are not available.", @@ -58,13 +59,14 @@ ErrorCode.CADGEOMETRYNOTFOUND: "CAD Geometry not found.", ErrorCode.VOLUMENOTFOUND: "Volume not found.", ErrorCode.ZONENOTFOUND: "Zone not found.", - ErrorCode.NOTSUPPORTEDFORTOPOLOGYPART: "Operation is not supported for part with topology data. Try a topology based operation.", + ErrorCode.NOTSUPPORTEDFORTOPOLOGYPART: "Operation is not supported for part with topology data. Try a topology-based operation.", ErrorCode.ADDINGPROVIDEDENTITIESNOTSUPPORTEDFORTOPOLOGYPART: "Operation is not supported for part with topology data. Try add_topo_entities_to_zone in part.", - ErrorCode.MERGEZONELETSNOTSUPPORTEDFORTOPOLOGYPART: "Operation is not supported for part with topology data. Try a topology based operation.", - ErrorCode.MERGEVOLUMESNOTSUPPORTEDFORTOPOLOGYPART: "Operation is not supported for part with topology data. Try a topology based operation.", + ErrorCode.MERGEZONELETSNOTSUPPORTEDFORTOPOLOGYPART: "Operation is not supported for part with topology data. Try a topology-based operation.", + ErrorCode.MERGEVOLUMESNOTSUPPORTEDFORTOPOLOGYPART: "Operation is not supported for part with topology data. Try a topology-based operation.", ErrorCode.NOTSUPPORTEDFORHIGHERORDERMESHPART: "Not supported for part with higher order mesh.", + ErrorCode.NOTSUPPORTEDFORPOLYMESHPART: "Not supported for part with poly mesh.", ErrorCode.SPHEREATINVALIDNORMALNODESFAILED: "Sphere creation at invalid normal nodes failed.", - ErrorCode.INVALIDPLANEPOINTS: "Invalid plane points. You need to provide 3 points (9 coordinates).", + ErrorCode.INVALIDPLANEPOINTS: "Invalid plane points. You must provide 3 points (9 coordinates).", ErrorCode.PLANECOLLINEARPOINTS: "Collinear or duplicate points given to define plane.", ErrorCode.INVALIDREGISTERID: "Invalid register id provided. Register ids between 1 to 28 are valid.", ErrorCode.SURFACEFEATURETYPENOTSUPPORTED: "Surface search for provided feature type is not supported.", @@ -196,7 +198,8 @@ ErrorCode.WRAPPERCONTROL_LEAKPREVENTIONMPTCANNOTBELIVE: "Dead material point cannot be same as live.", ErrorCode.WRAPPERPATCHFLOWREGIONS_INVALIDHOLESIZE: "Hole size specified for dead region should be positive double.", ErrorCode.WRAPPERPATCHFLOWREGIONS_FAILED: "Failed to create patching surfaces.", - ErrorCode.WRAPPERPATCHFLOWREGIONS_TOOSMALLHOLESIZE: "Too small hole size provided for dead region.", + 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.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.", @@ -301,8 +304,9 @@ ErrorCode.TARGETWITHCELLZONELETS: "Target face zonelets with volume mesh on both sides.", ErrorCode.SIDEZONELETSNOTFIT: "Side face zonelets are not sweepable for thin volume mesh.", ErrorCode.SOURCETARGETZONELETSNOTFIT: "Source and target zonelets do not fit to thin volume mesh.", - ErrorCode.AUTOQUADMESHER_INVALIDMINMAXSIZES: "Min size is more than max size.", - ErrorCode.AUTOQUADMESHER_NEGATIVEINPUTPARAMETER: "Input parameters contains negative value.", + ErrorCode.AUTOQUADMESHER_INVALIDMINMAXSIZES: "Minimum size is more than maximum size.", + ErrorCode.AUTOQUADMESHER_NEGATIVEINPUTPARAMETER: "Input parameters contain one or more negative values.", + ErrorCode.FACEZONELETSHAVECELLSCONNECTED: "Face zonelets have cells connected.", } prime_warning_messages = { @@ -346,9 +350,15 @@ WarningCode.FACEZONELETSWITHOUTVOLUMES: "Face zonelets have no volume associated to them.", WarningCode.JOINEDZONELETSFROMMULTIPLEVOLUMES: "Joined zonelets from more than two volumes. The volumes are not auto updated on the zonelets.", WarningCode.FAILEDTOUPDATEVOLUMES: "Volumes are not updated after performing the operation. Compute the volumes again.", + WarningCode.UNPROCESSEDKEYWORDSINABAQUSFILE: "Some keywords are not processed. Check the unprocessed keywords in the summary log of the import results.", + WarningCode.EXPORTMAPDLANALYSISSETTINGSFAILED: "Export of analysis settings to separate file failed.", + WarningCode.WRITINGCONTACTPAIRSSKIPPED: "Writing of contact pairs skipped due to no surface or surface interaction definition.", + WarningCode.WRITINGTIESSKIPPED: "Writing of ties skipped due to no surface definition.", WarningCode.MULTIZONEMESHER_SURFACESCOPEVOLUMESCOPEINCONSISTENCY: "Topofaces of the volumes scoped are more than the topofaces of the surface scoped.", - WarningCode.NOCADGEOMETRYFOUND: "CAD geometry not found for some or all topo entities. Skipped projection for those topo entities.", - WarningCode.NOCADGEOMETRYPROJECTONFACETS: "CAD geometry not found for some or all topo entities. Projected on facets for those topo entities.", + WarningCode.NOCADGEOMETRYFOUND: "CAD geometry not found for some or all topoentities. Skipped projection for those topoentities.", + WarningCode.NOCADGEOMETRYPROJECTONFACETS: "CAD geometry not found for some or all topoentities. Mesh node projected on facets for those topoentities.", + WarningCode.FUSEOVERLAPREMOVALINCOMPLETE: "Self intersections found. Use Fuse operation to remove it.", + WarningCode.REMOVEOVERLAPWITHINTERSECT: "Self intersections found. Use Intersect operation to remove it.", }