<div dir="ltr"><span class="" style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><div>/*--------------------------------*- C++ -*----------------------------------*\</div><div>| ========= | |</div>
<div>| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |</div><div>| \\ / O peration | Version: 2.1.x |</div><div>| \\ / A nd | Web: <a href="http://www.OpenFOAM.org/" target="_blank" style="color:rgb(17,85,204)">www.OpenFOAM.org</a> |</div>
<div>| \\/ M anipulation | |</div><div>\*---------------------------------------------------------------------------*/</div><div>FoamFile</div><div>{</div><div> version 2.0;</div>
<div> format ascii;</div><div> class dictionary;</div><div> object blockMeshDict;</div><div>}</div><div>// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //</div><div><br>
</div><div>convertToMeters 0.1;</div><div><br></div><div>vertices</div><div>(</div><div> (0 0 0)</div><div> (1 0 0)</div><div> (1 1 0)</div><div> (0 1 0)</div><div> (0 0 0.1)</div><div> (1 0 0.1)</div><div>
(1 1 0.1)</div><div> (0 1 0.1)</div><div>);</div><div><br></div><div>blocks</div><div>(</div><div> hex (0 1 2 3 4 5 6 7) (20 20 1) simpleGrading (1 1 1)</div><div>);</div><div><br></div><div>edges</div><div>(</div>
<div>);</div><div><br></div><div>boundary</div><div>(</div><div> movingWall</div><div> {</div><div> type wall;</div><div> faces</div><div> (</div><div> (3 7 6 2)</div><div> );</div>
<div> }</div><div> fixedWalls</div><div> {</div><div> type wall;</div><div> faces</div><div> (</div><div> (0 4 7 3)</div><div> (2 6 5 1)</div><div> (1 5 4 0)</div>
<div> );</div><div> }</div><div> frontAndBack</div><div> {</div><div> type empty;</div><div> faces</div><div> (</div><div> (0 3 2 1)</div><div> (4 5 6 7)</div><div>
);</div><div> }</div><div>);</div><div><br></div><div>mergePatchPairs</div><div>(</div><div>);</div><div>// ************************************************************************* //</div><div><br></div><div>
<br></div><div><br></div><div><font color="#0000ff">This is the file of openfoam which shows geometry. . . Now the above code contains the geometry of Square box . . .<a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/ReadOBJ">http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/ReadOBJ</a></font><font color="#ff00ff"> . . . </font><font color="#0000ff">I took the code from the link and add the path of openfoam file and also add the vtkopenfoamreader.h . . . .but the output is only empty GUI with green color and no geometry . . . anyone knows where the Problem???</font></div>
<div><font color="#0000ff"><br></font></div><div><font color="#0000ff">Regards </font></div><div><font color="#0000ff">Abbasi</font></div></span></div>