Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlantGL package for VisuAlea in Python3 #67

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/openalea/plantgl/ext/pgl_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"""
import math
import random as rdm
from scipy import array, arange
from numpy import array, arange
from copy import deepcopy
import openalea.plantgl.all as pgl

Expand Down
103 changes: 52 additions & 51 deletions src/openalea/plantgl/wralea/demos/__wralea__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
from openalea.core import *


__name__ = 'vplants.plantgl.demos'
__name__ = 'openalea.plantgl.demos'
__alias__ = ["vplants.plantgl.demos"]

__editable__ = True
__description__ = 'Demos of plantgl nodes'
__license__ = 'CECILL-C'
__url__ = 'http://openalea.gforge.inria.fr/doc/vplants/plantgl/doc/_build/html/contents.html'
__url__ = 'http://openalea.rtfd.io/'
__alias__ = []
__version__ = '0.8.0'
__version__ = '0.9.0'
__authors__ = 'Thomas Cokelaer'
__institutes__ = 'INRIA/CIRAD'
__icon__ = 'hull.png'
Expand All @@ -27,15 +28,15 @@
doc='',
inputs=[],
outputs=[],
elt_factory={ 2: ('vplants.plantgl.objects', 'Box'),
elt_factory={ 2: ('openalea.plantgl.objects', 'Box'),
3: ('openalea.flow control', 'annotation'),
4: ('openalea.flow control', 'annotation'),
5: ('vplants.plantgl.visualization', 'plot3D'),
6: ('vplants.plantgl.visualization', 'plot3D'),
8: ('vplants.plantgl.objects', 'Sphere'),
9: ('vplants.plantgl.objects', 'Shape'),
10: ('vplants.plantgl.objects', 'Sphere'),
11: ('vplants.plantgl.objects', 'Material')},
5: ('openalea.plantgl.visualization', 'plot3D'),
6: ('openalea.plantgl.visualization', 'plot3D'),
8: ('openalea.plantgl.objects', 'Sphere'),
9: ('openalea.plantgl.objects', 'Shape'),
10: ('openalea.plantgl.objects', 'Sphere'),
11: ('openalea.plantgl.objects', 'Material')},
elt_connections={ 147877352: (8, 0, 9, 2),
147877364: (9, 0, 5, 0),
147877376: (10, 0, 6, 0),
Expand Down Expand Up @@ -217,28 +218,28 @@
inputs=[],
outputs=[],
elt_factory={ 2: ('openalea.data structure.list', 'list'),
3: ('vplants.plantgl.objects', 'Color3'),
4: ('vplants.plantgl.objects', 'Material'),
5: ('vplants.plantgl.objects', 'Shape'),
6: ('vplants.plantgl.objects', 'Scene'),
7: ('vplants.plantgl.visualization', 'plot3D'),
3: ('openalea.plantgl.objects', 'Color3'),
4: ('openalea.plantgl.objects', 'Material'),
5: ('openalea.plantgl.objects', 'Shape'),
6: ('openalea.plantgl.objects', 'Scene'),
7: ('openalea.plantgl.visualization', 'plot3D'),
8: ('openalea.data structure.list', 'list'),
9: ('vplants.plantgl.objects', 'AsymmetricHull'),
9: ('openalea.plantgl.objects', 'AsymmetricHull'),
10: ('openalea.data structure.list', 'list'),
11: ('vplants.plantgl.objects', 'AsymmetricHull'),
12: ('vplants.plantgl.objects', 'Shape'),
13: ('vplants.plantgl.objects', 'Translated'),
14: ('vplants.plantgl.objects', 'Translated'),
11: ('openalea.plantgl.objects', 'AsymmetricHull'),
12: ('openalea.plantgl.objects', 'Shape'),
13: ('openalea.plantgl.objects', 'Translated'),
14: ('openalea.plantgl.objects', 'Translated'),
15: ('openalea.data structure.list', 'list'),
16: ('openalea.data structure.list', 'list'),
17: ('vplants.plantgl.objects', 'AsymmetricHull'),
18: ('vplants.plantgl.objects', 'AsymmetricHull'),
19: ('vplants.plantgl.objects', 'Translated'),
20: ('vplants.plantgl.objects', 'Translated'),
17: ('openalea.plantgl.objects', 'AsymmetricHull'),
18: ('openalea.plantgl.objects', 'AsymmetricHull'),
19: ('openalea.plantgl.objects', 'Translated'),
20: ('openalea.plantgl.objects', 'Translated'),
21: ('openalea.data structure.list', 'list'),
22: ('openalea.data structure.list', 'list'),
23: ('vplants.plantgl.objects', 'Shape'),
24: ('vplants.plantgl.objects', 'Shape'),
23: ('openalea.plantgl.objects', 'Shape'),
24: ('openalea.plantgl.objects', 'Shape'),
25: ('openalea.flow control', 'annotation')},
elt_connections={ 155573412: (13, 0, 12, 2),
155573424: (19, 0, 23, 2),
Expand Down Expand Up @@ -789,16 +790,16 @@
doc='',
inputs=[],
outputs=[],
elt_factory={ 3: ('vplants.plantgl.objects', 'Shape'),
4: ('vplants.plantgl.visualization', 'plot3D'),
5: ('vplants.plantgl.objects', 'ImageTexture'),
6: ('vplants.plantgl.objects', 'QuadSet'),
elt_factory={ 3: ('openalea.plantgl.objects', 'Shape'),
4: ('openalea.plantgl.visualization', 'plot3D'),
5: ('openalea.plantgl.objects', 'ImageTexture'),
6: ('openalea.plantgl.objects', 'QuadSet'),
7: ('openalea.data structure.list', 'list'),
8: ('openalea.data structure.list', 'list'),
9: ('openalea.data structure.list', 'list'),
10: ('openalea.data structure.list', 'list'),
11: ('openalea.flow control', 'annotation'),
13: ('vplants.plantgl.demos', 'leaf_tex.png')},
13: ('openalea.plantgl.demos', 'leaf_tex.png')},
elt_connections={ 167714232: (6, 0, 3, 2),
167714244: (10, 0, 6, 13),
167714256: (8, 0, 6, 5),
Expand Down Expand Up @@ -982,7 +983,7 @@
9: [(0, '[(0, 1, 2, 3)]')],
10: [(0, '[(0, 0), (0, 1), (1, 1), (1, 0)]')],
11: [],
13: [ (0, 'PackageData(vplants.plantgl.demos, leaf_tex.png)'),
13: [ (0, 'PackageData(openalea.plantgl.demos, leaf_tex.png)'),
(1, 'None'),
(2, 'None')],
'__in__': [],
Expand Down Expand Up @@ -1042,21 +1043,21 @@
doc='',
inputs=[],
outputs=[],
elt_factory={ 2: ('vplants.plantgl.visualization', 'plot3D'),
3: ('vplants.plantgl.objects', 'QuadSet'),
elt_factory={ 2: ('openalea.plantgl.visualization', 'plot3D'),
3: ('openalea.plantgl.objects', 'QuadSet'),
4: ('openalea.data structure.list', 'list'),
5: ('openalea.flow control', 'annotation'),
6: ('openalea.data structure.list', 'list'),
7: ('openalea.data structure.list', 'list'),
8: ('openalea.data structure.list', 'list'),
10: ('vplants.plantgl.objects', 'Color4'),
10: ('openalea.plantgl.objects', 'Color4'),
13: ('openalea.flow control', 'annotation'),
14: ('openalea.flow control', 'annotation'),
15: ('openalea.flow control', 'annotation'),
16: ('openalea.flow control', 'annotation'),
17: ('vplants.plantgl.objects', 'Color4'),
18: ('vplants.plantgl.objects', 'Color4'),
19: ('vplants.plantgl.objects', 'Color4')},
17: ('openalea.plantgl.objects', 'Color4'),
18: ('openalea.plantgl.objects', 'Color4'),
19: ('openalea.plantgl.objects', 'Color4')},
elt_connections={ 147877292: (7, 0, 3, 5),
147877304: (17, 0, 8, 0),
147877316: (10, 0, 8, 0),
Expand Down Expand Up @@ -1320,27 +1321,27 @@
doc='',
inputs=[],
outputs=[],
elt_factory={ 2: ('vplants.plantgl.objects', 'Sphere'),
3: ('vplants.plantgl.objects', 'Translated'),
elt_factory={ 2: ('openalea.plantgl.objects', 'Sphere'),
3: ('openalea.plantgl.objects', 'Translated'),
4: ('openalea.data structure.list', 'list'),
5: ('vplants.plantgl.visualization', 'plot3D'),
5: ('openalea.plantgl.visualization', 'plot3D'),
6: ('openalea.flow control', 'annotation'),
7: ('openalea.flow control', 'annotation'),
8: ('vplants.plantgl.objects', 'Sphere'),
9: ('vplants.plantgl.objects', 'Sphere'),
10: ('vplants.plantgl.objects', 'Translated'),
11: ('vplants.plantgl.objects', 'Translated'),
8: ('openalea.plantgl.objects', 'Sphere'),
9: ('openalea.plantgl.objects', 'Sphere'),
10: ('openalea.plantgl.objects', 'Translated'),
11: ('openalea.plantgl.objects', 'Translated'),
12: ('openalea.data structure.tuple', 'tuple'),
13: ('openalea.data structure.tuple', 'tuple'),
14: ('vplants.plantgl.objects', 'Shape'),
14: ('openalea.plantgl.objects', 'Shape'),
15: ('openalea.data structure.tuple', 'tuple'),
16: ('vplants.plantgl.objects', 'Material'),
17: ('vplants.plantgl.visualization', 'plot3D'),
16: ('openalea.plantgl.objects', 'Material'),
17: ('openalea.plantgl.visualization', 'plot3D'),
18: ('openalea.data structure.tuple', 'tuple'),
19: ('vplants.plantgl.objects', 'Material'),
20: ('vplants.plantgl.objects', 'Shape'),
19: ('openalea.plantgl.objects', 'Material'),
20: ('openalea.plantgl.objects', 'Shape'),
21: ('openalea.data structure.list', 'list'),
22: ('vplants.plantgl.objects', 'Scene')},
22: ('openalea.plantgl.objects', 'Scene')},
elt_connections={ 147877148: (12, 0, 16, 1),
147877160: (12, 0, 16, 3),
147877172: (13, 0, 11, 2),
Expand Down
8 changes: 4 additions & 4 deletions src/openalea/plantgl/wralea/dresser/__wralea__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

from openalea.core import Factory

__name__ = "vplants.plantgl.dresser"
__alias__ = ["PlantGL.Dresser"]
__name__ = "openalea.plantgl.dresser"
__alias__ = ["PlantGL.Dresser", "vplants.plantgl.dresser"]

__version__ = '0.0.1'
__version__ = '0.1.0'
__license__ = 'CECILL-C'
__authors__ = 'F. Boudon and D. Da Silva'
__institutes__ = 'INRIA/CIRAD'
Expand All @@ -32,6 +32,6 @@
dresser = Factory(name="PGL Dresser",
description="Add Pgl geometry an object",
category="scene.PGL",
nodemodule="vplants.plantgl.ext.dresser",
nodemodule="openalea.plantgl.ext.dresser",
nodeclass="dresser",
)
18 changes: 10 additions & 8 deletions src/openalea/plantgl/wralea/edition/__wralea__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@
#from .pgl_interface import *
#from .pgl_interface_widget import *

__name__ = "vplants.plantgl.edition"
__name__ = "openalea.plantgl.edition"
__alias__ = ["vplants.plantgl.edition"]

__editable__ = True
__version__ = '0.0.2'
__license__ = 'CECILL-V2'
__authors__ = 'F. Boudon'
__authors__ = 'F. Boudon, C. Pradal'
__institutes__ = 'INRIA/CIRAD'
__description__ = 'PlantGL Edition nodes.'
__url__ = 'http://openalea.gforge.inria.fr'
__url__ = 'http://openalea.rtfd.io'

__all__ = ['curve2d', 'nurbs']

curve2d = Factory( name= "Curve2D",
description= "Display and edition of a curve 2D",
category = "Visualisation, Edition",
nodemodule = "pgl_edition_node",
nodemodule = "openalea.plantgl.wralea.edition.pgl_edition_node",
nodeclass = "curve2D",
widgetmodule = "pgl_interface_widget",
widgetmodule = "openalea.plantgl.wralea.edition.pgl_interface_widget",
widgetclass = "Curve2DWidget",
inputs=(dict(name="curve", interface=None,),dict(name="curve", interface=None,)),
outputs=(dict(name="curve", interface=None,),),
Expand All @@ -28,11 +30,11 @@
nurbs= Factory( name= "NurbsPatch",
description= "Display and edition of a Nurbs Patch",
category = "Visualisation, Edition",
nodemodule = "pgl_edition_node",
nodemodule = "openalea.plantgl.wralea.edition.pgl_edition_node",
nodeclass = "nurbs",
widgetmodule = "pgl_interface_widget",
widgetmodule = "openalea.plantgl.wralea.edition.pgl_interface_widget",
widgetclass = "NurbsPatchWidget",
inputs=(dict(name="nurbs", interface=None,),),
inputs=(dict(name="nurbs", interface=None,),dict(name="curve", interface=None,)),
outputs=(dict(name="nurbs",),),
lazy = False
)
Expand Down
3 changes: 1 addition & 2 deletions src/openalea/plantgl/wralea/edition/pgl_edition_node.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from openalea.core import *
from openalea.core import Node
from copy import deepcopy
from pickle import loads, dumps
from openalea.plantgl.all import NurbsCurve2D
Expand All @@ -22,6 +22,5 @@ def __call__(self, inputs):

def nurbs(surf):
""" A curve 2D """
from copy import deepcopy
return deepcopy(surf)

5 changes: 2 additions & 3 deletions src/openalea/plantgl/wralea/edition/pgl_interface.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- python -*-
#
#
# Copyright 2006-2010 INRIA - CIRAD - INRA
# Copyright 2006-2024 INRIA - CIRAD - INRAE
#
# File author(s): Pradal, Boudon, Barbeau
#
Expand All @@ -14,9 +14,8 @@
"""declaration of curve2D interface and its widget """

__license__ = "Cecill-C"
__revision__ = " $Id: interface.py 2245 2010-02-08 17:11:34Z cokelaer $"

from openalea.core.interface import IInterface, IInterfaceMetaClass
from openalea.core.interface import IInterface
from openalea.plantgl.scenegraph import Curve2D, NurbsCurve2D, NurbsPatch

class ICurve2D(IInterface) :
Expand Down
Loading
Loading