<div dir="ltr">It might be some limitation of the importer itself.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 20, 2012 at 2:28 PM, Fabiano Stange <span dir="ltr"><<a href="mailto:fpaulico1@gmail.com" target="_blank">fpaulico1@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Hi!</span><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
I have some doubts about vtkVRMLImporter.</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">I am using VTK version 5.4 and Visual Studio C++ 2008 to import a wrl file.</div>
<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">But it is not working very well.</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
If the wrl file has more then one DEF node, vtk only visualizes the first DEF node.</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
For example, a solid model like a building can be writing in wrl format using a DEF node for which object (foundations, columns, beams, slabs, walls and roofs).</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
Here is a part of the wrl file i like to visualize in vtk:</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<div>#VRML V2.0 utf8</div><div><br></div></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><div>DEF Structural_Columns_<M_Concrete_Square_Column_:_500_x_500mm> Transform {</div>
<div><span style="white-space:pre-wrap">        </span>translation -10700 4650 -17490</div><div><span style="white-space:pre-wrap">        </span>children DEF Structural_Columns_<M_Concrete_Square_Column_:_500_x_500mm>_0 Transform {</div>
<div><span style="white-space:pre-wrap">                </span>translation 0 0 0</div><div><span style="white-space:pre-wrap">                </span>children Shape {</div><div><span style="white-space:pre-wrap">                        </span>appearance Appearance {</div>
<div><span style="white-space:pre-wrap">                                </span>material Material {diffuseColor 1 0 1}</div><div><span style="white-space:pre-wrap">                                </span>texture ImageTexture {</div><div><span style="white-space:pre-wrap">                                        </span>url "<a href="http://t3.gstatic.com/images?q=tbn:ANd9GcSNUBcHJyaWrODD9_EyOSBRAvBB_3dRhTlocB1S6qEk5Mz3XW9x2w" style="color:rgb(17,85,204)" target="_blank">http://t3.gstatic.com/images?q=tbn:ANd9GcSNUBcHJyaWrODD9_EyOSBRAvBB_3dRhTlocB1S6qEk5Mz3XW9x2w</a>"</div>
<div><span style="white-space:pre-wrap">                                        </span>repeatS TRUE</div><div><span style="white-space:pre-wrap">                                        </span>repeatT TRUE </div><div><span style="white-space:pre-wrap">                                </span>}</div><div><span style="white-space:pre-wrap">                        </span>}</div>
<div><span style="white-space:pre-wrap">                        </span>geometry DEF Structural_Columns_<M_Concrete_Square_Column_:_500_x_500mm>_0-FACES IndexedFaceSet {</div><div><span style="white-space:pre-wrap">                                </span>ccw TRUE </div>
<div><span style="white-space:pre-wrap">                                </span>solid TRUE </div><div><span style="white-space:pre-wrap">                                </span>coord DEF Structural_Columns_<M_Concrete_Square_Column_:_500_x_500mm>_0-COORD Coordinate {point [...]}</div>
<div><span style="white-space:pre-wrap">                                </span>coordIndex [ ... ]</div><div><span style="white-space:pre-wrap">                        </span>}</div><div><span style="white-space:pre-wrap">                </span>}</div><div><span style="white-space:pre-wrap">        </span>}</div>
<div>}</div></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<div>DEF Structural_Columns_<M_Concrete_Square_Column_:_500_x_500mm>_01 Transform {</div><div><span style="white-space:pre-wrap">        </span>translation -5204 7750 -17490</div><div><span style="white-space:pre-wrap">        </span>children DEF Structural_Columns_<M_Concrete_Square_Column_:_500_x_500mm>_02 Transform {</div>
<div><span style="white-space:pre-wrap">                </span>translation 0 0 0</div><div><span style="white-space:pre-wrap">                </span>children Shape {</div><div><span style="white-space:pre-wrap">                        </span>appearance Appearance {material Material {diffuseColor 1 0 1}}</div>
<div><span style="white-space:pre-wrap">                        </span>geometry DEF Structural_Columns_<M_Concrete_Square_Column_:_500_x_500mm>_02-FACES IndexedFaceSet {</div><div><span style="white-space:pre-wrap">                                </span>ccw TRUE </div>
<div><span style="white-space:pre-wrap">                                </span>solid TRUE </div><div><span style="white-space:pre-wrap">                                </span>coord DEF Structural_Columns_<M_Concrete_Square_Column_:_500_x_500mm>_02-COORD Coordinate {point [...}</div>
<div><span style="white-space:pre-wrap">                                </span>coordIndex [...]</div><div><span style="white-space:pre-wrap">                        </span>}</div><div><span style="white-space:pre-wrap">                </span>}</div><div><span style="white-space:pre-wrap">        </span>}</div>
<div>}</div></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">... </div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Even if i use the group node vtk still visualizes the first DEF node.</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
And there is more problems. </div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">The first DEF node that vtk visualizes does not read the Appearance node, the Material node and the Color node.</div>
<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
I am using the example in <a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/VRML" style="color:rgb(17,85,204)" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/VRML</a>.</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
Is something wrong or the vtkVRMLImporter works like that?</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
Thanks,</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Fabiano Stange</div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>