Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/source/_static/dpf_operators.html

Large diffs are not rendered by default.

44 changes: 44 additions & 0 deletions src/ansys/dpf/core/operators/mesh/skin.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ class skin(Operator):
mesh shell elements (boolean = 1) are
duplicated, one per each orientation,
or (boolean = 0) remain unchanged.
add_beam : bool, optional
If input mesh contains beam elements, output
mesh beam elements (boolean = 1) are
added or (boolean = 0) are ignored.


Examples
Expand All @@ -45,12 +49,15 @@ class skin(Operator):
>>> op.inputs.mesh_scoping.connect(my_mesh_scoping)
>>> my_duplicate_shell = bool()
>>> op.inputs.duplicate_shell.connect(my_duplicate_shell)
>>> my_add_beam = bool()
>>> op.inputs.add_beam.connect(my_add_beam)

>>> # Instantiate operator and connect inputs in one line
>>> op = dpf.operators.mesh.skin(
... mesh=my_mesh,
... mesh_scoping=my_mesh_scoping,
... duplicate_shell=my_duplicate_shell,
... add_beam=my_add_beam,
... )

>>> # Get output data
Expand All @@ -66,6 +73,7 @@ def __init__(
mesh=None,
mesh_scoping=None,
duplicate_shell=None,
add_beam=None,
config=None,
server=None,
):
Expand All @@ -78,6 +86,8 @@ def __init__(
self.inputs.mesh_scoping.connect(mesh_scoping)
if duplicate_shell is not None:
self.inputs.duplicate_shell.connect(duplicate_shell)
if add_beam is not None:
self.inputs.add_beam.connect(add_beam)

@staticmethod
def _spec():
Expand Down Expand Up @@ -111,6 +121,14 @@ def _spec():
duplicated, one per each orientation,
or (boolean = 0) remain unchanged.""",
),
3: PinSpecification(
name="add_beam",
type_names=["bool"],
optional=True,
document="""If input mesh contains beam elements, output
mesh beam elements (boolean = 1) are
added or (boolean = 0) are ignored.""",
),
},
map_output_pin_spec={
0: PinSpecification(
Expand Down Expand Up @@ -210,6 +228,8 @@ class InputsSkin(_Inputs):
>>> op.inputs.mesh_scoping.connect(my_mesh_scoping)
>>> my_duplicate_shell = bool()
>>> op.inputs.duplicate_shell.connect(my_duplicate_shell)
>>> my_add_beam = bool()
>>> op.inputs.add_beam.connect(my_add_beam)
"""

def __init__(self, op: Operator):
Expand All @@ -220,6 +240,8 @@ def __init__(self, op: Operator):
self._inputs.append(self._mesh_scoping)
self._duplicate_shell = Input(skin._spec().input_pin(2), 2, op, -1)
self._inputs.append(self._duplicate_shell)
self._add_beam = Input(skin._spec().input_pin(3), 3, op, -1)
self._inputs.append(self._add_beam)

@property
def mesh(self):
Expand Down Expand Up @@ -286,6 +308,28 @@ def duplicate_shell(self):
"""
return self._duplicate_shell

@property
def add_beam(self):
"""Allows to connect add_beam input to the operator.

If input mesh contains beam elements, output
mesh beam elements (boolean = 1) are
added or (boolean = 0) are ignored.

Parameters
----------
my_add_beam : bool

Examples
--------
>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.mesh.skin()
>>> op.inputs.add_beam.connect(my_add_beam)
>>> # or
>>> op.inputs.add_beam(my_add_beam)
"""
return self._add_beam


class OutputsSkin(_Outputs):
"""Intermediate class used to get outputs from
Expand Down
Binary file modified src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll
Binary file not shown.
Binary file modified src/ansys/dpf/gatebin/DPFClientAPI.dll
Binary file not shown.
Binary file modified src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so
Binary file not shown.
Binary file modified src/ansys/dpf/gatebin/libDPFClientAPI.so
Binary file not shown.
Loading