<div dir="ltr">Jon,<div><br></div><div>Here is code that creates a composite arrow. Notice that all model manipulation is done in the arrow source's coordinate system.</div><div><br></div><div>After a bit of cleanup, I'll add this as a new wiki example.</div>
<div><br></div><div>Bill</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 2, 2014 at 9:13 AM, Jon Haitz Legarreta <span dir="ltr"><<a href="mailto:jhlegarreta@vicomtech.org" target="_blank">jhlegarreta@vicomtech.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Bill,<br>thanks for the suggestion. I'll try to follow the advice and create it that way.<br><br>
</div>On the other hand, D.Doria also pointed some geometry issue; the "middle" sphere was to be located at 1/3 from the startPoint, and the right location for that is:<br>
<br><span style="font-family:courier new,monospace"> midPoint[i] = startPoint[i] + (endPoint[i] - startPoint[i]) /3;</span><br><div><div><div><div class="gmail_extra"><br></div><div class="gmail_extra">instead of what I was using.<br>
<br></div><div class="gmail_extra">So thanks both of you for having taken some time to help.<br><br></div><div class="gmail_extra">Kind regards,<br>JON HAITZ<br></div><div><div class="h5"><div class="gmail_extra"><br><br>
</div><div class="gmail_extra">
<div class="gmail_quote">On 2 May 2014 15:02, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">This seems a bit too complicated. Think of the "custom" arrow as a single model. Create the model in the original normalized space of the arrow source. "Build" your model components, place them in the space and compose them into a single polydata using the append polydata filter. Then apply the the transforms of the example to the single polydata. Colors can be assigned to the individual components of the custom arrow by setting the cell data of each component.<div>
<br></div><div>It will take a bit of fiddling to get the initial model correct. But then it should be easily transformable.</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div>
On Fri, May 2, 2014 at 2:46 AM, Jon Haitz Legarreta <span dir="ltr"><<a href="mailto:jhlegarreta@vicomtech.org" target="_blank">jhlegarreta@vicomtech.org</a>></span> wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div dir="ltr"><div>Hi there,<br>I'm trying to build a custom oriented arrow based upon the OrientedArrow example [1]. However, I seem not to be doing it right.<br>
<br>I'm trying to set a sphere in the middle of the arrow, as well as two orthogonal lines centered at that point.<br>
<br>The sphere is not located in the middle of the arrow, and the lines, even if orthogonal do not cross in the center of the sphere.<br><br>I guess it has to do with the transformations (scale and rotation), but cannot make head or tails of it.<br>
<br>On the other hand, I cannot guess how to center the point where the lines cross at the center of the sphere.<br><br></div>When the arrow's head and base are not random, but defined with some known values, it seems to work well.<br>
<div><div><div><div><br>Attached, the screenshots of the attempt, the version with some known points (which seems to be OK), and the corresponding .cxx and CMakeLists.txt.<br><br>Thanks,<br>JON HAITZ<br><br>[1] <a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/OrientedArrow" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/OrientedArrow</a><br>
<br><div><div dir="ltr"><table align="center" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td><br></td></tr><tr><td><table align="center" border="0" cellpadding="0"><tbody><tr><td><span style="font-size:10px;color:gray;font-family:Verdana,Arial,Helvetica,sans-serif"></span><br>
</td></tr></tbody></table></td></tr></tbody></table></div></div>
</div></div></div></div></div>
<br></div></div><div>_______________________________________________<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/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_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/listinfo/vtkusers</a><br>
<br></div></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</font></span></div>
</blockquote></div><br></div></div></div></div></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>