Skip to main content

DPF Framework 2026 R1

utility:merge meshes

Last update: 31.07.2026

Version: 0.0.0

Description

Take a set of meshes and assemble them in a unique one

Inputs

This table lists the input pins for this operator. Input pins define the data that the operator requires to perform its operation. Some inputs are required, while others are optional and provide additional configuration. Each parameter is detailed in the sections that follow the table.

Pin number Name Status Expected type(s)
-201 naive_merge_elements bool
-200 should_merge_named_selections bool
0 meshes Required vector<shared_ptr<abstract_meshed_region>>, abstract_meshed_region, meshes_container
101 merge_method int32
102 box_size double
103 remove_duplicate_elements int32

naive_merge_elements (Pin -201)

  • Required: No
  • Expected type(s): bool

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 (Pin -200)

  • Required: No
  • Expected type(s): bool

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.

meshes (Pin 0)

A vector of meshed region to merge or meshed region from pin 0 to ...

merge_method (Pin 101)

  • Required: No
  • Expected type(s): int32

0: merge by distance, 1: merge by node id (default)

box_size (Pin 102)

  • Required: No
  • Expected type(s): double

Box size used when merging by distance. Default value is 1e-12.

remove_duplicate_elements (Pin 103)

  • Required: No
  • Expected type(s): int32

0: keep duplicate elements (default), 1: remove duplicate elements

Outputs

This table lists the output pins for this operator. Output pins provide the results of the operator's computation and can be connected to inputs of other operators or retrieved for further processing. Each output is detailed in the sections that follow the table.

Pin number Name Expected type(s)
0 merges_mesh abstract_meshed_region

merges_mesh (Pin 0)

Configurations

This operator supports configuration options that modify its behavior.

mutex

  • Expected type(s): bool
  • Default value: false

If this option is set to true, the shared memory is prevented from being simultaneously accessed by multiple threads.

read_inputs_in_parallel

  • Expected type(s): bool
  • Default value: false

If this option is set to true, the operator's inputs will be evaluated in parallel.

Scripting

This operator can be accessed through scripting interfaces using these identifiers.

Category: utility

Plugin: core

Scripting name: merge_meshes

Full name: utility.merge_meshes

Internal name: merge::mesh

License: None

Examples

These examples demonstrate how to use this operator in different programming environments. Each example shows how to instantiate the operator, connect the required inputs, and retrieve the output.

C++
#include "dpf_api.h"

ansys::dpf::Operator op("merge::mesh"); // operator instantiation
op.connect(-201, my_naive_merge_elements);
op.connect(-200, my_should_merge_named_selections);
op.connect(0, my_meshes);
op.connect(101, my_merge_method);
op.connect(102, my_box_size);
op.connect(103, my_remove_duplicate_elements);
ansys::dpf::MeshedRegion my_merges_mesh = op.getOutput<ansys::dpf::MeshedRegion>(0);
CPython
import ansys.dpf.core as dpf

op = dpf.operators.utility.merge_meshes() # operator instantiation
op.inputs.naive_merge_elements.connect(my_naive_merge_elements)
op.inputs.should_merge_named_selections.connect(my_should_merge_named_selections)
op.inputs.meshes1.connect(my_meshes1)
op.inputs.meshes2.connect(my_meshes2)
op.inputs.merge_method.connect(my_merge_method)
op.inputs.box_size.connect(my_box_size)
op.inputs.remove_duplicate_elements.connect(my_remove_duplicate_elements)
my_merges_mesh = op.outputs.merges_mesh()
IPython
import mech_dpf
import Ans.DataProcessing as dpf

op = dpf.operators.utility.merge_meshes() # operator instantiation
op.inputs.naive_merge_elements.Connect(my_naive_merge_elements)
op.inputs.should_merge_named_selections.Connect(my_should_merge_named_selections)
op.inputs.meshes.Connect(my_meshes)
op.inputs.merge_method.Connect(my_merge_method)
op.inputs.box_size.Connect(my_box_size)
op.inputs.remove_duplicate_elements.Connect(my_remove_duplicate_elements)
my_merges_mesh = op.outputs.merges_mesh.GetData()

Changelog

  • Version 0.0.0: Initial release.

Connect with Ansys