<div dir="ltr">Hi Experts,<div><br></div><div>I am trying to draw Cone with its base closed.</div><div>For that I am calling CappingOn() function provided for same. </div><div>But it doesn't seem to work. I can't think of what can be missing here. </div><div><br></div><div>Following is my code. </div><div><br></div><div><br></div><div>#include "stdafx.h"</div><div><br></div><div>#include <vtkAutoInit.h></div><div>VTK_MODULE_INIT(vtkRenderingOpenGL2)</div><div>VTK_MODULE_INIT(vtkRenderingFreeType);</div><div><br></div><div>#include <vtkConeSource.h></div><div>#include <vtkPolyData.h></div><div>#include <vtkSmartPointer.h></div><div>#include <vtkPolyDataMapper.h></div><div>#include <vtkActor.h></div><div>#include <vtkRenderWindow.h></div><div>#include <vtkRenderer.h></div><div>#include <vtkRenderWindowInteractor.h></div><div>#include <vtkInteractorStyleTrackballCamera.h></div><div>#include <vtkProperty.h></div><div><br></div><div>int main(int, char *[])</div><div>{</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">    </span>//Create a cone</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer<vtkConeSource> coneSource =</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">              </span>vtkSmartPointer<vtkConeSource>::New();</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">   </span>coneSource->SetResolution(100);</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">     </span>coneSource->SetCapping(true);</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">       </span>coneSource->Update();</div><div><br></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">      </span>//Create a mapper and actor</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">    </span>vtkSmartPointer<vtkPolyDataMapper> mapper =</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">              </span>vtkSmartPointer<vtkPolyDataMapper>::New();</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">       </span>mapper->SetInputConnection(coneSource->GetOutputPort());</div><div><br></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer<vtkActor> actor =</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                </span>vtkSmartPointer<vtkActor>::New();</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>actor->SetMapper(mapper);</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">   </span>actor->GetProperty()->SetOpacity(0.5);</div><div><br></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">  </span>//Create a renderer, render window, and interactor</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">     </span>vtkSmartPointer<vtkRenderer> renderer =</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">          </span>vtkSmartPointer<vtkRenderer>::New();</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">     </span>vtkSmartPointer<vtkRenderWindow> renderWindow =</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">          </span>vtkSmartPointer<vtkRenderWindow>::New();</div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>renderWindow->AddRenderer(renderer);</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor =</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">              </span>vtkSmartPointer<vtkRenderWindowInteractor>::New();</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">       </span>renderWindowInteractor->SetRenderWindow(renderWindow);</div><div><br></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">     </span>//Add the actors to the scene</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">  </span>renderer->AddActor(actor);</div><div><br></div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>vtkSmartPointer<vtkInteractorStyleTrackballCamera> style =</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">               </span>vtkSmartPointer<vtkInteractorStyleTrackballCamera>::New();</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">       </span>renderWindowInteractor->SetInteractorStyle(style);</div><div><br></div><div><br></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>//Render and interact</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">  </span>renderWindow->SetSize(800, 800);</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">    </span>renderWindow->Render();</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">     </span>renderWindowInteractor->Start();</div><div><br></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">   </span>return EXIT_SUCCESS;</div><div>} </div><div><br></div><div><br></div><div><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">thanks & regards,<div>Girish</div><div><br></div></div></div>
</div></div>

<br>
<font size="2">------------------------------</font><font size="2"><wbr>------------------------------</font><font size="2"><wbr>------------------------------</font><font size="2"><wbr>------------------------------</font><font size="2"><wbr>-<br><font face="Arial"><u><b>Disclaimer:</b></u> This email message including any attachments is confidential, and may be privileged and proprietary to Agiliad. If you are not the intended recipient, please notify us immediately by replying to this message and destroy all copies of this message including any attachments. You are NOT authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. Thank you.</font><br>------------------------------</font><font size="2"><wbr>------------------------------</font><font size="2"><wbr>------------------------------</font><font size="2"><wbr>------------------------------</font>