AW: [vtkusers] Obtaining cell id's lying on the edge of a cylinder

Marcus Stojek stojek at part-gmbh.de
Fri Jun 6 04:44:52 EDT 2003


Hi,

I had almost exactly the same question a couple of days ago, but did't get
an answer.
Here is how i solve the problem (in Python)

   surfpoint=vtkFloatArray()
   tupnum=vtkgeofilter.GetOutput().GetPolys().GetData().GetNumberOfTuples()

vtkgeofilter.GetOutput().GetPolys().GetData().GetData(0,tupnum-1,0,0,surfpoi
nt)

This gives me a list of all facets building the surface. You might want to
use something like
GetLines instead of GetPolys.

For each facet I put the nodelist into:

   GetCellNeighbors(cell to exclude,pointlist,cellids)

and get the cell id I am looking for.

I am pretty sure there are better ways.

Bye,
Marcus.



-----Ursprüngliche Nachricht-----
Von: vtkusers-admin at public.kitware.com
[mailto:vtkusers-admin at public.kitware.com]Im Auftrag von R K
Shyamprakash
Gesendet: Freitag, 6. Juni 2003 07:52
An: Vtkusers (E-mail)
Betreff: [vtkusers] Obtaining cell id's lying on the edge of a cylinder


Hi,
          I have a cylinder object with open ends. How can I identify the
cells which are lying on the edge of the cylinder. I find the edge in the
following manner.

	vtkFeatureEdges edges = new vtkFeatureEdges();
	edges.SetInput(cylinderData);
	edges.BoundaryEdgesOn();
	edges.ManifoldEdgesOff();
	edges.NonManifoldEdgesOff();
	edges.FeatureEdgesOff();

	From the vtkFeatureEdges.GetOutput() I get all the point id's lying the
edge of the cylinder. But I also want to get the cell id's . The problem
here is, the output of feature edges will contain vtkLine cell type instead
of vtkTriangle cell type. Is there any method to get the cell id's of the
cylinder object which occupy the edge? Hope I am clear.

Thanks
Shyam

_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.486 / Virus Database: 284 - Release Date: 29.05.03




More information about the vtkusers mailing list