Please provide a simple batch example, without the widget, that illustrates the problem.<br><br>Bill<br><br><div class="gmail_quote">On Tue, Jul 10, 2012 at 3:13 PM, Jean-Hugues Royer <span dir="ltr"><<a href="mailto:jhroyer@joher.com" target="_blank">jhroyer@joher.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
In fact I create a contour widget (contourwidget) to draw the curve (with a vtkBezierContourLineInterpolat<u></u>or) and to show the problem I trace a straight line (instead of a curve) with two single points (begining / end) parallel to the X axis and with Z = 0.<br>
<br>
Then I create a vtkSplineFilter (splinefilter) and do a splinefilter->Setinput(<u></u>countourwidget-><u></u>GetContourRepresentation()-><u></u>GetContourRepresentationAsPoly<u></u>Data()).<br>
<br>
Then I call splinefilter-><u></u>SetSubdivideToLength() and splinefilter->SetLength(D) with desired distance (D) between points and finally splinefilter->Update().<br>
<br>
Then I get every points by calling splinefilter->GetOutput()-><u></u>GetPoint(n) and compute the distance consecutive points: Sqrt( (x2-x1)^2 + (y2-y1)^2 + (z2-z1) ^ 2).<br>
<br>
When I do that with a straight line the distance is always different than the one I asked, when I do that with a curve (a simple arc) only the first and last ~20 points have a different distance.<br>
<br>
So far the workaround I found is to call SetLength(D/100) (so I get 100x more points than needed) and I manually select the points among them which have almost distance D between them, it works but it requires more computation and it is not totally accurate.<br>
<br>
I don't think it's related but I'm using Activiz, and the straight line I use has a total length of 95mm and I ask for distance (D) of 0.18648mm. (I tried different values of D and I get the same issue)<br>
<br>
Regards.<div class="HOEnZb"><div class="h5"><br>
<br>
On 10/07/2012 17:52, Jana Sefcikova wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
can I ask you , how did you check whether they are or are not equally distributed ?<br>
Also what was length of the curve and distance, in the case when you get good distribution except corner points?<br>
<br>
Jana<br>
</blockquote></div></div><div class="HOEnZb"><div class="h5">
______________________________<u></u>_________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>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" target="_blank">http://www.vtk.org/Wiki/VTK_<u></u>FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/<u></u>listinfo/vtkusers</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br><br>