ansys / pymechanical

Pythonic interface to Ansys Mechanical
https://mechanical.docs.pyansys.com/
MIT License
30 stars 13 forks source link

add open-usd exporter #701

Closed koubaa closed 2 months ago

koubaa commented 2 months ago

The API isn't so clean yet. An example script looks like this:

import ansys.mechanical.core as mech
project_file=r"D:\path\to\project.mechdat"

usda_file = r"D:\path\to\scene.usda"

app = mech.App(version=242, db_file=project_file)
app.open(project_file)

print(app)
from ansys.mechanical.core.embedding.viz.usd_converter import to_usd_file
print(f"converting {project_file} to usda at {usda_file}")
to_usd_file(app, usda_file)
codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 76.80%. Comparing base (6fb184a) to head (3edd5d7).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #701 +/- ## ========================================== - Coverage 77.56% 76.80% -0.77% ========================================== Files 31 31 Lines 1970 1970 ========================================== - Hits 1528 1513 -15 - Misses 442 457 +15 ```