<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div><div>I have 2 questions:</div><div><br></div><div><div>1.Why is this compile error happening?</div><div><br> vtkSmartPointer<vtkPolyDataNormals> normals =vtkSmartPointer<vtkPolyDataNormals>::New();<br> normals->SetInputData(notSmoothedRotatedX);<br><div> normals->SplittingOff();</div><div><br></div> vtkSmartPointer<vtkWarpVector> warp =vtkSmartPointer<vtkWarpVector>::New();<br> warp->SetInputConnection(normals->GetOutputPort());<br> warp->SetInputArrayToProcess(0, 0, 0,vtkDataObject::FIELD_ASSOCIATION_POINTS,vtkDataSetAttributes::NORMALS);<br> warp->SetScaleFactor(1.2);<br> warp->Update();<br></div><div> </div><div> vtkSmartPointer<vtkPolyData> warped_poly = vtkSmartPointer<vtkPolyData>::New();</div> warped_poly = warp;<br><br>error C2664: 'vtkPolyData *vtkSmartPointer<vtkPolyData>::CheckType(T *)': cannot convert argument 1 from 'vtkWarpVector *' to 'vtkPolyData *'<br></div><div><br></div><div><br></div><div>2. I wonder why sometimes in VTK a vtkpolydata is created without using a smart pointer?</div><div><br></div><div>Like in this example:<br></div><div><br></div><div><a href="https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DataSetSurfaceFilter" class="">https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DataSetSurfaceFilter</a><br></div><div><br></div><div>Thanks.<br></div></div>
<div><br></div><div><br></div>
<div id="yahoo_quoted_7613137733" class="yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Thursday, January 25, 2018, 2:21:03 PM GMT+2, Cory Quammen <cory.quammen@kitware.com> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div dir="ltr">vtkWarpVector should produce a vtkPolyData. If it doesn't you can<br clear="none">always use vtkDataSetSurface to get a vtkPolyData surface from the<br clear="none">output of vtkWarpVector.<br clear="none"><br clear="none">- Cory<br clear="none"><div class="yqt5811956401" id="yqtfd21417"><br clear="none">On Thu, Jan 25, 2018 at 6:27 AM, Majid Mohammad sadeghi via vtkusers<br clear="none"><<a shape="rect" ymailto="mailto:vtkusers@vtk.org" href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>> wrote:<br clear="none">> Dear All,<br clear="none">><br clear="none">> When I scale a polydata by a uniform scale like: (2,2,2) , the data aslo<br clear="none">> moves a bit towards a direction depending on where the origin is located in<br clear="none">> relation to the polydata.<br clear="none">><br clear="none">> Is there a way to make the scaling transformation work as if each surface is<br clear="none">> moved relative to its normal? (I want an effect like an offset of the shape)<br clear="none">><br clear="none">> I know there is vtkwarpvector but I can not give its output to a plydata.<br clear="none">> (or maybe I am wrong!)<br clear="none">><br clear="none">> Any help?<br clear="none">><br clear="none">> Thanks.<br clear="none">><br clear="none">> _______________________________________________<br clear="none">> Powered by www.kitware.com<br clear="none">><br clear="none">> Visit other Kitware open-source projects at<br clear="none">> <a shape="rect" href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br clear="none">><br clear="none">> Please keep messages on-topic and check the VTK FAQ at:<br clear="none">> <a shape="rect" href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br clear="none">><br clear="none">> Search the list archives at: <a shape="rect" href="http://markmail.org/search/?q=vtkusers" target="_blank">http://markmail.org/search/?q=vtkusers</a><br clear="none">><br clear="none">> Follow this link to subscribe/unsubscribe:<br clear="none">> <a shape="rect" href="https://vtk.org/mailman/listinfo/vtkusers" target="_blank">https://vtk.org/mailman/listinfo/vtkusers</a></div><br clear="none">><br clear="none"><br clear="none"><br clear="none"><br clear="none">-- <br clear="none">Cory Quammen<br clear="none">Staff R&D Engineer<br clear="none">Kitware, Inc.<div class="yqt5811956401" id="yqtfd65091"><br clear="none"></div></div></div>
</div>
</div></div></body></html>