[Paraview] Project polygon onto surface

Shawn Waldon shawn.waldon at kitware.com
Tue Nov 29 13:52:08 EST 2016


On Tue, Nov 29, 2016 at 1:37 PM, Adam Dershowitz <adershowitz at exponent.com>
wrote:

> I may mess with it some.
>
> FYI, I did convert my polygon to a polyline, and got it to work.  But, if
> I have two polylines (actually two completely separate regions) the slice
> along polyline filter then connects them even though they should not be
> connected.  Perhaps this is just what you mentioned below about having the
> same first and last point?
>

No, that another issue and was done intentionally.  When running ParaView
in client-server mode with multiple MPI server processes, it is possible
the input polyline could be spread across the servers.  So it gathers them
from all the processes and merges all the polylines into one long line
before executing the filter.  I don't think there is a good way (other than
running multiple Slice Along Polyline filters) to get two separate regions
to work.  Also, the math for the implicit function you have to write gets
more complicated with two regions.  The current vtkPolyPlane won't handle
it.

HTH,
Shawn


> I appreciate both the filter and the feedback below.
>
>
>
> Thank you,
>
>
>
>
>
>
>
> -- Adam
>
>
>
>
>
> *From: *Shawn Waldon <shawn.waldon at kitware.com>
> *Date: *Tuesday, November 29, 2016 at 12:28 PM
> *To: *Dershowitz Adam <adershowitz at exponent.com>
> *Cc: *"postgurke at web.de" <postgurke at web.de>, "paraview at paraview.org" <
> paraview at paraview.org>
>
> *Subject: *Re: [Paraview] Project polygon onto surface
>
>
>
> 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
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com&d=DgMFaQ&c=t0wRGL5ICVzH157W8C8Wew&r=5usL3OGqXabRLtSzGmh8YEvbco28TaiOmWcn6rCn8wM&m=goVqFAuiEiw0j55M_ihlKpp6l5tXSD0l-pkKkT4uOjs&s=U5TCeKAY4VLJjdJjYLW-6GGmJliCeoi-GfkCHaB_6eE&e=>
>     >> >
>     >> > 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
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com&d=DgMFaQ&c=t0wRGL5ICVzH157W8C8Wew&r=5usL3OGqXabRLtSzGmh8YEvbco28TaiOmWcn6rCn8wM&m=goVqFAuiEiw0j55M_ihlKpp6l5tXSD0l-pkKkT4uOjs&s=U5TCeKAY4VLJjdJjYLW-6GGmJliCeoi-GfkCHaB_6eE&e=>
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_opensource_opensource.html&d=DgMFaQ&c=t0wRGL5ICVzH157W8C8Wew&r=5usL3OGqXabRLtSzGmh8YEvbco28TaiOmWcn6rCn8wM&m=goVqFAuiEiw0j55M_ihlKpp6l5tXSD0l-pkKkT4uOjs&s=5ZPqzsC9WXmESJRX-rTs38MCxTSVcHZTAmgzF4d1SRw&e=>
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__paraview.org_Wiki_ParaView&d=DgMFaQ&c=t0wRGL5ICVzH157W8C8Wew&r=5usL3OGqXabRLtSzGmh8YEvbco28TaiOmWcn6rCn8wM&m=goVqFAuiEiw0j55M_ihlKpp6l5tXSD0l-pkKkT4uOjs&s=AOi-0AenUeLEKnfxdXymOV_NJamuIYxNSJDTSbY8G-c&e=>
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3DParaView&d=DgMFaQ&c=t0wRGL5ICVzH157W8C8Wew&r=5usL3OGqXabRLtSzGmh8YEvbco28TaiOmWcn6rCn8wM&m=goVqFAuiEiw0j55M_ihlKpp6l5tXSD0l-pkKkT4uOjs&s=GcpxBf5AvxEJpqdLBbkZ-OaXJuahdsad0T7ptU4W12Y&e=>
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__public.kitware.com_mailman_listinfo_paraview&d=DgMFaQ&c=t0wRGL5ICVzH157W8C8Wew&r=5usL3OGqXabRLtSzGmh8YEvbco28TaiOmWcn6rCn8wM&m=goVqFAuiEiw0j55M_ihlKpp6l5tXSD0l-pkKkT4uOjs&s=d5iSeUfEvAb-PseUcTDnVC5F_WlBMCUkEBFkVGVWqN4&e=>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20161129/acb52de9/attachment.html>


More information about the ParaView mailing list