#!/usr/bin/python
#dv3d_data_Surfaces.py
#Main grouping for all surface handling - ?call to other functions from here
#DV3D refactor 2
#AG 25/07/2013

import vtk
from dv3d_dialogs_GenerateSingleSurface import *
from dv3d_dialogs_GenerateMultiSurfaces import *
from dv3d_vtkTools_generateVTKSurface import *


def dv3d_data_Surfaces_generateSingleSurface(the_parent_window):
    #launch a dialog that allows us to interact with our data

    tpw = the_parent_window #for brevity
    
    if len(tpw.Planes) == 0:
        print 'No data loaded to generate surfaces from! .. load some plane data first.'
        return
    else:
        generateSurfaceOptionsDialog(tpw)



def dv3d_data_Surfaces_generateMultiSurfaces(the_parent_window):
    #launch a dialog that allows us to interact with our data

    tpw = the_parent_window #for brevity
    
    if len(tpw.Planes) == 0:
        print 'No data loaded to generate surfaces from! .. load some plane data first.'
        return
    else:
        generateMultiSurfaceOptionsDialog(tpw)



def dv3d_data_LoadSurface(the_parent_window, theSurfaceFile):
    dv3d_vtkTools_generateFromLoadedFile(the_parent_window, theSurfaceFile)


