[Paraview] Project polygon onto surface

Shawn Waldon shawn.waldon at kitware.com
Tue Nov 29 12:28:48 EST 2016


Hi Adam,

The Slice Along PolyLine filter looks for a vtkPolyLine type cell.  But
there is no reason the algorithm itself can't work with a polygon (the
current implementation just doesn't look for one and may not handle it the
way you want if you pass a polyline that happens to have a first and last
point that are the same).  You would have to modify vtkPolyPlane to handle
a polygon input rather than assuming the first and last segments go off to
infinity (add an option for this).

If you want to color the inside, you have to get into how the algorithm
works a bit.  Internally I am using a vtkImplicitFunciton (vtkPolyPlane) to
compute the distance of each point in the dataset (or its projection into
the plane of the polyline) from the polyline.  Then I run a Contour filter
(vtkCutter), contouring where that filter's value is 0 and the output is
the slice along the polyline.  But if you directly applied the vtkPolyPlane
implicit function to your dataset and appended that as a data array rather
than contouring by it and throwing it away, you could get colors for
distance from the line.  You could then use the Calculator filter to scale
and color this however you wanted since the distance will be negative for
one side of the line.

HTH,
Shawn

On Wed, Nov 23, 2016 at 1:20 PM, Adam Dershowitz <adershowitz at exponent.com>
wrote:

