Find nodes in a set

31 views
Skip to first unread message

Thomas Brooks

unread,
Mar 11, 2016, 5:21:05 PM3/11/16
to pyNastran Discuss
How do I find out which nodes are in one of my model's sets?

Thomas

Steven Doyle

unread,
Mar 11, 2016, 10:37:30 PM3/11/16
to pyNastran Discuss
I don't understand the question.  What is your end goal?

On Fri, Mar 11, 2016 at 2:21 PM, Thomas Brooks <thomas.b...@gmail.com> wrote:
How do I find out which nodes are in one of my model's sets?

Thomas

--
You received this message because you are subscribed to the Google Groups "pyNastran Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pynastran-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thomas Brooks

unread,
Mar 12, 2016, 8:20:37 PM3/12/16
to pyNastran Discuss
I have a grid set (SET card in NASTRAN), and I would like to get a list of the nodes in that grid set into python so that I can perform an action on all of those nodes like shifting their location.

Steven Doyle

unread,
Mar 13, 2016, 5:52:44 PM3/13/16
to pyNastran Discuss
Access the SETx card that is stored in model.sets.  Depending on the type of SETx card (there is no "SET" card), take a look at the classes in pyNastran.bdf.cards.bdf_sets and look at the data members that are stored in the class.  Then write a loop to move the nodes based on the IDs.

How you know those are nodes vs. elements depends on context, so I can't give a clear answer without a more concrete example.  The GUI uses SETx cards to link to SPLINEx cards and draw CAEROx subpanel IDs for control surfaces, so you can't just look at the SETx card.

Thomas Brooks

unread,
Mar 13, 2016, 6:28:53 PM3/13/16
to pyNastran Discuss
Thanks Steve, I will give that a try. I am using MSC Nastran and calling the SET card like it is called in on p. 55 of this MSC Release Guide: http://web.mscsoftware.com/support/prod_support/nastran/documentation/rg_2005.pdf

Thomas Brooks

Steven Doyle

unread,
Mar 13, 2016, 6:42:30 PM3/13/16
to pyNastran Discuss
I've never seen STEP cards used in the case control deck, so I doubt that would work, but a case control SET is very different than a bulk data SET in the way you access things.  I guess I still don't understand what you are trying to do.  Are you trying to modify geometry or are you trying to get find out what you are supposed to parse in the OP2?  Can you be more specific and ideally attach a real example?

On Sun, Mar 13, 2016 at 3:28 PM, Thomas Brooks <thomas.b...@gmail.com> wrote:
Thanks Steve, I will give that a try. I am using MSC Nastran and calling the SET card like it is called in on p. 55 of this MSC Release Guide: http://web.mscsoftware.com/support/prod_support/nastran/documentation/rg_2005.pdf

Thomas Brooks

--
Reply all
Reply to author
Forward
0 new messages