cross_reference Module

Inheritance diagram of pyNastran.bdf.bdf_interface.cross_reference

Links up the various cards in the BDF.

For example, with cross referencing…

>>> model = BDF()
>>> model.read_bdf(bdf_filename, xref=True)

>>> nid1 = 1
>>> node1 = model.nodes[nid1]
>>> node.nid
1

>>> node.xyz
[1., 2., 3.]

>>> node.Cid()
3

>>> node.cid
3

>>> node.cid_ref
CORD2S, 3, 1, 0., 0., 0., 0., 0., 1.,
        1., 0., 0.
# get the position in the global frame
>>> node.get_position()
[4., 5., 6.]

# get the position with respect to another frame
>>> node.get_position_wrt(model, cid=2)
[4., 5., 6.]

Without cross referencing…

>>> model = BDF()
>>> model.read_bdf(bdf_filename, xref=True)

>>> nid1 = 1
>>> node1 = model.nodes[nid1]
>>> node.nid
1

>>> node.xyz
[1., 2., 3.]

>>> node.Cid()
3

>>> node.cid
3

>>> node.cid_ref
None

# get the position in the global frame
>>> node.get_position()
Error!

Cross-referencing allows you to easily jump across cards and also helps with calculating things like position, area, and mass. The BDF is designed around the idea of cross-referencing, so it’s recommended that you use it.