> The problem I was having is that I was planning and trying  to use a
> polygon.  It seems that if you try to use that Slice Along Polyline, but
> select a polygon for the input, it crashes paraview (it should probably
> bring up an error, or only allow a polyline!).  I realized that it actually
> wants a polyline, and once I created one for my region, the filter does
> what I had been looking for.
> But, that leads to another question…  If I want a whole region to be
> another color, is there a way to fill the output of SliceAlongPolyLine?
> So, instead of just an outline, I can get the inside to also be a certain
> color?
>
> Thanks for the help.
>
>
> -- Adam
>
>
> On 10/26/16, 10:10 AM, "Adam Dershowitz" <adershowitz at exponent.com> wrote:
>
>     I tried it a few times, and it kept crashing Paraview.  So, then I
> read up on, it and seemed, from the description, that it was not what I
> wanted anyway.  But, if you think it is, I will see if I can get it to work.
>
>     -- Adam
>
>
>
>
>
>
>
>
>
>     On 10/26/16, 1:01 AM, "postgurke at web.de" <postgurke at web.de> wrote:
>
>     >Adam,
>     >
>     >Have you actually tried the filter? Because I think the output is
> exactly what
>     >you're asking for: the "section" of the surface is the part of the
> surface where
>     >the polyline is proceted onto it, hence a polyline with the regarding
> topography
>     >values for the respective z coordinates.
>     >
>     >Cheers
>     >Venke
>     >
>     >
>     >
>     >> Adam Dershowitz <adershowitz at exponent.com> hat am 25. Oktober 2016
> um 17:29
>     >> geschrieben:
>     >>
>     >>
>     >> I don't think that will do it.  Because, I don't want to slice
> anything.
>     >> I just want to show the boundaries on the 3D surface.  I want to
> project the
>     >> polygon that marks the edges of a region, onto the 3D topography.
>     >> It seems that Slice Along Polyline uses a laser to cut a section of
> the
>     >> surface, according to the instructions.  Instead I want to see each
> spot where
>     >> the laser hits on the surface.
>     >>
>     >> ________________________________________
>     >> From: postgurke at web.de [postgurke at web.de]
>     >> Sent: Tuesday, October 25, 2016 11:13 AM
>     >> To: Adam Dershowitz; paraview at paraview.org
>     >> Subject: Re: [Paraview] Project polygon onto surface
>     >>
>     >> Hi Adam
>     >>
>     >> I think the Slice Along Polyline Filter is what you need. Just
> select the data
>     >> set and the poly line in the window popping up and then proceed in
> the
>     >> properties section as usual.
>     >>
>     >> Cheers
>     >> Venke
>     >>
>     >>
>     >>
>     >> > Adam Dershowitz <adershowitz at exponent.com> hat am 25. Oktober
> 2016 um 16:01
>     >> > geschrieben:
>     >> >
>     >> >
>     >> > Is there a way to project a 2D, or 3D polygon onto a surface.
>     >> > Specifically I have some elevation data, that is displaying
> fine.  But the
>     >> > data has a lot of vertical variation.  I have a polygon that
> represents the
>     >> > boundaries of different regions.  So, the polygon is effectively
> 2D.
>     >> >  Although, I can give it a 3D values as well.
>     >> > The difficulty is that I can know the elevation of the corners,
> but the
>     >> > lines
>     >> > between those corners often drop "underground".
>     >> > So I would like to project the 2D (or 3D) polygon region onto the
> 3D ground
>     >> > elevation.
>     >> > You can think of this as having a topo map and I want to show the
> lines
>     >> > around
>     >> > an individual piece of property.
>     >> > Is there a filter that can do this?
>     >> >
>     >> > Thanks,
>     >> >
>     >> > --Adam
>     >> >
>     >> > _______________________________________________
>     >> > Powered by www.kitware.com
>     >> >
>     >> > Visit other Kitware open-source projects at
>     >> > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.
> kitware.com_opensource_opensource.html&d=DQICaQ&c=
> t0wRGL5ICVzH157W8C8Wew&r=5usL3OGqXabRLtSzGmh8YEvbco28TaiOmWcn6rCn8wM&m=
> vWssSXYtyX0Fwvwsvi4PGgQ70jWW8djJYXqUQvS2j3I&s=
> sMm99lDyK40nLEagq8PC0lEbloTvtFPCU5aOI3LyDaw&e=
>     >> >
>     >> > Please keep messages on-topic and check the ParaView Wiki at:
>     >> > https://urldefense.proofpoint.com/v2/url?u=http-3A__
> paraview.org_Wiki_ParaView&d=DQICaQ&c=t0wRGL5ICVzH157W8C8Wew&r=
> 5usL3OGqXabRLtSzGmh8YEvbco28TaiOmWcn6rCn8wM&m=
> vWssSXYtyX0Fwvwsvi4PGgQ70jWW8djJYXqUQvS2j3I&s=
> iD69Hj5cpbD6ykFT4IC2HpA0Sg7i0PZKI0Kvkkk-KA4&e=
>     >> >
>     >> > Search the list archives at:
>     >> > https://urldefense.proofpoint.com/v2/url?u=http-3A__
> markmail.org_search_-3Fq-3DParaView&d=DQICaQ&c=t0wRGL5ICVzH157W8C8Wew&r=
> 5usL3OGqXabRLtSzGmh8YEvbco28TaiOmWcn6rCn8wM&m=
> vWssSXYtyX0Fwvwsvi4PGgQ70jWW8djJYXqUQvS2j3I&s=wjB_
> o3N2yOaMlHQwkRubVtOQaONIFgjXLZgGkSCsfmk&e=
>     >> >
>     >> > Follow this link to subscribe/unsubscribe:
>     >> > https://urldefense.proofpoint.com/v2/url?u=http-3A__public.
> kitware.com_mailman_listinfo_paraview&d=DQICaQ&c=t0wRGL5ICVzH157W8C8Wew&r=
> 5usL3OGqXabRLtSzGmh8YEvbco28TaiOmWcn6rCn8wM&m=
> vWssSXYtyX0Fwvwsvi4PGgQ70jWW8djJYXqUQvS2j3I&s=
> zor1PXNvekBliiJOtZ5T0cocWkfwUd4H6OxmHTvbCDk&e=
>
>
> _______________________________________________
> 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 ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20161129/36118f6f/attachment.html>


More information about the ParaView mailing list