COG and mass of unmeshed components
I'm dealing with the calculation of COG and mass of the unmeshed components in HyperMesh. Even though all the mats and props are assigned to the each component which contains solids, software doesn't give any COG or mass value.
I am able to find volume of solids and multiply with density to find mass but since nastran's summary template ctr_of_gravity only works with elements; looks like it is not able to calc COG as in a regular CAD tool.
Is there any way to find them out? I'm all ears for a TCL macro advice:)
Find more posts tagged with

Thanks Tinh. hm_getcentroid works now. Just in a different way.
*createmark solids 1 all
hm_getcentroid solids 1
Now I'm trying to directly transfer those xyz values from command window to create node by coordinates panel and obtain a complete macro including multiplication of density and volume to add the mass at that coordinate as CONM2 element
oh my god, viewing an attached photo on smartphone's browser is too difficult, @Rahul, could you please improve it. too difficult using community website, compare with old forum website ! even i cannot type codes.Thanks Tinh. hm_getcentroid works now. Just in a different way.
*createmark solids 1 all
hm_getcentroid solids 1
Now I'm trying to directly transfer those xyz values from command window to create node by coordinates panel and obtain a complete macro including multiplication of density and volume to add the mass at that coordinate as CONM2 element
hi Alihan, don't createmark all codes like this *createmark solids 1 "by comp id" $compid; #replace $compid with actual id of the component; *createnode {*}[hm_getcentroid solids 1]; it will create yellow node at centroid of component if you have many comps, make a loop!Thanks Tinh. hm_getcentroid works now. Just in a different way.
*createmark solids 1 all
hm_getcentroid solids 1
Now I'm trying to directly transfer those xyz values from command window to create node by coordinates panel and obtain a complete macro including multiplication of density and volume to add the mass at that coordinate as CONM2 element