Synergy between Compose and Matrix Browser

robertavarela
robertavarela New Altair Community Member
edited October 2020 in Community Q&A

I'd like to share the nice and slick synergy Compose has with Matrix Browser, a feature in HyperMesh to handle model data in table format. This is the typical use case when the model data will lead the process and Compose will play as the Math/Automation engine.

Let’s assume that we have the model ExampleRib.fem (attached) and that we would like to get the central coordinates X, Y and Z of a few elements:

<?xml version="1.0" encoding="UTF-8"?>image.thumb.png.e19f8c10c5e8f2022388c4f18d9d9c27.png

In this example, I’d like to calculate the central distance of these elements to the point (0,0,0), which would be simply the square root of x²+y²+z². For that, I created a custom Compose function distZero (also attached):

image.png.8f96fc1e6cfe5318972655bc08709d9b.png

Which will receive as inputs from HyperMesh the coordinates X, Y and Z that I queried with Matrix Browser.

In order to expose the Compose function to other HyperWorks applications, we need to register the function. This is done clicking on the right mouse button on Register Function in Compose:image.png.bf18eb3b5f49a9917cbae32c7f6932ae.png

After this step, we may now see that the function has been registered under the same mouse click shown above

under Show Registered Functions button. Once it is registered, we may now use it inside HyperMesh + Matrix Browser:

image.png.5d3b33c59f590c8b44c39dbf70ae9238.png

The function will be available without the need for closing HyperMesh and reopening. Then we give the columns that will serve as arguments:

image.png.83ac91f7f397bee9fa8e8e0fa77b982e.png

And it's done! The custom Compose function calculated everything and the results are shown in a new column:

image.png.b0e9925b900e211e957bd2dd73b36994.png

Regards,

Roberta

Unable to find an attachment - read this blog

Tagged: