[vtkusers] Is it a VTK bug of vtkDelaunay2D ?

6dgis at 163.com 6dgis at 163.com
Thu Sep 29 09:21:36 EDT 2005


Hi,All
				
 	I am trying to trianglate the polydata using vtkDelaunay2D, but I got a wrong answer.
Anybody could help me ? Thx in advance!:)

This is the part of code:

	......
	//read the polydata which contains one exterior loop and one interior loop.
    vtkPolyDataReader *rd = vtkPolyDataReader::New();
	rd->SetFileName("test_poly.txt");
	rd->Update();

	//This is my test code for compute the exterior loop's normal and the interior loop's normal.
	int pt_num;
	int *pt_ids;
	float fst_norm[3], snd_norm[3];
	rd->GetOutput()->GetPolys()->InitTraversal();
	rd->GetOutput()->GetPolys()->GetNextCell(pt_num, pt_ids);
	vtkPolygon::ComputeNormal(rd->GetOutput()->GetPoints(), pt_num, pt_ids, fst_norm);
	rd->GetOutput()->GetPolys()->GetNextCell(pt_num, pt_ids);
	vtkPolygon::ComputeNormal(rd->GetOutput()->GetPoints(), pt_num, pt_ids, snd_norm);

	//Delaunay...
	vtkDelaunay2D * de = vtkDelaunay2D::New();
	de->SetInput(rd->GetOutput());
	de->SetSource(rd->GetOutput());
	de->SetTolerance(0.000001);
	de->Update();
 	......


this the file of "test_poly.txt"  :

