void HexBC::resetPatchColors() { for(vtkIdType i=0; i<localPatches->GetNumberOfItems(); i++) { HexPatch *p = HexPatch::SafeDownCast(localPatches->GetItemAsObject(i)); p->resetColor(); } }
void HexBC::resetPatchColors() { for(vtkIdType i=0; i<patchIds->GetNumberOfIds();i++) { HexPatch *p = HexPatch::SafeDownCast( globalPatches->GetItemAsObject(patchIds->GetId(i))); p->resetColor(); } }
void EdgeSetTypeWidget::setSelectedPatch(vtkIdType selPatchId) { double c[3]; HexPatch * p = HexPatch::SafeDownCast( hexBlocker->patches->GetItemAsObject(selPatchId) ); p->getCenter(c); p->resetColor(); if(ui->useRadiusCheckBox->isChecked()) { double R=ui->radiusLineEdit->text().toDouble(); //check for sensible radius. if(R==0.0) { emit setStatusText(tr("Cannot use zero radius")); return; } double edgeLength = selectedEdge->getLength(); if( -edgeLength/2.0 < R && R < edgeLength/2.0) { QString msg=QString( "The radius has to be larger than or equal to half the edge length, i.e >= "); msg.append(QString::number(edgeLength/2.0)); emit setStatusText(tr(msg)); return; } selectedEdge->calcArcControlPointFromCenter(c,R); } else { selectedEdge->calcArcControlPointFromCenter(c); } // selectedEdge->getControlPoint(0,c); table->update(); slotDataChanged(); }