Jump to content
vipin

Select elements from a set of nodes

Recommended Posts

Hi all,

 

Is there any direct api to select elements from a set of nodes?( For example in the image i need the highlighted elements, dont need the adjacent elements to be selected.)

I tried *findmark and *createmark which are selecting the nearby elements too.

 

 

image.png.3c982e0171fe1c3a97b3ec6b7075d8a0.png

Share this post


Link to post
Share on other sites

Hi Vipin

You can ignore adjacent elems

*createmark nodes 1 {*}$NodeList

*createmark elems 1 "by node" {*}[hm_getmark nodes 1]

*createmark elems 1 reverse

*appendmark elems 1 "by adjacent"

*createmark elems 1 reverse

Pandurang likes this

Share this post


Link to post
Share on other sites

Another solution you can try is the following:

hm_createmark nodes 1 "by id only" $NodeList;
hm_createmark nodes 1 advanced reverse;
hm_createmark elems 1 "by nodes" [hm_getmark nodes 1];
hm_getmark elems 1;

 

Pandurang likes this

Share this post


Link to post
Share on other sites

Just another way to handle this....

 

*createmarkpanel nodes 1 "Select nodes to which the attached elements have to be determined"
eval "*createmark elems 1 \"by nodes\" [hm_getmark nodes 1]"
eval "*createmark nodes 2 \"by elems\" [hm_getmark elems 1]"
*marknotintersection nodes 1 nodes 2
eval "*createmark elems 2 \"by nodes\" [hm_getmark nodes 1]"
*markdifference elems 1 elems 2
set attached_elem_list [hm_getmark elems 1]

tinh, Pandurang and vipin like this

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...