ansys.dpf.core.operators.mesh.decimate_mesh#

class ansys.dpf.core.operators.mesh.decimate_mesh(mesh=None, preservation_ratio=None, aggressiveness=None, config=None, server=None)#

Bases: ansys.dpf.core.dpf_operator.Operator

Decimate a meshed region

Parameters:
  • mesh (MeshedRegion) – Mesh to decimate

  • preservation_ratio (float, optional) – Target ratio of elements to preserve, the actual number of elements preserved might differ. Default value is 0.5.

  • aggressiveness (int, optional) – Quality measure for the resulting decimated mesh. Lower aggresiveness will provide a higher quality mesh with the tradeoff of higher execution time. Value range is 0 to 150, default is 0.

Returns:

mesh – Decimated mesh with triangle elements

Return type:

MeshedRegion

Examples

>>> from ansys.dpf import core as dpf
>>> # Instantiate operator
>>> op = dpf.operators.mesh.decimate_mesh()
>>> # Make input connections
>>> my_mesh = dpf.MeshedRegion()
>>> op.inputs.mesh.connect(my_mesh)
>>> my_preservation_ratio = float()
>>> op.inputs.preservation_ratio.connect(my_preservation_ratio)
>>> my_aggressiveness = int()
>>> op.inputs.aggressiveness.connect(my_aggressiveness)
>>> # Instantiate operator and connect inputs in one line
>>> op = dpf.operators.mesh.decimate_mesh(
...     mesh=my_mesh,
...     preservation_ratio=my_preservation_ratio,
...     aggressiveness=my_aggressiveness,
... )
>>> # Get output data
>>> result_mesh = op.outputs.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: InputsDecimateMesh#

Enables to connect inputs to the operator

Returns:

An instance of InputsDecimateMesh.

Return type:

inputs

property outputs: OutputsDecimateMesh#

Enables to get outputs of the operator by evaluating it

Returns:

An instance of OutputsDecimateMesh.

Return type:

outputs