<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">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>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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>_______________________________________________<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></blockquote></div><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>