<div dir="ltr"><div class="gmail_quote"><div class="gmail_quote">Hi,</div><div class="gmail_quote"><br type="attribution"><div dir="ltr"><div>I have a 2D mesh as the grey one in the photo(the photo is attached) as an stl i used  
vtkFeatureEdges to extract and draw the green borders but i am wondering
 how can I extract the inner and the outer green rectangles in 2 
different vtkPolydata instances.<br><br></div><div>Is there any other way better than using vtkFeatureEdges?<br></div><div><br></div><div>the vtp file from the output of the vtkFeatureEdges</div><div>here is the code I wrote <br><br></div><div>void renderPoint(double* point, double[3] color, float opacity, float point size)<br>{<br><pre> //Rendering code<br>  ...</pre>}<br></div><div><br></div>void main()<br>{<br><pre>vtkSmartPointer<span><</span>vtkSTLReader<span>></span> reader <span>=</span>
    vtkSmartPointer<span><</span>vtkSTLReader<span>></span><span>::</span><span>New</span><span>(</span><span>)</span><span>;</span>
  reader<span>-</span><span>></span>SetFileName<span>("window.stl"</span><span></span><span>)</span><span>;</span>
  reader<span>-</span><span>></span>Update<span>(</span><span>)</span><span>;<br></span></pre><pre><span>  auto polyData = reader->GetOutput();<br></span></pre><pre>  vtkSmartPointer<vtkFeatureEdges> featureEdges =<br>    vtkSmartPointer<vtkFeatureEdges>::New();<br>  featureEdges->SetInput(mFinitePolyData);<br>  featureEdges->BoundaryEdgesOn();<br>  featureEdges->FeatureEdgesOff();<br>  featureEdges->ManifoldEdgesOff();<br>  featureEdges->NonManifoldEdgesOff();<br>  featureEdges->ColoringOff();<br>  featureEdges->Update();<span></span><br><br>  mBoundaryPolyData = featureEdges->GetOutput();<br><br>  for (int i = 0; i < 10; ++i)<br>  {<br>    renderPoint(mBoundaryPolyData->GetPoint(i), blue, 1.0, 5.0);<br>  }</pre>}</div></div></div>
</div>