<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hello Eric,<br><br>Thank's for the answer.<br><br>"So, are you seeing nothing when you render your scene?"<br>Actually no, nothing appends my Polydata is not "cuted" it's exactly the same size<br><br>Then I tried InsideOutOn() and now nothing is dislplayed.<br><br>I don't know where I can be wrong.. I will try again to set the bounds manually, but not sure that's the problem..<br><br><br>By the way I also tried to use vtkExtractPolyDataGeometry that worked quit the same but it's exactly what I need..<br><br> <br> vtkExtractPolyDataGeometry * clipper2 = vtkExtractPolyDataGeometry::New();<br><br> clipper2->SetInput(myPolyData);<br> clipper2->SetImplicitFunction(myCube);<br> clipper2->SetExtractInside(1);<br> clipper2->Update();<br><br><br>Nothing is displayed...<br><br>Regards,<br>Adeline<br><br><hr id="stopSpelling">Subject: Re: [vtkusers] vtkClipPolyData with vtkBox doesn't work<br>From: emonson@cs.duke.edu<br>Date: Thu, 14 Jan 2010 14:28:52 -0500<br>CC: vtkusers@vtk.org<br>To: adeline_joli@hotmail.com<br><br>
<base>Hello Adeline,<div><br></div><div>So, are you seeing nothing when you render your scene? One thing to be careful of when using a box for your clip function is which direction the default normals of the box faces point -- this defines whether the clip leaves the inside intact or cuts out the inside of the box. Maybe this isn't the problem you're having, but you could try setting </div><div><br></div><div>clipper->InsideOutOn();</div><div><br></div><div>and see if anything shows up.</div><div><br></div><div>Otherwise, there are examples of clipping with the vtkBoxWidget and it's GetPlanes method in {vtksource}/Widgets/Testing/Cxx/BoxWidget.cxx and {vtksource}/Examples/GUI/Python/BoxWidget.py in case those could help you track down the problem or approach it in another way. </div><div><br></div><div>Talk to you later,</div><div>-Eric</div><div><br></div><div><div>
<span class="ecxApple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div>------------------------------------------------------</div><div>Eric E Monson</div><div>Duke Visualization Technology Group</div><div><br class="ecxwebkit-block-placeholder"></div></span></div><br><div><div>On Jan 14, 2010, at 12:29 PM, Adeline Joliet wrote:</div><br class="ecxApple-interchange-newline"><blockquote><span class="ecxApple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div class="ecxhmmessage" style="font-size: 10pt; font-family: Verdana;">Hello,<br><br>I'm trying to cut un polydata using vtkClipPolyData with a vtkBox as implicit function.<br><br>my Polydata is simply a rectangle (x = 100, y = 50, z= 20). I'd like to cut this rectangle to obtain<br>only the part of the middle.. (so i'd like to cut to a right side AND a left side...)<br><br>here is the code<br><br> vtkBox * cuting = vtkBox::New();<br> double boundy[6];<br><br> //m_image is a vtkImageData that represent a cube (my rectangle polydata interect this cube, so the bounds should be correct...)<br> m_image->GetBounds(boundy);<br><br> cuting->SetBounds(boundy);<br> <br>vtkClipPolyData * clipper = vtkClipPolyData::New();<br>clipper->SetInput(newPolyData);<br>clipper->SetClipFunction(cuting);<br><br>// and then I display clipper->GetOutput...<br><br>the thing is that i tried with vtkPlane and it works... but the problem is that i need if a use<br>vtkPlane I can cut only One side....<br><br><br>any help would be appreciated,<br>Than's<br><br>Adeline<br><br><hr>Windows 7 : Trouvez le PC qui vous convient!<span class="ecxApple-converted-space"> </span><a href="http://clk.atdmt.com/FRM/go/181574577/direct/01/">Découvrez notre offre !</a>_______________________________________________<br>Powered by<span class="ecxApple-converted-space"> </span><a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Please keep messages on-topic and check the VTK FAQ at:<a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br></div></span></blockquote></div><br></div>                                            <br /><hr />Avec Internet Explorer, surfez en toute discrétion sur internet <a href='http://clk.atdmt.com/FRM/go/182932252/direct/01/' target='_new'>Cliquez ici !</a></body>
</html>