Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Christian Butz
VTK
Commits
93eb54eb
Commit
93eb54eb
authored
Mar 31, 2004
by
Mathieu Malaterre
Browse files
BUG: Fix Bug #720 - vtkBandedPolyDataContourFilter outputs degenerate polygons
parent
14bc06ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Graphics/vtkBandedPolyDataContourFilter.cxx
View file @
93eb54eb
...
...
@@ -25,7 +25,7 @@
#include
<float.h>
vtkCxxRevisionMacro
(
vtkBandedPolyDataContourFilter
,
"1.3
7
"
);
vtkCxxRevisionMacro
(
vtkBandedPolyDataContourFilter
,
"1.3
8
"
);
vtkStandardNewMacro
(
vtkBandedPolyDataContourFilter
);
// Construct object.
...
...
@@ -592,7 +592,7 @@ void vtkBandedPolyDataContourFilter::Execute()
}
//Trivial output - completely in a contour band or a triangle
if
(
!
intersectionPoint
||
numFullPts
<
=
3
)
if
(
!
intersectionPoint
||
numFullPts
=
=
3
)
{
cellId
=
this
->
InsertCell
(
newPolys
,
npts
,
pts
,
cellId
,
s
[
idx
],
newScalars
);
continue
;
...
...
@@ -617,8 +617,11 @@ void vtkBandedPolyDataContourFilter::Execute()
{
newPolygon
[
numPolyPoints
++
]
=
fullPoly
[(
mL
+
i
)
%
numFullPts
];
}
cellId
=
this
->
InsertCell
(
newPolys
,
numPolyPoints
,
newPolygon
,
cellId
,
s
[
idx
],
newScalars
);
if
(
numPolyPoints
>=
3
)
{
cellId
=
this
->
InsertCell
(
newPolys
,
numPolyPoints
,
newPolygon
,
cellId
,
s
[
idx
],
newScalars
);
}
if
(
this
->
GenerateContourEdges
)
{
contourEdges
->
InsertNextCell
(
2
);
...
...
@@ -634,7 +637,7 @@ void vtkBandedPolyDataContourFilter::Execute()
while
(
m2R
!=
m2L
)
{
numPointsToAdd
=
(
mL
>
mR
?
mL
-
mR
+
1
:
numFullPts
-
(
mR
-
mL
)
+
1
);
if
(
numPointsToAdd
<
=
3
)
if
(
numPointsToAdd
=
=
3
)
{
//just a triangle left
for
(
numPolyPoints
=
0
,
i
=
0
;
i
<
numPointsToAdd
;
i
++
)
{
...
...
@@ -676,6 +679,10 @@ void vtkBandedPolyDataContourFilter::Execute()
}
//add the polygon
if
(
numPolyPoints
<
3
)
{
break
;
}
cellId
=
this
->
InsertCell
(
newPolys
,
numPolyPoints
,
newPolygon
,
cellId
,
s
[
mR
],
newScalars
);
if
(
this
->
GenerateContourEdges
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment