Getting IDs of children of objects

General topics about Trelis/Cubit, such as localization, GUI, etc.

Getting IDs of children of objects

Postby Cubit User » Fri Jun 08, 2012 8:52 am

I work extensively with scripts to run cubit. Is there a way I can get the id’s of the children of objects? For example, can I get the id’s of the two vertexes of a line?
Cubit User
 
Posts: 44
Joined: Wed May 16, 2012 12:42 pm

Re: Getting IDs of children of objects

Postby csimsoft Moderator » Fri Jun 08, 2012 9:43 am

From the command line, you can do things such as:

List vertex in curve 1

That will display information about each of its attached vertices, including their location and id number

Or

Locate vertex in curve 1

will display on the screen the id numbers of the attached vertices.

You can also use the python interface to get ids of parents and children.

If you are using GeomEntity Class member functions you can get the vertices attached to the curves like this

vertices = curve.vertices()

You can also use the the CubitInterface class member functions. You can use:

vertex_list = cubit.get_relatives("curve", 12, "vertex")

I hope this helps.
csimsoft
csimsoft Moderator
 
Posts: 236
Joined: Tue Feb 14, 2012 5:59 pm
Location: American Fork, UT


Return to General Topics

Who is online

Users browsing this forum: No registered users and 1 guest

cron

Search / Mark

User Control Panel

Login

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 50 on Mon Feb 23, 2015 7:54 pm

Users browsing this forum: No registered users and 1 guest