<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<STYLE>BODY {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana
}
PRE {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
BLOCKQUOTE {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
A {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
MENU {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
DD {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
UL {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
DT {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
DIR {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
ADDRESS {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
H5 {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
H6 {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
HR {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
P {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 6pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
TD {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 6pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
TR {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 6pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
P.MsoNormal {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 6pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
LI.MsoNormal {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 6pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
DIV.MsoNormal {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 6pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
LI {
        MARGIN-TOP: 3pt; FONT-SIZE: 10pt; MARGIN-BOTTOM: 3pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
UL {
        MARGIN-TOP: 3pt; FONT-SIZE: 10pt; MARGIN-BOTTOM: 3pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
OL {
        MARGIN-TOP: 3pt; FONT-SIZE: 10pt; MARGIN-BOTTOM: 3pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
H1 {
        FONT-SIZE: 16pt; MARGIN: 12pt 0in 3pt; COLOR: #003366; FONT-FAMILY: Verdana,Arial,sans-serif
}
H2 {
        FONT-SIZE: 14pt; MARGIN: 12pt 0in 3pt; COLOR: #003366; FONT-STYLE: italic; FONT-FAMILY: Verdana,Arial,sans-serif
}
H3 {
        FONT-SIZE: 12pt; MARGIN: 12pt 0in 3pt; COLOR: #003366; FONT-FAMILY: Verdana,Arial,sans-serif
}
H4 {
        FONT-SIZE: 11pt; MARGIN: 12pt 0in 3pt; COLOR: #003366; FONT-FAMILY: Verdana,Arial,sans-serif
}
</STYLE>

<META name=GENERATOR content="MSHTML 8.00.7600.16671"></HEAD>
<BODY style="FONT-FAMILY: Verdana; COLOR: #000000; FONT-SIZE: 10pt" id=ridBody 
background="">
<DIV></DIV>
<DIV dir=ltr align=left> </DIV>
<DIV dir=ltr align=left><SPAN class=830245110-24112010>Ok</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=830245110-24112010></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=830245110-24112010> i figured out in 
which case the cutter does not work, and i think it is a bug:</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=830245110-24112010></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=830245110-24112010>Working 
Polygon:</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=830245110-24112010></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=830245110-24112010>(0 0 0)</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=830245110-24112010>(10 0 0)</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=830245110-24112010>(10 10 
0)</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=830245110-24112010>(0 10 0)</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=830245110-24112010></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=830245110-24112010>This Polygon is cut 
correct. And this is not cut correct:</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=830245110-24112010></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=830245110-24112010>(0 0 0)</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=830245110-24112010>(10 0 0)</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=830245110-24112010>(10 5 0)</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=830245110-24112010>(15 5 0)</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=830245110-24112010>(10 5 0)</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=830245110-24112010>(10 10 0)</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=830245110-24112010>(0 10 0)</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=830245110-24112010></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=830245110-24112010>You can see that in my 
second case the boundary has an infinite small spike. This results in an empty 
cutting result. In my opinion this is a valid polygon so the cutting should be 
calculated...</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=830245110-24112010></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=830245110-24112010>Can anyone make a bug 
report? I do not know why i cannot go the bug report system today (or is it 
offline?)</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=830245110-24112010></SPAN> </DIV><BR>
<DIV dir=ltr lang=de class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT face=Tahoma><B>Von:</B> vtk-developers-bounces@vtk.org 
[mailto:vtk-developers-bounces@vtk.org] <B>Im Auftrag von </B>Lodron, 
Gerald<BR><B>Gesendet:</B> Mittwoch, 24. November 2010 09:30<BR><B>An:</B> 
'vtk-developers@vtk.org'<BR><B>Betreff:</B> [vtk-developers] WG: Problems 
cutting polygons, bug?<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left> </DIV><SPAN 
class=294192908-24112010></SPAN>and here the single polygon <SPAN 
class=294192908-24112010>extracted 
</SPAN>which cannot be cutted<SPAN 
class=294192908-24112010></SPAN><BR>
<DIV dir=ltr lang=de class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT face=Tahoma><B>Von:</B> vtk-developers-bounces@vtk.org 
[mailto:vtk-developers-bounces@vtk.org] <B>Im Auftrag von </B>Lodron, 
Gerald<BR><B>Gesendet:</B> Mittwoch, 24. November 2010 08:32<BR><B>An:</B> 
'vtk-developers@vtk.org'; 'vtkusers@vtk.org'<BR><B>Betreff:</B> [vtk-developers] 
WG: Problems cutting polygons, bug?<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left> </DIV>
<DIV><SPAN 
class=754463007-24112010></SPAN>ok, there is the vtk polydata file, i hope that i come through the filter<SPAN 
class=754463007-24112010> otherwise noone will read thsi :-)</SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=754463007-24112010></SPAN><BR> </DIV>
<DIV dir=ltr lang=de class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT face=Tahoma><B>Von:</B> vtkusers-bounces@vtk.org 
[mailto:vtkusers-bounces@vtk.org] <B>Im Auftrag von </B>Lodron, 
Gerald<BR><B>Gesendet:</B> Mittwoch, 24. November 2010 08:23<BR><B>An:</B> 
'vtkusers@vtk.org'<BR><B>Betreff:</B> [vtkusers] Problems cutting polygons, 
bug?<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV> </DIV>
<DIV><SPAN class=577190907-24112010>Hi</SPAN></DIV>
<DIV><SPAN class=577190907-24112010></SPAN> </DIV>
<DIV><SPAN class=577190907-24112010>I wrote an application where a user can 
paint 2d polygons in 3D space. Then the user can define a cutting plane and i 
display the resulting lines. </SPAN></DIV>
<DIV><SPAN class=577190907-24112010>The problem is that SOMETIMES the 
cutting does not work, so if anyone replys i will send him the Test1.vtk file 
which contains 4 Polygons whereby only three are cutted. (Yes the cutting plane 
defenetly cuts all polygons and there are 4 Polygons in the input file, see 
first visualization).</SPAN></DIV>
<DIV><SPAN class=577190907-24112010></SPAN> </DIV>
<DIV><SPAN class=577190907-24112010>here my code:</SPAN></DIV>
<DIV><SPAN class=577190907-24112010></SPAN> </DIV>
<DIV><SPAN class=577190907-24112010>
<P>vtkSmartPointer<vtkPolyDataReader> oReader = 
vtkPolyDataReader::New();</P>
<P>oReader->SetFileName(<FONT color=#a31515><FONT 
color=#a31515>"C:\\Test1.vtk"</FONT></FONT>);</P>
<P>oReader->Update();</P>
<P>vtkSmartPointer<vtkPolyData> oPolyData = oReader->GetOutput();</P>
<P><FONT color=#008000><FONT color=#008000>//Display input data, not 
important</P></FONT></FONT>
<P>{</P>
<P>vtkSmartPointer<vtkPolyDataMapper> oMapper = 
vtkPolyDataMapper::New();</P>
<P>oMapper->SetInputConnection(oReader->GetOutputPort());</P>
<P>vtkSmartPointer<vtkActor> oActor = vtkActor::New();</P>
<P>oActor->SetMapper( oMapper );</P>
<P>vtkSmartPointer<vtkRenderer> oRenderer = vtkRenderer::New();</P>
<P>vtkSmartPointer<vtkRenderWindow> oRenderWindow = 
vtkRenderWindow::New();</P>
<P>oRenderWindow->AddRenderer(oRenderer);</P>
<P>vtkSmartPointer<vtkRenderWindowInteractor> oIRen = 
vtkRenderWindowInteractor::New();</P>
<P>oIRen->SetRenderWindow(oRenderWindow);</P>
<P>oRenderer->AddActor(oActor);</P>
<P></P>
<P><FONT color=#008000><FONT color=#008000>// Render and 
interact</P></FONT></FONT>
<P>oRenderWindow->Render();</P>
<P>oIRen->Initialize();</P>
<P>oIRen->Start();</P>
<P>}</P>
<P>oPolyData->Print(std::cout); <FONT color=#008000><FONT 
color=#008000>//containing 4 polygons</P></FONT></FONT>
<P><FONT color=#008000><FONT color=#008000>//Cut 2D polygons in 3D space with a 
plane</P></FONT></FONT>
<P>vtkSmartPointer<vtkPlane> oPlane = vtkPlane::New();</P>
<P>vtkSmartPointer<vtkCutter> oCutter = vtkCutter::New();</P>
<P>oCutter->SetCutFunction(oPlane);</P>
<P>oCutter->GenerateValues(1,0,1); <FONT color=#008000><FONT 
color=#008000>//i am not sure why i do that</P></FONT></FONT>
<P>oPlane->SetOrigin(8.5, -72, -1177.0);</P>
<P>oPlane->SetNormal(1,0,0);</P>
<P>oCutter->SetInput(oPolyData);</P>
<P>oCutter->Update();</P>
<P>vtkSmartPointer<vtkPolyData> oCuttedPolyData = 
oCutter->GetOutput();</P>
<P><FONT color=#008000><FONT color=#008000>//Display cutting data, not important 
</P></FONT></FONT>
<P>{</P>
<P>vtkSmartPointer<vtkPolyDataMapper> oMapper = 
vtkPolyDataMapper::New();</P>
<P>oMapper->SetInputConnection(oCutter->GetOutputPort());</P>
<P>vtkSmartPointer<vtkActor> oActor = vtkActor::New();</P>
<P>oActor->SetMapper( oMapper );</P>
<P>vtkSmartPointer<vtkRenderer> oRenderer = vtkRenderer::New();</P>
<P>vtkSmartPointer<vtkRenderWindow> oRenderWindow = 
vtkRenderWindow::New();</P>
<P>oRenderWindow->AddRenderer(oRenderer);</P>
<P>vtkSmartPointer<vtkRenderWindowInteractor> oIRen = 
vtkRenderWindowInteractor::New();</P>
<P>oIRen->SetRenderWindow(oRenderWindow);</P>
<P>oRenderer->AddActor(oActor);</P>
<P></P>
<P><FONT color=#008000><FONT color=#008000>// Render and 
interact</P></FONT></FONT>
<P>oRenderWindow->Render();</P>
<P>oIRen->Initialize();</P>
<P>oIRen->Start();</P>
<P>}</P></SPAN></DIV></BODY></HTML>