ansys.dpf.core.operators.utility.merge_meshes#
- class ansys.dpf.core.operators.utility.merge_meshes(naive_merge_elements=None, should_merge_named_selections=None, meshes1=None, meshes2=None, merge_method=None, box_size=None, remove_duplicate_elements=None, config=None, server=None)#
Bases:
ansys.dpf.core.dpf_operator.Operator
Take a set of meshes and assemble them in a unique one
- Parameters:
naive_merge_elements (bool, optional) – If true, merge the elemental Property Fields of the input meshes assuming that there is no repetition in their scoping ids. Default is false.
should_merge_named_selections (bool, optional) – For certain types of files (such as RST), scoping from names selection does not need to be merged.If this pin is true, the merge occurs. If this pin is false, the merge does not occur. Default is true.
meshes1 (MeshedRegion or MeshesContainer) – A vector of meshed region to merge or meshed region from pin 0 to …
meshes2 (MeshedRegion or MeshesContainer) – A vector of meshed region to merge or meshed region from pin 0 to …
merge_method (int, optional) – 0: merge by distance, 1: merge by node id (default)
box_size (float, optional) – Box size used when merging by distance. Default value is 1e-12.
remove_duplicate_elements (int, optional) – 0: keep duplicate elements (default), 1: remove duplicate elements
- Returns:
merges_mesh
- Return type:
Examples
>>> from ansys.dpf import core as dpf
>>> # Instantiate operator >>> op = dpf.operators.utility.merge_meshes()
>>> # Make input connections >>> my_naive_merge_elements = bool() >>> op.inputs.naive_merge_elements.connect(my_naive_merge_elements) >>> my_should_merge_named_selections = bool() >>> op.inputs.should_merge_named_selections.connect(my_should_merge_named_selections) >>> my_meshes1 = dpf.MeshedRegion() >>> op.inputs.meshes1.connect(my_meshes1) >>> my_meshes2 = dpf.MeshedRegion() >>> op.inputs.meshes2.connect(my_meshes2) >>> my_merge_method = int() >>> op.inputs.merge_method.connect(my_merge_method) >>> my_box_size = float() >>> op.inputs.box_size.connect(my_box_size) >>> my_remove_duplicate_elements = int() >>> op.inputs.remove_duplicate_elements.connect(my_remove_duplicate_elements)
>>> # Instantiate operator and connect inputs in one line >>> op = dpf.operators.utility.merge_meshes( ... naive_merge_elements=my_naive_merge_elements, ... should_merge_named_selections=my_should_merge_named_selections, ... meshes1=my_meshes1, ... meshes2=my_meshes2, ... merge_method=my_merge_method, ... box_size=my_box_size, ... remove_duplicate_elements=my_remove_duplicate_elements, ... )
>>> # Get output data >>> result_merges_mesh = op.outputs.merges_mesh()
- _inputs#
- _outputs#
- static _spec() ansys.dpf.core.operators.specification.Specification #
- static default_config(server: ansys.dpf.core.server_types.AnyServerType = None) ansys.dpf.core.config.Config #
Returns the default config of the operator.
This config can then be changed to the user needs and be used to instantiate the operator. The Configuration allows to customize how the operation will be processed by the operator.
- Parameters:
server – Server with channel connected to the remote or local instance. When
None
, attempts to use the global server.- Returns:
A new Config instance equivalent to the default config for this operator.
- Return type:
config
- property inputs: InputsMergeMeshes#
Enables to connect inputs to the operator
- Returns:
An instance of InputsMergeMeshes.
- Return type:
inputs
- property outputs: OutputsMergeMeshes#
Enables to get outputs of the operator by evaluating it
- Returns:
An instance of OutputsMergeMeshes.
- Return type:
outputs