How to programmatically modify geometry and mesh in a *.pre file?

Maruf Hossain_21119
Maruf Hossain_21119 Altair Community Member
edited July 2023 in Community Q&A

We need a way to run a few iterations of simulations, where the scattering geometry will be rotated and/or translated in each iteration. The usual workflow is to use the parameter sweep macro. However, we do not need to iterate every possible combination, rather what we need is an optimization scheme where we
(a) simulate one geometry configuration (b) process the data (c) decide how to modify the geometry based on this data. 

The next best thing is to use Lua based API. We gave it a shot, but stopped for two reasons: 1. Lua does not offer the advanced math libraries we need to process the data, 2. we want to avoid using the CADFEKO GUI.

So I was looking to modify the *.pre file generated by the CADFEKO interface when we import the geometry and set up the initial settings. But it appears the prefeko files import mesh files instead of geometry. 

What is the best possible way to programmatically modify a geometry and mesh it without explicitly opning the CADFEKO GUI?

Tagged:

Answers