Selecting elements of component A at a some distance (say within 3mm) from elements of component B.
Hi all. I have a list of element IDs of the same component (say . Now I want to select elements of other components (more than one component possible) that are at a distance of, say, within 3mm of the given elements along one particular direction (not the element normal but the direction vector is given and is the same for all elements) using TCL code. I don't know how to achieve this.
I have tried the following:
1) Find nodes of elements -> create lines of 3mm length along the given vector -> create nodes at intersection of line and surfaces (if any) and find out the new nodes created.
I thought of finding associated elements and components using nodes but it is not possible as nodes are not associated with any geometry. Now if I try to associate nodes to a surface, I need a surface ID which I don't know. So this method did not work.
2) Create boxes/blocks of no thickness and length 3mm along the given vector and find the surfaces "by block/box entity" ids. This may be done but I have thousands of elements. And I will need a loop to create a number of boxes/blocks that will slow down the process. And I don't want that.
So, I want to know if I may find surfaces or components using temporary nodes (unassociated to any geometry) created above, without knowing surface ids? Or if there is a way of creating more than one box/block simultaneously using nodes and directions on a mark? Or is there any other better way to solve the problem? As you may see my TCL knowledge is limited but I will learn more if need be so even if there is a complicated but fast way to solve the problem, please let me know.
Regards,
Rachit
Best Answer
-
Hi
Maybe you can use
hm_getnearbyentities
and define the vector and radius.. pretty much selecting entities inside a cylinder.
I hope this is helpful
Regards
0
Answers
-
Hi
Maybe you can use
hm_getnearbyentities
and define the vector and radius.. pretty much selecting entities inside a cylinder.
I hope this is helpful
Regards
0 -
Rogerio Nakano_21179 said:
Hi
Maybe you can use
hm_getnearbyentities
and define the vector and radius.. pretty much selecting entities inside a cylinder.
I hope this is helpful
Regards
Thanks for your reply. It works for me.
Regards,
Rachit
0