[vtkusers] clipping question
Langer, Stephen A. (Fed)
stephen.langer at nist.gov
Mon Feb 5 13:36:23 EST 2018
Hi Bill --
Sure, please go ahead and put that example in the repository. You might want to change the initial comment which doesn’t need to refer to the program that motivated the example. There's also at least one unnecessary #include, vtkRenderStepsPass.h, left over from the program this was extracted from.
I do still have a question about clipping, though. The solution you provided solves the problem for image based grids, but not if I'm also trying to visualize an unstructured grid. What should I do if I also have a grid of tetrahedra, as in the attached example? Are vtkClipDataSet or vtkTableBasedClipDataSet the wrong tools to use for that?
Thanks,
Steve
On 2/2/18, 7:58 PM, "Bill Lorensen" <bill.lorensen at gmail.com> wrote:
These clip filters depend on the resolution size, I modified your
example to use a higher resolution image. I'd like to add this to the
VTKExaamples repo if is OK with you. I will acknowledge your
contribution.
Bill
On Fri, Feb 2, 2018 at 12:37 PM, Langer, Stephen A. (Fed)
<stephen.langer at nist.gov> wrote:
> Hi --
>
> When using vtkTableBasedClipDataSet to apply two more more clipping planes to a grid, I'm seeing incorrect results along the line where the planes meet. I've attached a simple program that demonstrates the problem and a screenshot of the output. The program generates a vtkRectilinearGrid and pipes it through vtkTableBasedClipDataSet with its clip function set to two perpendicular planes. The result should have a concave right angle, but diagonal facets appear instead.
>
> I've tried using vtkClipDataSet instead, but it just gives different wrong answers, although it does work correctly when the clipping planes lie exactly along a row of nodes in the grid. vtkTableBasedClipDataSet draws diagonal facets across cells in that case.
>
> What am I doing wrong?
>
> Thanks.
>
> -- Steve
>
>
> _______________________________________________
> Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Cstephen.langer%40nist.gov%7Cfcc16ead7ad7481ca41f08d56aa1434f%7C2046e5e15ac543e384f33cedc35a5eb2%7C1%7C0%7C636532163230734712&sdata=tAz3a4Jk%2FyPrYc0xeMpXakUiRJGGag4i%2FdXbTo6L%2BiQ%3D&reserved=0
>
> Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Cstephen.langer%40nist.gov%7Cfcc16ead7ad7481ca41f08d56aa1434f%7C2046e5e15ac543e384f33cedc35a5eb2%7C1%7C0%7C636532163230734712&sdata=FB%2BONsXr37AV0KmNhnoX1b3R1Upv9%2Fiuzj3r3xfDGsM%3D&reserved=0
>
> Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Cstephen.langer%40nist.gov%7Cfcc16ead7ad7481ca41f08d56aa1434f%7C2046e5e15ac543e384f33cedc35a5eb2%7C1%7C0%7C636532163230734712&sdata=5kAM5O8ESw53wjtEQrka%2FKVPCOOdAb6OR97yYl9KnbM%3D&reserved=0
>
> Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Cstephen.langer%40nist.gov%7Cfcc16ead7ad7481ca41f08d56aa1434f%7C2046e5e15ac543e384f33cedc35a5eb2%7C1%7C0%7C636532163230734712&sdata=AjuJXq0JIwN9YpEi%2FBr8Ia7frjoZZdcoVIX8kx8%2Fr%2F0%3D&reserved=0
>
> Follow this link to subscribe/unsubscribe:
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.org%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Cstephen.langer%40nist.gov%7Cfcc16ead7ad7481ca41f08d56aa1434f%7C2046e5e15ac543e384f33cedc35a5eb2%7C1%7C0%7C636532163230734712&sdata=bVPXd1z26JSmjAHkKq0d1pc%2F8KDM3PSogLPJD0LtXqY%3D&reserved=0
>
--
Unpaid intern in BillsParadise at noware dot com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clipMesh.cxx
Type: application/octet-stream
Size: 6180 bytes
Desc: clipMesh.cxx
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180205/1846b203/attachment.obj>
More information about the vtkusers
mailing list