🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Script to Compare Geometry Files

User: "Jeffersondhv"
Altair Community Member
Updated by Jeffersondhv

Hello all,

 

I'm trying to write a code to compare the geometries of two different files.

I'm able to put both files together, where the reference has its components with a modified name like COMPNAME_REF (added '_REF' to the name).

This way I'm able to match the names of the components, which should be the same leaving apart the modification applied in the name.

From there my intention was to compare the matched geometries' position, orientation and volume/surface area to check for alterations.

To do so, I'm using the following functions: hm_getcentroid, hm_getvolumeofsolids

 

However, some components present errors when trying to get their centroid or volume, giving me messages like: 

 

hm_getcentroid: bad geometry found.

 

hm_getvolumeofsolid:  calculation failure.

 

But the solids do not have any visible mistake.

What could be causing this?

 

Thanks,

Jefferson

Find more posts tagged with

Sort by:
1 - 2 of 21
    User: "tinh"
    Altair Community Member
    Updated by tinh

    Maybe cad has some problems

    You can use comparison tool, don't need script

    It is in pulldown menu Mesh

    User: "Jeffersondhv"
    Altair Community Member
    OP
    Updated by Jeffersondhv

    I didn't know about this option.

    Thanks for letting me know about it.

    However as I could customize the script as desired, it suits my needs better.

    But it's good to know about it.

     

    Thank you tinh