Esempio n. 1
0
# - getCurvatureHeight (pyTree) -
import Converter.PyTree as C
import Geom.PyTree as D
import Generator.PyTree as G
import KCore.test as test

# User definition of parametric curve
def f(t):
    x = t
    y = t*t+1
    z = 0.
    return (x,y,z)

# i-array ouvert
a1 = D.curve(f, 10)
b1 = D.getCurvatureHeight(a1)
test.testT([b1], 1)

# BAR-array ouvert
a2 = C.convertArray2Tetra(a1)
b2 = D.getCurvatureHeight( a2 )
test.testT([b2], 2)

# i-array ferme
a1 = D.circle((0,0,0),1.)
b1 = D.getCurvatureHeight(a1)
test.testT([b1], 11)

# BAR-array ferme
a2 = D.circle((0,0,0),1.)
b2 = D.getCurvatureHeight(a2)
# - getCurvatureHeight(pyTree) -
import Converter.PyTree as C
import Geom.PyTree as D

a = D.polyline([(0., 0., 0.), (1., 1., 0.), (2., 0., 0.)])
a = D.getCurvatureHeight(a)
C.convertPyTree2File(a, 'out.cgns')