<div class="gmail_quote">2010/6/11 <span dir="ltr"><<a href="mailto:c_dinco@sina.com">c_dinco@sina.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<p> I used <strong>vtkLSdynaReader</strong> to read a ls-dyna d3plot file which just contain a solid object, but program crashed when run to: </p>
<p> </p>
<p>cout<<"number of Solid cell:"<< rdr->OutputSolid->GetNumberOfCells()<<endl;</p>
<p> </p>
<p>In fact, all variables Output***** are defined as <strong>vtkUnstructuredGrid</strong>*, </p>
<p>I checked the variable "<strong>OutputSolid</strong>" using function "<strong>getNameclass</strong>", and find it is not "<strong>vtkUnstructuredGrid</strong>" type after program running.So I have no idea how to extract data from "<strong>OutputSolid"</strong>.</p>
<p>Could you do me a favor that how to extract all datas from "<strong>OutputSolid</strong>"?</p>
<p>By the way, all variables are changed from "protected" to "public" for debugging.</p>
<p>Thanks very much!</p>
<p> </p>
<p>Following are my code:</p>
<p>vtkLSDynaReader* rdr = vtkLSDynaReader::New();<br> rdr->SetDatabaseDirectory( "C:\\Users\\sample" );</p>
<p> rdr->Update();</p>
<p><br> cout<<"number of Particles cell:"<< rdr->OutputParticles->GetNumberOfCells()<<endl;<br> cout<<"number of Beam cell:"<< rdr->OutputBeams->GetNumberOfCells()<<endl;<br>
cout<<"number of RigidBody cell:"<< rdr->OutputRigidBody->GetNumberOfCells()<<endl;<br> cout<<"number of RoadSurface cell:"<< rdr->OutputRoadSurface->GetNumberOfCells()<<endl;</p>
<p> cout<<"number of Shell cell:"<< rdr->OutputShell->GetNumberOfCells()<<endl;<br> cout<<"number of Solid cell:"<< rdr->OutputSolid->GetNumberOfCells()<<endl;<br>
cout<<"number of ThickShell cell:"<< rdr->OutputThickShell->GetNumberOfCells()<<endl;</p>
<p> </p>
<p> </p>
<p> </p>
<p>kevin</p>
<p></p></blockquote></div><br><div>Can you upload the file you are trying read and send us a link? A small file would be highly preferable if you can generate the problem with one.</div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>
<br clear="all">Thanks,<br><br>David</div>