I would like to create a UD subroutine for selecting nodes following a certain pattern.
Can you please provide the CylindricalSelection as a template / upload a UD version to gitlab?
UserDefinedObject UD NodeSelectionUD {
cz 249 mm
}
TetSolidList ttL Geometry {
ReadFile Prism.mrs
EditNodeList {
ExecUserDefinedCommand UD
}
}
rwendner wrote:Can you please also provide the source code for how you can reach the coordinates of a node of a certain list, i.e. the underlying code for
Node `ListName' cl 5 cm 0. cm 8 cm.
Node `ListName' `nodeIndex'
Thank you
Node *pt = new Node(c0x, c0y, c0z); // node of reference
real dmn = M_BIG, dst;
Node *nm = NULL; // pointer to closest node
for (int i=0; i<num; i++) { // loop over all nodes in a node list
dst = pt->calcDist(nd[i]);
if (dst < dmn) {
dmn = dst;
nm = nd[i];
}
}
Users browsing this forum: No registered users and 1 guest