find attached entities
another question regarding scripts for hypermesh: When i'am using the *duplicatemark command for nodes and then the *markprojectnormallytoline, while the line i'am projecting to is on a Free edge (produced by the *features command) i am Not able to get the Elements on the edge by using the *findmark command, because the duplicated and projected nodes are not attached to them. Is there any possibility to get These particular Elements? Something Like a makeattached command?
Answers
-
hi,
I am really a bit tough to understand what you are doing
so you want to stick the projected nodes to elements on free-edge line?
you can use *replacenode $nodeid1 $nodeid2
but you have to know nodes of the elements
till you know nodes of the elements, you can find the elements by *findmark. so this approach is meaningless
please describe more about your work then we can give you a hand
0 -
I actually Do this, i search around the duplicated nodes for nodes which are nearby to replace them by these projected ones. To Do this i have to loop through a list of all the node on all the edges since i want to keep the User slection as simple as possible. But this search takes a while, so i thought since the projected nodes are on the line which is on the edge allready, that there could be another possibility to shorten up this search by only taking the nodes which are attached to the Elements which the projected node is touching but Not attached to, since its projected. But i think there is no possibility because the projected nodes are just Not attached to anything... Hope this makes my question clearer. The pourpose of my script should be to select a number of nodes on a edge of One component, select an edge of another comp and create perpendicular rigids between the selected nodes and the other conponent automatically... Its working perfectly, but the User has to select the nodes to be projected, the component wehre to project as well as the line on the correct edge. I only want to reduce the number of selection and make it faster..
0 -
yes, i see. it is possible if you want to select only nodes on the free edges
first using *findedges to create free edges
then using *createmark nodes 1 'by comp name' ^edges will select nodes on free edges
so searching will be faster than doing for all nodes
or another approach, using hm_getclosestnode (or hwat procedures) will find the closest node then you don't need to write searching loop
0 -
Ok, yes this is how i Do it at the Moment, still i thought if there would be another possibility to reduce the number of searched nodes, but i think the EDGE nodes of the particular component stays the best way to Do it.
The hm_findclosestnode is a good idea as well, did Not Know it. Thank you.
0