Centroid of child components in Assembly

Is there anyway to Extract centroid of child components in Assembly using API?

Comments

  • caden_armstrong2
    caden_armstrong2 Member, User Group Leader Posts: 121 ✭✭✭
    edited October 2022
    You could:
    1. evaluate the centroid of each component in the context of it's part studio, using the evaluated featurescript endpoint.
    2. Translate that centroid using the transformation of the component in the assembly from the getassembly endpoint

    If you are trying to find the centroid of all child components collectively,
    3. You could then sum all of those centroids from #2, weighted against the mass of each component.

    If you are looking for a featurescript only way of doing it,
    You could make a featurescript that takes in bodies and calculates the centroid, and just run it in an incontext part studio in the context of the assembly. This is probably the easiest way of doing it.
  • Kirankumar_Thimmegowda
    Kirankumar_Thimmegowda Member Posts: 28 PRO
    Thanks Caden.