<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div>Thank you very much for your codes !<br><br>I have successfully realize to set the parameters of vtkCubeSource by 8 vertices based on your codes. But I encounter another problem, it seems the order of 8 vertices should be arranged correctly, otherwise, the visualized cube is not correct. About the order of vertices, do you have an easy idea to set ? Otherwise, I need to check the coordinates of 8 vertices every time and re-order them.<br>
<br>Greatly appreciate your help!<br></div></div></blockquote><div><br></div>I would suggest coloring the vertices of the cube:</div><div class="gmail_quote"><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColoredPoints">http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColoredPoints</a></div>
<div class="gmail_quote"><br></div><div class="gmail_quote">This will allow you to see the ordering that is produced by the CubeSource. You will then have to rearrange your points to match this ordering, but this must only be done once - once you know the mapping nothing new needs to be done each time.</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">David</div>