-
Hi @RobPasMue, is it possible to directly transfer models in memory between GeometryService and PyPrimeMesh? If not, what is the best (fastest) model transfer method or file type between those two ansys python packages? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @dkowollik! Currently there is no option to transfer a memory in model, though internally we are working in ways to do this across the entire ecosystem with common data models. This might take some time to happen though but it is one of the working lines for the ecosystem. The fastest way via file export/import would be to use the ".fmd" format. PyPrimeMesh has native support for that file format so my recommendation would be the following: from ansys.geometry.core import launch_modeler_with_geometry_service
modeler = launch_modeler_with_geometry_service()
design = modeler.create_design("MyDesign")
# Do your modelling operations
# ...
# Export to FMD
design.export_to_fmd() The previous call will generate a file called PyPrimeMesh should be able to read it natively then. Something like this should work as far as I know: import ansys.meshing.prime as prime
with prime.launch_prime() as session:
model = session.model
block_model = "MyDesign.fmd"
with prime.FileIO(model) as io:
_ = io.import_cad(block_model, params=prime.ImportCADParams(model))
print(model) |
Beta Was this translation helpful? Give feedback.
Hi @dkowollik!
Currently there is no option to transfer a memory in model, though internally we are working in ways to do this across the entire ecosystem with common data models. This might take some time to happen though but it is one of the working lines for the ecosystem.
The fastest way via file export/import would be to use the ".fmd" format. PyPrimeMesh has native support for that file format so my recommendation would be the following:
The prev…