umvarma / pynastran

Automatically exported from code.google.com/p/pynastran
1 stars 0 forks source link

bdf.bdf.BDF.readBDF cross-reference error with CBUSH #112

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
xref fails for valid CBUSH element definition using coincident nodes and a 
definition coordinate system (element 1 in the attached deck example_in.dat). 
Running the attached cbush_xref_example.py produces the following errors:

Forcing DISTUTILS_USE_SDK=1
DEBUG:   fname=bdf.pyc                   lineNo=598    ---starting BDF.readBDF 
of example_in.dat---
DEBUG:   fname=bdf.pyc                   lineNo=604    *BDF.readBDF
DEBUG:   fname=bdf.pyc                   lineNo=824    found the end of the 
case control deck!
DEBUG:   fname=bdf.pyc                   lineNo=958    *read_bulk_data_deck
DEBUG:   fname=bdf.pyc                   lineNo=1061   ***read_bulk_data_deck
DEBUG:   fname=crossReference.pyc        lineNo=46     Cross Referencing...
ERROR:   fname=crossReference.pyc        lineNo=140    Couldn't cross reference 
Element.
CBUSH          1      10       1       2
              .5      -1

Traceback (most recent call last):
  File "example.py", line 6, in <module>
    mesh.readBDF('example_in.dat', includeDir=None, xref=True)
  File "C:\Python27\lib\site-packages\pynastran-0.5.r981-py2.7.egg\pyNastran\bdf\bdf.py", line 609, in readBDF
    self.crossReference(xref=xref)
  File "C:\Python27\lib\site-packages\pynastran-0.5.r981-py2.7.egg\pyNastran\bdf\bdfInterface\crossReference.py", line 53, in crossReference
    self._cross_reference_elements()
  File "C:\Python27\lib\site-packages\pynastran-0.5.r981-py2.7.egg\pyNastran\bdf\bdfInterface\crossReference.py", line 137, in _cross_reference_elements
    elem.crossReference(self)
  File "C:\Python27\lib\site-packages\pynastran-0.5.r981-py2.7.egg\pyNastran\bdf\cards\elements\bush.py", line 114, in crossReference
    self.nodes = model.Nodes(self.nodes)
  File "C:\Python27\lib\site-packages\pynastran-0.5.r981-py2.7.egg\pyNastran\bdf\bdfInterface\getCard.py", line 82, in Nodes
    for nid in nids:
TypeError: 'NoneType' object is not iterable

Original issue reported on code.google.com by jeffrey....@gmail.com on 15 Oct 2012 at 7:15

Attachments:

GoogleCodeExporter commented 9 years ago
using pyNastran 0.5 (r981) on Python 2.7.3 (Windows 7)

Original comment by jeffrey....@gmail.com on 15 Oct 2012 at 7:20

GoogleCodeExporter commented 9 years ago
also, any idea why the second line in the CBUSH card is produced when it's not 
defined in the original deck?

i.e.,

              .5      -1

Original comment by jeffrey....@gmail.com on 15 Oct 2012 at 7:22

GoogleCodeExporter commented 9 years ago
I'll take a look at the cross reference bug.

The second line is printed because there is no link to the original file.  
Those fields are always written out, but the cards are equivalent.  Those two 
fields should probably not be written out by default.

Original comment by mesheb82 on 15 Oct 2012 at 9:45

GoogleCodeExporter commented 9 years ago
This should be fixed now.  Please test it and then I'll close it.

Original comment by mesheb82 on 16 Oct 2012 at 8:58

GoogleCodeExporter commented 9 years ago

Original comment by mesheb82 on 23 Oct 2012 at 11:54

GoogleCodeExporter commented 9 years ago
closing b/c inaction

Original comment by mesheb82 on 23 Oct 2012 at 11:54