Esempio n. 1
0
def _viewTabSumbitVTKOutFile(fname, outname, foldMode, caption, plot, sf, nbs,
                             ssp):
    desView3D = DesicosViewer3D()
    desView3D.setScalingFactor(sf.value)
    desView3D.setNeighborhoodSize(nbs.value)
    desView3D.setSampleSpacing(ssp.value)
    desView3D.addCSVFile(fname.value, mode=foldMode.value)
    desView3D.writeVTP(outname.value)
    if plot.value == 1:
        desView3D.setCaption(caption.value)
        desView3D.addWidgets()
        desView3D.show()
Esempio n. 2
0
def _viewTabSubmitCCDBTXTFile(fname, caption, foldMode, sf, nbs, ssp):

    desView3D = DesicosViewer3D()

    desView3D.setScalingFactor(sf.value)
    desView3D.setNeighborhoodSize(nbs.value)
    desView3D.setSampleSpacing(ssp.value)
    desView3D.setCaption(caption)
    desView3D.addCSVFile(fname.value, mode=foldMode.value)
    desView3D.addWidgets()
    myStream.write('Rendered: ' + str(fname.value))

    desView3D.show()
Esempio n. 3
0
def _evalTabShowArray2D(xx, yy, ff, mm, nn, sff, opt):
    x = np.frombuffer(xx.get_obj())
    y = np.frombuffer(yy.get_obj())
    fc = np.frombuffer(ff.get_obj())
    m = mm.value
    n = nn.value
    sf = sff.value
    fm = opt['foldMode']
    sq = opt['sqrMode']

    f = np.reshape(fc, (m, n), order='C')

    desView3D = DesicosViewer3D()
    desView3D.setScalingFactor(sf)
    desView3D.addArray2d(x, y, f, sq)
    desView3D.addWidgets(opt)
    desView3D.show()
Esempio n. 4
0
from PySide.QtGui import *

sys.path.append('../stochastic/')
sys.path.append('../abaqus-conecyl-python_DEV/')

from conecylDB import imps, R_measured, H_measured, t_measured
from measured_imp_ms import read_file
from stochastic.imperfGen import *
from viewer import DesicosViewer3D

sg = ImperfFactory()
sg.addInputsFromCCDB(
    ['degenhardt_2010_z22', 'degenhardt_2010_z23', 'degenhardt_2010_z25'])
sg.compute()
desView3D = DesicosViewer3D()
desView3D.setScalingFactor(1000.)

sg.sMidS.strFacts[0].connectOutputArray(sg.sMidS.aveFunc)

aa = sg.sMidS.strFacts[0].getPattern('tBlk', 'zBlk')

#plot Surface pattern
#desView3D.addArray2d(sg.sMidS.x*sg.sMidS.RB,sg.sMidS.y,aa)#,mode='square')

#plot Full Power spectrum
#desView3D.addArray2d(sg.sMidS.x*sg.sMidS.RB,sg.sMidS.y,sg.sMidS.winFilter)#,mode='square')

#plot Interpolated Power spectrum
#desView3D.addArray2d(sg.sMidS.fyIn,sg.sMidS.fxIn,sg.sMidS.shMod,mode='square')
Esempio n. 5
0
from viewer import DesicosViewer3D

dv = DesicosViewer3D()
dv.scalingFactor = 60.0
dv.addCSVFile('res/pat.txt')
dv.writeVTP('test.vtp')
dv.addWidgets()
dv.show()
Esempio n. 6
0
def _viewTabSubmitVTKFile(fname):
    desView3D = DesicosViewer3D()
    desView3D.addVTPFile(fname.value)
    desView3D.setCaption(r'VTK file: ' + str(fname.value))
    desView3D.addWidgets()
    desView3D.show()