Jump to content
  • Announcements

    • Rahul Ponginan

      Please click here for a short but important announcement   03/26/17

      Dear Users Our Commercial and Academic users around the world can use these same forums here as before i.e. the Altair Support Forum , Commercial users from India with solver queries can go to the Solver Forum for India Commercial Users , Academic Users from India and AOC India Participants are requested to go to the Forum for India Academic Users and AOC India Participants , We will be tending to all queries in all the forums promptly as before, thank you for your understanding. 
masuarez1122

how to select solid to edit it

Recommended Posts

I'm new to TCL scripting, and I'm looking for a way to select a solid by its location.  I looked into *createmark with the "by box"/"by cylinder" option, but they don't work for solids. 

 

"This is currently supported for nodes, elements, connectors, components (FE and connectors only), loads, equations, loadcols, systems, systcols, vectors, vectorcols, blocks, groups, sets and contactsurfs" - from Altair 14.0 documentation

 

I would also use the same method to find surfaces to edit solids. 

 

Can somebody help with this? 

 

Share this post


Link to post
Share on other sites

I found another post that asked basically the same question (

 using hm_measureshortestdistance2 works, I just need to figure out how to call the entity_id that it returns.

 

for example, I created a mark of all my solids *createmark solids 2 1-1000

 

then I measured the distance between a node at (0 76 81) and all my solids with hm_measureshortestdistance2 0 76 81 solids 2 0 0

 

I get the following:

0 0 0 0 44 0 76 81

 

my solid id is 44, but how do I extract it?

 

Thank you

 

Share this post


Link to post
Share on other sites

Hi

 

You can get the solid id in the variable 'id' as following:

set id [lindex [hm_measureshortestdistance2 0 76 81 solids 2 0 0] 4]

or

lassign [hm_measureshortestdistance2 0 76 81 solids 2 0 0] d dx dy dz id

Hope it helps.

tinh likes this

Share this post


Link to post
Share on other sites
12 hours ago, akitoguc said:

Hi

 

You can get the solid id in the variable 'id' as following:


set id [lindex [hm_measureshortestdistance2 0 76 81 solids 2 0 0] 4]

or


lassign [hm_measureshortestdistance2 0 76 81 solids 2 0 0] d dx dy dz id

Hope it helps.

 

Thank you, akitoguc, that is cleaner code than what i had.  I had two extra lines to achieve the same thing.  

 

I appreciate your time and help.  

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×