<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>With selection Loop as an implicit</FONT></DIV>
<DIV><FONT face=Arial size=2>function, </FONT><FONT face=Arial
size=2>vtkClipPolyData does not</FONT></DIV>
<DIV><FONT face=Arial size=2>clip as I think it should : </FONT><FONT face=Arial
size=2>It only</FONT></DIV>
<DIV><FONT face=Arial size=2>keeps faces entirely contained by</FONT></DIV>
<DIV><FONT face=Arial size=2>the clip volume, </FONT><FONT face=Arial
size=2>instead of producing</FONT></DIV>
<DIV><FONT face=Arial size=2>new triangles when faces are partially</FONT></DIV>
<DIV><FONT face=Arial size=2>contained by the clip volume.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Usually, vtkClipPolyData is able to produce
</FONT></DIV>
<DIV><FONT face=Arial size=2>new triangles to respect clipping
Volume,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>How can I obtain those triangles ?</FONT></DIV>
<DIV><FONT face=Arial size=2>Is there a probleme with InsideOutOn ?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>here is my code :</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>/*============================================*/</FONT></DIV>
<DIV><FONT face=Arial
size=2> vtkIdList *DEMPoints =
vtkIdList::New();<BR> vtkImplicitSelectionLoop *clipLoop =
vtkImplicitSelectionLoop::New();<BR> points->Reset();<BR> <BR> //
recuperation de la cellule
courante<BR> dataGISClean->GetCellPoints(i,DEMPoints);<BR> <BR> clipLoop->SetLoop(points);<BR> clipLoop->SetNormal(0.0,1.0,0.0); //
my y is height cause of vrml
export<BR> <BR> // ajout du clipping du mnt
selon les polygones<BR> vtkClipPolyData
*clipper3=vtkClipPolyData::New();<BR> clipper3->SetInput(pdn->GetOutput());<BR> clipper3->GenerateClipScalarsOn();<BR> clipper3->SetClipFunction(clipLoop);<BR> clipper3->GenerateClippedOutputOff();<BR> clipper3->InsideOutOn();<BR> clipper3->SetValue(0.5);<BR> clipper3->Update();<BR> <BR> cout
<<i <<"/" <<dataGISClean->GetNumberOfPolys()
<<endl;<BR> cout <<"nombre de polygones : "
<<clipper3->GetOutput()->GetNumberOfPolys()
<<endl;<BR> <BR> if
(dataGISClean->GetNumberOfCells() >
0){<BR> vtkIdList *listCells =
vtkIdList::New();<BR> for
(j=0;j<clipper3->GetOutput()->GetNumberOfCells();j++)<BR> {<BR> listCells->InsertNextId(j);<BR> }</FONT></DIV>
<DIV><FONT face=Arial size=2> </FONT></DIV>
<DIV><FONT face=Arial size=2> //clipper3->GetOutput()
does not contain a properly clipped DEM</FONT></DIV>
<DIV><FONT face=Arial
size=2> dataGIS1->CopyCells(clipper3->GetOutput(),listCells);<BR> }<BR>/*===============================================================*/</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Sebastien MARAUX</FONT></DIV></BODY></HTML>