Commit 841e8f78 authored by Will Schroeder's avatar Will Schroeder
Browse files

ERR: Fixed bug related to removing CopyFlags from PolyData object.

parent 98944878
......@@ -61,6 +61,7 @@ void vlFeatureEdges::Execute()
}
// build cell structure. Only operate with polygons.
Mesh.SetPoints(this->Input->GetPoints());
Mesh.SetPolys(this->Input->GetPolys());
//
// Allocate storage for lines/points
......
......@@ -183,3 +183,29 @@ void vlGeometryFilter::Execute()
}
void vlGeometryFilter::PrintSelf(ostream& os, vlIndent indent)
{
int i;
if (this->ShouldIPrint(vlGeometryFilter::GetClassName()))
{
vlDataSetToPolyFilter::PrintSelf(os,indent);
os << indent << "Point Minimum : " << this->PointMinimum << "\n";
os << indent << "Point Maximum : " << this->PointMaximum << "\n";
os << indent << "Cell Minimum : " << this->CellMinimum << "\n";
os << indent << "Cell Maximum : " << this->CellMaximum << "\n";
os << indent << "Extent: ("
<< this->Extent[0] << ", " << this->Extent[1] << ")\n("
<< this->Extent[2] << ", " << this->Extent[3] << ")\n("
<< this->Extent[4] << ", " << this->Extent[5] << ")\n";
os << indent << "PointClipping: " << (this->PointClipping ? "On\n" : "Off\n");
os << indent << "CellClipping: " << (this->CellClipping ? "On\n" : "Off\n");
os << indent << "ExtentClipping: " << (this->ExtentClipping ? "On\n" : "Off\n");
}
}
......@@ -82,6 +82,7 @@ void vlPolyNormals::Execute()
pd = this->Input->GetPointData();
NewMesh = new vlPolyData;
NewMesh->SetPoints(this->Input->GetPoints());
// create a copy because we're modifying it
newPolys = new vlCellArray(*(this->Input->GetPolys()));
NewMesh->SetPolys(newPolys);
......
......@@ -45,6 +45,7 @@ void vlStripper::Execute()
this->Initialize();
// build cell structure. Only operate with polygons and triangle strips.
Mesh.SetPoints(this->Input->GetPoints());
Mesh.SetPolys(this->Input->GetPolys());
Mesh.SetStrips(this->Input->GetStrips());
......
......@@ -91,7 +91,7 @@ void vlTransformStructuredPoints::Execute()
{
int i, numPts, numOutPts;
int *dimIn;
float *originIn, *aspectIn;
float *originIn, *aspectIn, ar[3];
vlPointData *pd;
vlScalars *inScalars, *outScalars;
......@@ -117,13 +117,13 @@ void vlTransformStructuredPoints::Execute()
if (this->SampleDimensions[0] <= 1 || this->SampleDimensions[1] <= 1 ||
this->SampleDimensions[2] <= 1)
{
for (i = 0; i < 3; i++) this->Dimensions[i] = dimIn[i];
this->SetDimensions(dimIn);
}
// otherwise use the specified dimensions
else
{
for (i = 0; i < 3; i++) this->Dimensions[i] = this->SampleDimensions[i];
this->SetDimensions(this->SampleDimensions);
}
// if bounds are not specified, use input's aspect ratio and origin
......@@ -131,21 +131,19 @@ void vlTransformStructuredPoints::Execute()
this->ModelBounds[2] >= this->ModelBounds[3] ||
this->ModelBounds[4] >= this->ModelBounds[5])
{
for (i = 0; i < 3; i++)
{
this->AspectRatio[i] = aspectIn[i];
this->Origin[i] = originIn[i];
}
this->SetAspectRatio(aspectIn);
this->SetOrigin(originIn);
}
// otherwise, calculate them from bounds
else
{
for (i = 0; i < 3; i++)
{
this->Origin[i] = this->ModelBounds[2*i];
this->AspectRatio[i] = (this->ModelBounds[2*i+1]-this->ModelBounds[2*i])/
(this->Dimensions[i] - 1);
}
this->SetOrigin(this->ModelBounds[0], this->ModelBounds[1],
this->ModelBounds[2]);
for (i=0; i<3; i++)
ar[i] = (this->ModelBounds[2*i+1]-this->ModelBounds[2*i]) /
(this->Dimensions[i] - 1);
this->SetAspectRatio(ar);
}
// Allocate data. Scalar type is same as input.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment