Jump to content
Jaggs

Get mass and volume of each component

Recommended Posts

Hello Friends,

 

I have lets say 100 components and I need to display each collector's mass, volume individually, can you please help me out.

 

With the piece of code shown below i am able to get net mass, volume of all the collectors which are displayed but not able to get individual collectors'

 

*createmark components 1 "displayed"

set i [hm_getmark comps 1]

foreach j $i {
set a [hm_getmass comps 1 "by comp id" $i]
puts $a

}

 

Thanks in advance.

Share this post


Link to post
Share on other sites

*createmark components 1 "displayed"

set i [hm_getmark comps 1]

foreach j $i {

*createmark comps 1 $j

set a [hm_getmass comps 1]

puts $a

}

It is giving the mass of all components because the mark 1 of components has all the displayed components in it. Each time the loop is run the mark needs to be updated with the id of the component.

Share this post


Link to post
Share on other sites

Hello Friends,

 

I have lets say 100 components and I need to display each collector's mass, volume individually, can you please help me out.

 

With the piece of code shown below i am able to get net mass, volume of all the collectors which are displayed but not able to get individual collectors'

 

*createmark components 1 "displayed"

set i [hm_getmark comps 1]

foreach j $i {

set a [hm_getmass comps 1 "by comp id" $i]

puts $a

}

 

Thanks in advance.

 

Hi,

There is available template for component summary

You can invoke the template from panel Post>summary>load the template "components">summary.  (optistruct, with other solver, name of the template file may differ)

Share this post


Link to post
Share on other sites

Thank you very much for the help people.


 


I have one more question, i need to find the volume of the solid now and I am using this commant "hm_getvolumeofsolid solids solidID ".


My question is what is solid id? Is there any difference between solid id and comp id?


 


Please let me know.

Share this post


Link to post
Share on other sites

Thank you very much for the help people.

 

I have one more question, i need to find the volume of the solid now and I am using this commant "hm_getvolumeofsolid solids solidID ".

My question is what is solid id? Is there any difference between solid id and comp id?

 

Please let me know.

Yes, there is a difference

solids belong to solid object

comps belong to component object

so solid is different from comp

to get solid ids you can use *createmarkpanel solids 1; puts [hm_getmark solids 1]

to get solid ids stored in component compid you can use *createmark solids 1 "by comp id" $compid;puts [hm_getmark solids 1]

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...