cross_reference Module

digraph inheritance84f5a199e3 { bgcolor=transparent; rankdir=LR; size=""; "pyNastran.bdf.bdf_interface.attributes.BDFAttributes" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="defines attributes of the BDF"]; "pyNastran.bdf.bdf_interface.cross_reference.XrefMesh" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Links up the various cards in the BDF."]; "pyNastran.bdf.bdf_interface.attributes.BDFAttributes" -> "pyNastran.bdf.bdf_interface.cross_reference.XrefMesh" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

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.