Exemplo n.º 1
0
static void Dialog1HelpButton_CB(void)
{
    TecUtilLockStart(AddOnID);
    TecUtilDialogMessageBox("On-line Help not available for this dialog.",
                            MessageBox_Information);
    TecUtilLockFinish(AddOnID);
}
void Tetrahedralizer::createTetrahedralZone(ZoneList_t const& sourceZones) const
{
    vtkSmartPointer<ZoneToVTKPolyDataSource> zoneSource = vtkSmartPointer<ZoneToVTKPolyDataSource>::New();
    zoneSource->setSourceZones(sourceZones);

    // vtkDelaunay3D does the real work of constructing tets
    vtkSmartPointer<vtkDelaunay3D> delaunay3D = vtkSmartPointer<vtkDelaunay3D>::New();
    delaunay3D->SetInputConnection(zoneSource->GetOutputPort());

    vtkSmartPointer<ProgressObserver> progressObserver = vtkSmartPointer<ProgressObserver>::New();
    progressObserver->observe(*delaunay3D);
    progressObserver->setListener(m_listener);

    delaunay3D->Update();

    if (delaunay3D->GetAbortExecute())
        throw Error("Creation of tetrahedral zone canceled.");

    if (delaunay3D->GetOutput()->GetNumberOfCells() == 0)
        throw Error("Error creating tetrahedral zone: No cells could be constructed.");

    if (progressObserver->warningEventOccurred())
    {
        Lock lockObject;
        TecUtilDialogMessageBox("Degenerate cells encountered. Mesh quality is suspect.",
                                MessageBox_Information);
    }

    sendZoneToTecplot(sourceZones, *delaunay3D->GetOutput());

    recordMacroCommand(sourceZones);
}