[vtkusers] [VTK] Building a custom oriented arrow

Bill Lorensen bill.lorensen at gmail.com
Fri May 2 09:02:22 EDT 2014


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.

It will take a bit of fiddling to get the initial model correct. But then
it should be easily transformable.



On Fri, May 2, 2014 at 2:46 AM, Jon Haitz Legarreta <
jhlegarreta at vicomtech.org> wrote:

> Hi there,
> I'm trying to build a custom oriented arrow based upon the OrientedArrow
> example [1]. However, I seem not to be doing it right.
>
> I'm trying to set a sphere in the middle of the arrow, as well as two
> orthogonal lines centered at that point.
>
> 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.
>
> I guess it has to do with the transformations (scale and rotation), but
> cannot make head or tails of it.
>
> On the other hand, I cannot guess how to center the point where the lines
> cross at the center of the sphere.
>
> When the arrow's head and base are not random, but defined with some known
> values, it seems to work well.
>
> Attached, the screenshots of the attempt, the version with some known
> points (which seems to be OK), and the corresponding .cxx and
> CMakeLists.txt.
>
> Thanks,
> JON HAITZ
>
> [1]
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/OrientedArrow
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>


-- 
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140502/5c3e0183/attachment.html>


More information about the vtkusers mailing list