# vtk DataFile Version 3.0
vtk output
ASCII
DATASET POLYDATA
POINTS 236 float
9.6 27.947 15 9.59782 28.8978 14.9891 9.59782 28.9 14.9891 
9.6 28.9022 14.9891 10.5955 29.9 14.9776 10.6 29.9045 14.9776 
11.5932 30.9 14.9662 11.6 30.9068 14.9661 12.5909 31.9 14.9547 
12.6 31.9 14.9547 12.6091 31.9091 14.9546 13.6 32.9 14.9433 
13.6114 32.9114 14.9431 14.6 33.9 14.9318 15.5864 33.9 14.9318 
15.6 33.9 14.9318 16.5864 33.9 14.9318 16.6 33.9 14.9318 
16.6136 33.9 14.9318 17.6 32.9114 14.9431 18.5886 32.9114 14.9431 
18.6 32.9114 14.9431 19.5886 32.9114 14.9431 19.6 32.9114 14.9431 
20.5886 32.9114 14.9431 20.6 32.9114 14.9431 21.5886 32.9114 14.9431 
21.6 32.9114 14.9431 22.5886 32.9114 14.9431 22.6 32.9114 14.9431 
23.5864 33.9 14.9318 23.6 33.9 14.9318 24.5864 33.9 14.9318 
24.6 33.9 14.9318 25.5864 33.9 14.9318 25.6 33.9 14.9318 
26.5864 33.9 14.9318 26.6 33.9 14.9318 27.5864 33.9 14.9318 
27.6 33.9 14.9318 27.6137 33.9137 14.9316 27.6273 33.9 14.9318 
28.6 32.9228 14.943 29.5772 32.9228 14.943 29.6 32.9228 14.943 
30.5772 32.9228 14.943 30.6 32.9114 14.9431 31.5886 32.9114 14.9431 
31.6 32.9114 14.9431 31.6113 32.9 14.9433 32.6 31.9091 14.9546 
33.5909 31.9091 14.9546 33.6 31.9091 14.9546 33.6091 31.9 14.9547 
34.6 30.9068 14.9661 34.6068 30.9 14.9662 35.6 29.9045 14.9776 
35.6 29.9 14.9776 35.6 28.9022 14.9891 35.6022 28.9 14.9891 
36.553 27.947 15 36.5999 27.9001 15.0005 36.6 27.9 15.0005 
36.6 27.8999 15.0005 36.6 26.9 15.012 37.5953 25.9047 15.0234 
37.6 25.9 15.0235 37.6 24.907 15.0348 37.607 24.9 15.0349 
37.607 24.893 15.035 37.6093 23.9 15.0464 38.6 22.9115 15.0577 
38.6 22.9 15.0578 38.6 21.9138 15.0691 38.5861 21.9 15.0693 
38.5861 21.8861 15.0694 38.5839 20.9 15.0807 37.6 19.9184 15.092 
37.6 19.9 15.0922 37.6 19.8815 15.0924 37.6 18.9 15.1036 
36.623 17.923 15.1148 36.6 17.9 15.1151 36.6 17.8769 15.1154 
36.6 16.9 15.1266 36.5747 16.9 15.1266 35.6 15.9275 15.1377 
35.5724 15.9 15.138 34.6 15.9 15.138 34.5724 15.9 15.138 
33.6 14.9298 15.1491 33.5701 14.9 15.1495 32.6 14.9 15.1495 
32.5701 14.9 15.1495 31.6 13.9321 15.1606 31.5679 13.9321 15.1606 
30.6 13.9321 15.1606 29.6299 14.9 15.1495 29.6 14.9 15.1495 
28.6299 14.9 15.1495 28.6 14.9298 15.1491 27.6276 15.9 15.138 
27.6 15.9 15.138 26.6276 15.9 15.138 26.6 15.9275 15.1377 
26.5725 15.9275 15.1377 26.5747 16.9 15.1266 25.6 17.8769 15.1154 
25.5769 17.8769 15.1154 24.6 17.8769 15.1154 24.5769 17.8769 15.1154 
23.6 17.8769 15.1154 23.5769 17.8769 15.1154 22.6 17.8769 15.1154 
22.5537 17.8537 15.1156 21.6 17.8537 15.1156 20.6506 16.9 15.1266 
20.6 16.8491 15.1271 19.6552 15.9 15.138 19.6 15.8445 15.1386 
18.6598 14.9 15.1495 18.6 14.87 15.1498 18.5399 14.8399 15.1502 
17.6 14.8399 15.1502 16.6644 13.9 15.1609 16.6 13.8677 15.1613 
16.5677 13.8677 15.1613 15.6 13.8677 15.1613 15.5677 13.8677 15.1613 
14.6 13.8677 15.1613 14.5677 13.8677 15.1613 13.6 13.8677 15.1613 
13.5678 13.9 15.1609 12.6 13.9 15.1609 11.63 14.87 15.1498 
11.6 14.9 15.1495 10.6299 14.9 15.1495 10.6 14.9298 15.1491 
9.6276 15.9 15.138 9.6 15.9275 15.1377 8.62531 16.9 15.1266 
8.62525 16.9253 15.1263 8.62302 17.9 15.1151 8.62297 17.923 15.1148 
8.6 17.9458 15.1146 7.64146 18.9 15.1036 7.64127 18.9413 15.1032 
7.63687 19.9 15.0922 7.63671 19.9367 15.0918 7.63229 20.9 15.0807 
7.63214 20.9321 15.0804 7.62771 21.9 15.0693 7.62758 21.9276 15.069 
7.62313 22.9 15.0578 7.62302 22.923 15.0576 7.61855 23.9 15.0464 
7.61846 23.9185 15.0462 7.61396 24.9 15.0349 8.6 25.8906 15.0236 
8.60469 25.9 15.0235 8.60468 25.9047 15.0234 8.6024 26.9 15.012 
9.6 27.8999 15.0005 9.6 27.9 15.0005 18.5 27.947 15 
18.5 28.5 14.9937 18.5013 28.5013 14.9937 19.5 29.5 14.9822 
19.5036 29.5 14.9822 20.5 30.4942 14.9708 20.5058 30.5 14.9708 
21.5 31.4919 14.9594 21.5081 31.5 14.9593 22.5 32.4896 14.948 
23.4919 31.5 14.9593 23.5 31.5082 14.9592 23.5081 31.5 14.9593 
24.5 31.5 14.9593 24.5081 31.5 14.9593 25.5 30.5059 14.9707 
25.5058 30.5 14.9708 26.5 29.5036 14.9822 26.5036 29.5 14.9822 
27.5 28.5013 14.9937 27.5025 28.5 14.9937 27.5 27.947 15 
27.5 27.5 15.0051 27.5 27.499 15.0051 28.4967 26.5 15.0166 
28.5 26.4967 15.0166 28.5 25.5 15.028 28.5 25.4944 15.0281 
28.5 24.5 15.0395 28.5 23.5102 15.0508 28.5102 23.5 15.0509 
28.5102 23.4898 15.0511 28.5125 22.5 15.0624 28.5125 22.4875 15.0625 
28.5148 21.5 15.0739 28.5 21.4852 15.074 28.5 20.5 15.0853 
28.5 20.4829 15.0855 28.5 19.5 15.0968 28.5 18.5216 15.108 
28.4784 18.5 15.1082 27.5 18.5 15.1082 26.5216 18.5 15.1082 
26.5 18.5 15.1082 25.5194 19.4806 15.097 25.5 19.5 15.0968 
24.5194 19.5 15.0968 24.5 19.5 15.0968 23.5194 19.5 15.0968 
23.5 19.5193 15.0965 23.4807 19.5193 15.0965 22.5 19.5193 15.0965 
22.4615 19.5385 15.0963 21.5 19.5385 15.0963 20.5341 20.5 15.0853 
20.5297 21.4703 15.0742 20.5148 21.5 15.0739 20.5147 21.5147 15.0737 
20.5 21.5294 15.0735 19.525 22.5 15.0624 19.5248 22.5248 15.0621 
19.5204 23.5 15.0509 19.5159 24.4841 15.0397 19.5079 24.5 15.0395 
19.5079 24.5079 15.0394 19.5 24.5157 15.0393 18.5112 25.5 15.028 
18.5112 25.5112 15.0279 18.5066 26.5 15.0166 18.5021 27.4979 15.0051 
18.501 27.5 15.0051 18.501 27.501 15.0051 
POLYGONS 2 238
164 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 
72 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 

CELL_DATA 2
POINT_DATA 236



        6dgis
        6dgis at 163.com
          2005-09-29


More information about the vtkusers mailing list