<div dir="ltr"><div>Hi,<br><br></div>there is a VTK filter that computes tangents along splines on github:<br><div><div><div><br><a href="https://github.com/midas-journal/midas-journal-838/blob/master/Filters/vtkFrenetSerretFrame.h">https://github.com/midas-journal/midas-journal-838/blob/master/Filters/vtkFrenetSerretFrame.h</a><br><br></div><div>- Dean<br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 3, 2017 at 10:47 AM, Cory Quammen <span dir="ltr"><<a href="mailto:cory.quammen@kitware.com" target="_blank">cory.quammen@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, Apr 3, 2017 at 7:59 AM, MarWas18 <<a href="mailto:marcinwas94@interia.pl">marcinwas94@interia.pl</a>> wrote:<br>
> Hello!<br>
><br>
> My problem is that I have a parametric spline (vtkParametricSpline) defined<br>
> on few points and I want to shift along this spline a plane (vtkPlane) which<br>
> is cutting function for cutter (vtkCutter).<br>
><br>
> I want this plane to have center on spline and to be perpendicular to the<br>
> spline at each point.<br>
><br>
> Here are my questions:<br>
> 1. How to shift plane smoothly along whole spline? Let's say that I have<br>
> only 5 points defined and spline is very long- I know how to place plane at<br>
> this 5 points (SetOrigin, and I take coordinates of these points), but how<br>
> to shift plane along whole spline smoothly?<br>
<br>
Calling vtkParametricSpline::Evaluate(<wbr>double u[3], double Pt[3],<br>
double Du[9]) will give you arbitrary points along the spline. u's<br>
first element should contain parametric value. The returned point will<br>
be stored in Pt. Du is not modified with this call, so you can ignore<br>
that.<br>
<br>
> 2. How to make plane perpendicular to spline at each point automatically?<br>
> Are there any methods that might be used?<br>
<br>
You want the normal of the plane to equal the tangent of the spline.<br>
There is nothing built in that gives you the tangent, but you could<br>
use some simple finite differences of points along the spline to<br>
approximate it.<br>
<br>
HTH,<br>
Cory<br>
<br>
><br>
> Best regards,<br>
> Marcin<br>
><br>
><br>
><br>
> --<br>
> View this message in context: <a href="http://vtk.1045678.n5.nabble.com/VTK-shift-plane-along-spline-perpendiculary-at-each-point-of-curve-tp5742707.html" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.<wbr>com/VTK-shift-plane-along-<wbr>spline-perpendiculary-at-each-<wbr>point-of-curve-tp5742707.html</a><br>
> Sent from the VTK - Users mailing list archive at Nabble.com.<br>
> ______________________________<wbr>_________________<br>
> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>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" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>
><br>
> Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a><br>
<br>
<br>
<br>
--<br>
Cory Quammen<br>
Staff R&D Engineer<br>
Kitware, Inc.<br>
______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>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" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a><br>
</blockquote></div><br></div>