diff --git a/smtk/bridge/polygon/plugin/smconfig.xml b/smtk/bridge/polygon/plugin/smconfig.xml index 5877625af8253f4cf93651ed4eac55fe591eb5dc..b719f33303678bb2bebdcb4ee46ccfadd1841042 100644 --- a/smtk/bridge/polygon/plugin/smconfig.xml +++ b/smtk/bridge/polygon/plugin/smconfig.xml @@ -152,16 +152,6 @@ - - - - - - @@ -207,8 +197,6 @@ - - diff --git a/smtk/extension/paraview/widgets/pqArcWidget.cxx b/smtk/extension/paraview/widgets/pqArcWidget.cxx index 5cc482e63c126744f46c16d92f39e897ea530270..068f26ca2d0c90c5f0d7f53da728daebba091b63 100644 --- a/smtk/extension/paraview/widgets/pqArcWidget.cxx +++ b/smtk/extension/paraview/widgets/pqArcWidget.cxx @@ -80,12 +80,6 @@ pqArcWidget::pqArcWidget( finishButton->setPalette(applyPalette); finishButton->setDefault(true); - QObject::connect(this->Internals->buttonRectArc, SIGNAL(clicked()), - this, SLOT(generateRectangleArc())); - - QObject::connect(this->Internals->ArcStraightenButton, SIGNAL(released()), - this, SLOT(onStraightenArc())); - pqServerManagerModel* smmodel = pqApplicationCore::instance()->getServerManagerModel(); this->createWidget(smmodel->findServer(_smproxy->GetSession())); @@ -281,32 +275,6 @@ void pqArcWidget::finishContour( ) emit this->contourDone(); } -//----------------------------------------------------------------------------- -void pqArcWidget::generateRectangleArc( ) -{ - vtkSMNewWidgetRepresentationProxy* widget = this->getWidgetProxy(); - if (widget) - { - widget->InvokeCommand("Rectangularize"); - this->setModified(); - this->render(); - } - emit this->contourDone(); -} - -//----------------------------------------------------------------------------- -void pqArcWidget::onStraightenArc() -{ - vtkSMNewWidgetRepresentationProxy* widget = this->getWidgetProxy(); - if (widget) - { - widget->InvokeCommand("Straighten"); - this->setModified(); - this->render(); - } - emit this->contourDone(); -} - //---------------------------------------------------------------------------- void pqArcWidget::setPointPlacer(vtkSMProxy* placerProxy) { @@ -370,7 +338,6 @@ void pqArcWidget::updateRepProperty( //----------------------------------------------------------------------------- void pqArcWidget::useArcEditingUI(bool isWholeArc) { - this->Internals->buttonRectArc->setVisible(isWholeArc); this->Internals->Delete->setVisible(false); this->Internals->Closed->setEnabled(isWholeArc); } diff --git a/smtk/extension/paraview/widgets/pqArcWidget.h b/smtk/extension/paraview/widgets/pqArcWidget.h index 114dc88cbb5950f061a11222a41e648bd7b4505c..58cc51ceff0d46bb8b4f38c191107ab83f292b15 100644 --- a/smtk/extension/paraview/widgets/pqArcWidget.h +++ b/smtk/extension/paraview/widgets/pqArcWidget.h @@ -79,10 +79,6 @@ public slots: /// Finish editing the contour void finishContour( ); - /// Generate a rectangle arc if possible from available - /// points in the contour - void generateRectangleArc( ); - /// Resets pending changes. Default implementation /// pushes the property values of the controlled widget to the /// 3D widget properties. @@ -102,8 +98,6 @@ protected: protected slots: void deleteAllNodes(); - // clear all the internal nodes of the selected the arc. - void onStraightenArc(); private: pqArcWidget(const pqArcWidget&); // Not implemented. diff --git a/smtk/extension/paraview/widgets/qtArcWidget.ui b/smtk/extension/paraview/widgets/qtArcWidget.ui index abc40274a6332c83f05f40676f2b74b85e67db1d..f1f605497da63b13f4dfd4af29249ad9e06f9552 100644 --- a/smtk/extension/paraview/widgets/qtArcWidget.ui +++ b/smtk/extension/paraview/widgets/qtArcWidget.ui @@ -165,38 +165,6 @@ - - - - - 0 - 0 - - - - - 0 - 32 - - - - Generate Closed Rectangle Arc - - - - - - - - 0 - 32 - - - - Make Straight Line - - - diff --git a/smtk/extension/vtk/widgets/vtkSMTKArcRepresentation.cxx b/smtk/extension/vtk/widgets/vtkSMTKArcRepresentation.cxx index 5e655a7de47ab8265980fab0c9258b2433084d21..96e8b378f23214e4661054fd7be76b962dd2004e 100644 --- a/smtk/extension/vtk/widgets/vtkSMTKArcRepresentation.cxx +++ b/smtk/extension/vtk/widgets/vtkSMTKArcRepresentation.cxx @@ -520,77 +520,6 @@ void vtkSMTKArcRepresentation::Initialize( vtkPolyData * pd ) this->VisibilityOn(); } -//----------------------------------------------------------------------------- -void vtkSMTKArcRepresentation::Rectangularize() -{ - vtkPolyData* contourPoly = this->GetContourRepresentationAsPolyData(); - if(contourPoly) - { - double contourBounds[6]; - contourPoly->GetBounds(contourBounds); - vtkBoundingBox bbox(contourBounds); - if(bbox.IsValid()) - { - vtkNew newContour; - vtkNew rectPoints; - newContour->SetPoints(rectPoints.GetPointer()); - rectPoints->SetNumberOfPoints(4); - // insert four corner points in the following order - // [xmin, ymin], [xmax, ymin], [xmax, ymax], [xmin, ymax] - double z = contourBounds[5]; // using zmax, - rectPoints->InsertPoint(0, contourBounds[0], contourBounds[2], z); - rectPoints->InsertPoint(1, contourBounds[1], contourBounds[2], z); - rectPoints->InsertPoint(2, contourBounds[1], contourBounds[3], z); - rectPoints->InsertPoint(3, contourBounds[0], contourBounds[3], z); - - vtkNew lineSegments; - vtkIdType arcVerts[5]={0, 1, 2, 3, 0}; - lineSegments->InsertNextCell(5, arcVerts); - newContour->SetLines(lineSegments.GetPointer()); - this->Initialize(newContour.GetPointer()); - } - } -} - -//----------------------------------------------------------------------------- -void vtkSMTKArcRepresentation::Straighten() -{ - vtkPolyData* contourPoly = this->GetContourRepresentationAsPolyData(); - if(contourPoly && contourPoly->GetNumberOfLines() > 0 - && contourPoly->GetNumberOfPoints() > 2) - { - vtkCellArray* lines = contourPoly->GetLines(); - vtkNew newContour; - vtkNew linePoints; - newContour->SetPoints(linePoints.GetPointer()); - linePoints->SetNumberOfPoints(2); - double pt[3]; - vtkIdType numCells = lines->GetNumberOfCells(); - if(numCells > 0) - { - vtkIdType *fpts,fnpts, *lpts, lnpts; - lines->GetCell(0, fnpts, fpts); - lines->GetCell(numCells - 1, lnpts, lpts); - if(fnpts > 0 && lnpts > 0) - { - contourPoly->GetPoint(fpts[0], pt); - linePoints->InsertPoint(0, pt); - - vtkIdType lstP = (this->ClosedLoop && lnpts > 1) ? lnpts - 2 : lnpts - 1; - contourPoly->GetPoint(lpts[lstP], pt); - linePoints->InsertPoint(1, pt); - - vtkNew lineSegments; - vtkIdType arcVerts[2]={0, 1}; - lineSegments->InsertNextCell(2, arcVerts); - newContour->SetLines(lineSegments.GetPointer()); - this->Initialize(newContour.GetPointer()); - - } - } - } -} - //----------------------------------------------------------------------------- void vtkSMTKArcRepresentation::PrintSelf(ostream& os, vtkIndent indent) diff --git a/smtk/extension/vtk/widgets/vtkSMTKArcRepresentation.h b/smtk/extension/vtk/widgets/vtkSMTKArcRepresentation.h index 84258f000d37503133993e581539e82b5337cb76..4d7e7cf57b393a5d4017a1ef7354aeaa2b49741a 100644 --- a/smtk/extension/vtk/widgets/vtkSMTKArcRepresentation.h +++ b/smtk/extension/vtk/widgets/vtkSMTKArcRepresentation.h @@ -98,17 +98,6 @@ public: vtkGetMacro( CanEdit, int ); vtkBooleanMacro( CanEdit, int ); - //Description: - // Generate a closed rectangle arc with four points, based on the - // points on the contour. Initially, the new rectangle is just - // the bounding box of all available points. - void Rectangularize(); - - //Description: - // This will make the representation a straight line containing only the - // start and end points of the original arc. - void Straighten(); - //Description: // Expose method in superClass void InitializeContour( vtkPolyData * poly, vtkIdList *)