Extract Force Reaction and corresponding coordinates

cobonz
cobonz Member Posts: 8
First Comment
**

Hi Together,

I wrote a script to automatically extract contact forces. The script creates a force reaction result and takes a contact. Then the contact Force Reaction is written to a csv file. As I have to modify my model from time to time it would be helpful if I extract beside the forces also the center of the contact (coordinates x,y,z) to later be able to rearrange the results to old results. In the graphics for a force Reaction I can for example see an arrow. Can I somehow extract the origin of this vector (which is in the middle of the contact face)

Best Answer

  • Abel Ramos
    Abel Ramos Member, Employee Posts: 42
    5 Answers 10 Comments 5 Likes First Anniversary
    ✭✭✭✭
    Answer ✓

    Hello, you could try to get the face(s) id(s), and with the geoData get its centroid.

    Could something like this work for your needs?

    face=ExtAPI.SelectionManager.CurrentSelection   
    geoData= ExtAPI.DataModel.GeoData   
    geoFace=geoData.GeoEntityById(face.Ids[0])  
    geoFace.Centroid
    

    Best Regards,