Skip to content

Axis system is not handled when there are more nested subpartsΒ #634

Open
@guoyin-zhao-ansys

Description

@guoyin-zhao-ansys

πŸ” Before submitting the issue

  • I have searched among the existing issues
  • I am using a Python virtual environment

🐞 Description of the bug

Hello team,

When having nested subpart, the axis system for the last subpart seems to be not relative to its parent node but the global cs.

πŸ“ Steps to reproduce

Simply run the project.py with following codes:

# ### Prepare the root part

root_part = p.create_root_part().commit()
root_part.create_body(name="Body.root").create_face(name="Face.root").set_vertices(
    [0, 0.1, 0.2, 0, 0.2, 0.2, 0.1, 0.2, 0.2]
).set_facets([0, 1, 2]).set_normals([0, 0, 1, 0, 0, 1, 0, 0, 1])
root_part.commit()

child_part1 = root_part.create_sub_part(name="SubPart.1").set_axis_system([5, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1]).commit()
child_part2 = child_part1.create_sub_part(name="SubPart.2").set_axis_system([5, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1]).commit()

child_part2.create_body(name="Body.1").create_face(name="Face.1").set_vertices(
    [0, 0.2, 0.4, 0, 0.4, 0.4, 0.2, 0.4, 0.4]
).set_facets([0, 1, 2]).set_normals([0, 0, 1, 0, 0, 1, 0, 0, 1])
child_part2.commit()
p.preview()

You will notice the body is at 5 mm to the origin instead of 10mm (subpart 1 is at 5mm to origin, subpart 2 is at 5mm to subpart 1 in x direction).

πŸ’» Which operating system are you using?

Windows

πŸ“€ Which ANSYS version are you using?

SPEOS RPC 2025 R1

🐍 Which Python version are you using?

3.11

πŸ“¦ Installed packages

ansys-api-speos        0.14.2
ansys-speos-core       0.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions