[vtkusers] Dotted line int VTK > 7

Simon Esneault simon.esneault at gmail.com
Tue Oct 10 14:21:05 EDT 2017


Thanks Bill,

I was able to create a dashed line with this texture trick, thanks.
However, it is difficult to reproduce the same effect than with the opengl1
version. In the the previous version, each created dash had a constant
"lenght" on the screen when you zoom in or out on the actor. With the new
version, the number of dash is the same on the line, no matter how long or
how "zoomed" in it appears on the screen.

In your example, the number of "dash" is controlled by the resolution of
the source, is that correct?
So to achieve the same result, the only solution is to connect a callback
on the camera, and adapt the linesource resolution to the current zoom, no
? Or maybe there is an easier solution ?

Thanks anyway,
Simon

2017-10-10 19:24 GMT+02:00 Bill Lorensen <bill.lorensen at gmail.com>:

> I just added a new example that draws stippled lines. Take a look to
> see if it helps...
>
> https://lorensen.github.io/VTKExamples/site/Cxx/Rendering/StippledLine/
>
>
>
> On Mon, Oct 9, 2017 at 11:29 AM, Simon Esneault
> <simon.esneault at gmail.com> wrote:
> > The second trick using texture might just work !
> > Thanks
> > Simon
> >
> >
> > 2017-10-09 19:04 GMT+02:00 Ken Martin <ken.martin at kitware.com>:
> >>
> >> https://gitlab.kitware.com/vtk/vtk/issues/15799 gives a couple options
> >> that might work for you.
> >>
> >> On Mon, Oct 9, 2017 at 12:05 PM, Simon Esneault <
> simon.esneault at gmail.com>
> >> wrote:
> >>>
> >>> Hello community
> >>>
> >>> Is there a way to draw dotted line with the new backend ?
> >>>
> >>> We used something like this before
> >>>
> >>> m_actor->GetProperty()->SetLineStipplePattern( 0xf0f0 );
> >>> m_actor->GetProperty()->SetLineStippleRepeatFactor( 1 );
> >>>
> >>> But the doc says it works only for the old backend.
> >>> Any other solution ?
> >>>
> >>> Thanks
> >>> Simon
> >>> --
> >>> ------------------------------------------------------------------
> >>> Simon Esneault
> >>> Rennes, France
> >>> ------------------------------------------------------------------
> >>>
> >>> _______________________________________________
> >>> 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
> >>>
> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers
> >>>
> >>> Follow this link to subscribe/unsubscribe:
> >>> http://public.kitware.com/mailman/listinfo/vtkusers
> >>>
> >>
> >>
> >>
> >> --
> >> Ken Martin PhD
> >> Distinguished Engineer
> >> Kitware Inc.
> >> 28 Corporate Drive
> >> Clifton Park NY 12065
> >>
> >> This communication, including all attachments, contains confidential and
> >> legally privileged information, and it is intended only for the use of
> the
> >> addressee.  Access to this email by anyone else is unauthorized. If you
> are
> >> not the intended recipient, any disclosure, copying, distribution or any
> >> action taken in reliance on it is prohibited and may be unlawful. If you
> >> received this communication in error please notify us immediately and
> >> destroy the original message.  Thank you.
> >
> >
> >
> >
> > --
> > ------------------------------------------------------------------
> > Simon Esneault
> > Rennes, France
> > ------------------------------------------------------------------
> >
> > _______________________________________________
> > 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
> >
> > Search the list archives at: http://markmail.org/search/?q=vtkusers
> >
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/vtkusers
> >
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
>



-- 
------------------------------------------------------------------
Simon Esneault
Rennes, France
------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20171010/68920a09/attachment.html>


More information about the vtkusers mailing list