Index: DamTools/GeometryVisualizer/GeometryWithSurfPlot.py =================================================================== diff -u -r5351 -r5353 --- DamTools/GeometryVisualizer/GeometryWithSurfPlot.py (.../GeometryWithSurfPlot.py) (revision 5351) +++ DamTools/GeometryVisualizer/GeometryWithSurfPlot.py (.../GeometryWithSurfPlot.py) (revision 5353) @@ -7,7 +7,11 @@ # Extract points DEFAULT_VALUE = 91919191919.987654321 -surfaces = data.get('Surfaces', []) +geometry = data.get('Geometry') +if geometry: + surfaces = geometry.get('Surfaces', []) +else: + surfaces = data.get('Surfaces', []) for surface in surfaces: curves = surface.get('OuterLoop', {}).get('Curves', []) @@ -36,16 +40,18 @@ plt.plot(x_vals, z_vals, marker='o') # Extract surfaceline -surfaceLine = data.get('Points', []) -surfpoints = [] -for surfpoint in surfaceLine: - surf_point = (surfpoint['X'], surfpoint['Z']) - surfpoints.append(surf_point) +surface_Line = data.get('SurfaceLine') +if surface_Line: + surfaceLine = surface_Line.get('Points', []) + surfpoints = [] + for surfpoint in surfaceLine: + surf_point = (surfpoint['X'], surfpoint['Z']) + surfpoints.append(surf_point) # Plot surfaceline -if surfpoints: - x_vals, z_vals = zip(*surfpoints) - plt.plot(x_vals, z_vals, marker='X', linestyle='dotted', linewidth='3') + if surfpoints: + x_vals, z_vals = zip(*surfpoints) + plt.plot(x_vals, z_vals, marker='X', linestyle='dotted', linewidth='3') # Add labels and grid