How do I get the skin mesh nodes from an assembly body?

Options
  • How to get the skin mesh nodes from an assembly body instead of every part's surface.
  • I used the following snippet:

model = dpf.Model(file)

mesh = model.metadata.meshed_region

skin_mesh = dpf.operators.mesh.skin(mesh)

skin_nodes = skin_mesh.outputs.nodes_mesh_scoping()

Best Answer

  • tf90
    tf90 Member Posts: 3
    First Comment
    Answer ✓
    Options

    Thanks for your advice. But I have solved my issue with the property of Named Selections. I selected the target surfaces of the assembly body and defined them as a named selection 'surface'. Then I can access them following the named selection 'surface' and mesh_scoping().

Answers

  • Mike.Thompson
    Mike.Thompson Member, Employee Posts: 283
    First Anniversary First Comment 5 Likes Ansys Employee
    Options

    You should utilize the mesh scoping of the skin operator to 'scope' the operator to the specific section of the model you want the skin mesh. You pass the operator the 'mesh', which is the underlaying data about the entire mesh, but the scoping will tell the operator which section of the mesh to operate on. By default it will be all of the mesh. Most operators have a similar mesh scoping concept that is implemented as optional.

    skin_mesh.inputs.mesh_scoping.Connect(my_mesh_scoping) #my_mesh_scoping = mesh scoping for section of model you want