ansys.dpf.core.operators.mesh.mesh_cut#
- class ansys.dpf.core.operators.mesh.mesh_cut(field=None, iso_value=None, closed_surface=None, mesh=None, slice_surfaces=None, config=None, server=None)#
Bases:
ansys.dpf.core.dpf_operator.Operator
Extracts a skin of the mesh in triangles in a new meshed region.
- Parameters:
field (Field) – Field containing the values for the iso-surface computation. The mesh can be retrieved from this field’s support or through pin 2.
iso_value (float) – iso value
closed_surface (int) – 1: closed surface, 0: iso surface.
mesh (MeshedRegion, optional) – Mesh to compute the iso-surface from. Used when not given through the support of the field in pin 0.
slice_surfaces (bool) – True: slicing will also take into account shell and skin elements. False: slicing will ignore shell and skin elements. The default is true.
- Returns:
mesh
- Return type:
Examples
>>> from ansys.dpf import core as dpf
>>> # Instantiate operator >>> op = dpf.operators.mesh.mesh_cut()
>>> # Make input connections >>> my_field = dpf.Field() >>> op.inputs.field.connect(my_field) >>> my_iso_value = float() >>> op.inputs.iso_value.connect(my_iso_value) >>> my_closed_surface = int() >>> op.inputs.closed_surface.connect(my_closed_surface) >>> my_mesh = dpf.MeshedRegion() >>> op.inputs.mesh.connect(my_mesh) >>> my_slice_surfaces = bool() >>> op.inputs.slice_surfaces.connect(my_slice_surfaces)
>>> # Instantiate operator and connect inputs in one line >>> op = dpf.operators.mesh.mesh_cut( ... field=my_field, ... iso_value=my_iso_value, ... closed_surface=my_closed_surface, ... mesh=my_mesh, ... slice_surfaces=my_slice_surfaces, ... )
>>> # 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: InputsMeshCut#
Enables to connect inputs to the operator
- Returns:
An instance of InputsMeshCut.
- Return type:
inputs
- property outputs: OutputsMeshCut#
Enables to get outputs of the operator by evaluating it
- Returns:
An instance of OutputsMeshCut.
- Return type:
outputs