Skip to content
Snippets Groups Projects
Commit db9c48f7 authored by Boman Romain's avatar Boman Romain
Browse files

Merge remote-tracking branch 'origin/adrien' into ci-py3

parents f36cd9ed 173469c1
No related branches found
No related tags found
2 merge requests!49Add CI with python 3 including trilinos,!48Futurize for python2/3
Pipeline #525 passed
This commit is part of merge request !49. Comments created here will be created in the context of that merge request.
...@@ -80,10 +80,11 @@ def read(filename): ...@@ -80,10 +80,11 @@ def read(filename):
"""Read from file and store in data array """Read from file and store in data array
Adrien Croavto Adrien Croavto
""" """
import io
import numpy as np import numpy as np
# read file # read file
fl = file(filename) fl = io.open(filename, 'r')
label = fl.next().split(',') label = fl.readline().split(',')
fl.close() fl.close()
data = np.loadtxt(filename, delimiter=',', skiprows=1) data = np.loadtxt(filename, delimiter=',', skiprows=1)
return data return data
......
...@@ -48,7 +48,7 @@ class Cutter(object): ...@@ -48,7 +48,7 @@ class Cutter(object):
plane.SetOrigin(cutO[0], cutO[1], cutO[2]) plane.SetOrigin(cutO[0], cutO[1], cutO[2])
plane.SetNormal(cutN[0], cutN[1], cutN[2]) plane.SetNormal(cutN[0], cutN[1], cutN[2])
# cut the threshold and get data # cut the threshold and get data
cutter = vtk.vtkFiltersCorePython.vtkCutter() cutter = vtk.vtkCutter()
cutter.SetCutFunction(plane) cutter.SetCutFunction(plane)
cutter.SetInputConnection(thresh.GetOutputPort()) cutter.SetInputConnection(thresh.GetOutputPort())
cutter.Update() cutter.Update()
......
# -*- coding: utf-8 -*-
# Copyright 2020 University of Liège # Copyright 2020 University of Liège
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
......
...@@ -332,7 +332,7 @@ class Mesh(object): ...@@ -332,7 +332,7 @@ class Mesh(object):
self.mapper = vtk.vtkDataSetMapper() self.mapper = vtk.vtkDataSetMapper()
#self.mapper.SetInputConnection(self.producer.GetOutputPort()) #self.mapper.SetInputConnection(self.producer.GetOutputPort())
self.mapper.SetInputData(ugrid) self.mapper.SetInputData(ugrid)
self.mapper.ImmediateModeRenderingOff() #self.mapper.ImmediateModeRenderingOff()
self.mapper.SetResolveCoincidentTopologyToPolygonOffset() self.mapper.SetResolveCoincidentTopologyToPolygonOffset()
self.mapper.ScalarVisibilityOff() self.mapper.ScalarVisibilityOff()
...@@ -432,7 +432,7 @@ class ScalarBar(object): ...@@ -432,7 +432,7 @@ class ScalarBar(object):
class Grid(object): class Grid(object):
def __init__(self, ugrid): def __init__(self, ugrid):
self.mapper = vtk.vtkDataSetMapper() self.mapper = vtk.vtkDataSetMapper()
self.mapper.ImmediateModeRenderingOff() #self.mapper.ImmediateModeRenderingOff()
self.mapper.SetResolveCoincidentTopologyToPolygonOffset() self.mapper.SetResolveCoincidentTopologyToPolygonOffset()
self.mapper.ScalarVisibilityOff() self.mapper.ScalarVisibilityOff()
self.mapper.SetInputData(ugrid) self.mapper.SetInputData(ugrid)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment