Get nodes id of a tube
Hi, All
There are a lot of tubes in my mesh like this,
I tried to find all the tubes and get the details by hm_holedetectionfindholes and hm_holedetectiongetholedetails.
And here are the details of one of the tubes:
1 1 3.9811921085697 {62.20004 48.499683333328 -136.30000003709} {0 1.8871861306021e-024 1} {nodes 44671 44672 44673 44674 44678 44679} 0 {solids 135076 1 132674 2 134403 2 135075 0 135078 3 135077 2 136200 2 133480 2 145025 2 136942 3 135069 2 134396 2 134912 3 135056 2 135067 1 135065 0 134350 0 134964 1 138528 2 135073 2 134965 2 133350 2 134977 2 132689 2} 1 3.9811326678583 {62.2 48.5 -132.4} {0 2.4929684241893e-023 1} {nodes 42787 42792 42791 42790 42789 42788}
There are only rim-top and rim-bottom nodes in the details.
How can I get all nodes id of the tube?
Thanks.
Answers
-
Hey Matt,
I just saw this question related to your other one. Since it looks like these are not through holes you could get one of the bottom rim nodes on a mark and then use hm_appendmark with the by face option to get all the nodes in the hole. This would get any nodes in the bottom of the hole too though and not just of the sides of the tube. If it were a through whole it would get all the nodes on the face around the hole too which isn't very helpful.
Another approach since it looks like the holes are in the z direction would be to get a rim node and use hm_appendmark to get the adjacent nodes then find one with a z coordinate different enough from the first node to be in the hole then use that to select the face.
Happy coding.
0 -
Ben Buchanan said:
Hey Matt,
I just saw this question related to your other one. Since it looks like these are not through holes you could get one of the bottom rim nodes on a mark and then use hm_appendmark with the by face option to get all the nodes in the hole. This would get any nodes in the bottom of the hole too though and not just of the sides of the tube. If it were a through whole it would get all the nodes on the face around the hole too which isn't very helpful.
Another approach since it looks like the holes are in the z direction would be to get a rim node and use hm_appendmark to get the adjacent nodes then find one with a z coordinate different enough from the first node to be in the hole then use that to select the face.
Happy coding.
Thanks Ben,
Finally, I used *createmark nodes "by cylinder" with rim-top/rim-bottom center, radius and height to select inside nodes, and then *markdifference with another mark(smaller radius).
0 -
MattC said:
Thanks Ben,
Finally, I used *createmark nodes "by cylinder" with rim-top/rim-bottom center, radius and height to select inside nodes, and then *markdifference with another mark(smaller radius).
Nice. Glad you figured it out. That is a clever solution.
0