changeset 0:f63d4da328a3 draft default tip

Uploaded
author iuc
date Tue, 23 Aug 2016 15:02:48 -0400
parents
children
files icqsol_macros.xml icqsol_rotate_shape.py icqsol_rotate_shape.xml icqsol_utils.py test-data/cylinder_with_field.vtkascii test-data/rotated_cylinder_with_field.vtkascii
diffstat 6 files changed, 570 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/icqsol_macros.xml	Tue Aug 23 15:02:48 2016 -0400
@@ -0,0 +1,116 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<macros>
+    <token name="@WRAPPER_VERSION@">1.0</token>
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package" version="0.3.26">icqsol</requirement>
+        </requirements>
+    </xml>
+    <xml name="stdio">
+        <stdio>
+            <exit_code range="1:"/>
+            <exit_code range=":-1"/>
+            <regex match="Error:"/>
+            <regex match="Exception:"/>
+        </stdio>
+    </xml>
+    <!-- TODO: place this in colormaps_conf.xml -->
+    <xml name="color_map_param">
+        <param name="color_map" type="select" label="Color map">
+            <option value="hot" selected="True">Hot</option>
+            <option value="cold">Cold</option>
+            <option value="blackbody">Blackbody</option>
+            <option value="gnu">Gnu</option>
+        </param>
+    </xml>
+    <xml name="output_vtk_type_params">
+        <param name="output_vtk_type" type="select" label="Output file type">
+            <option value="vtkascii" selected="True">Vtk-ascii</option>
+            <option value="vtkbinary">Vtk-binary</option>
+        </param>
+    </xml>
+    <token name="@origin_cmd_args@">
+        --origin_x $create_process_cond.shape_cond.origin_x
+        --origin_y $create_process_cond.shape_cond.origin_y
+        --origin_z $create_process_cond.shape_cond.origin_z
+    </token>
+    <xml name="origin_params">
+        <param name="origin_x" type="float" value="0.0" label="X coordinate of origin" help="Floating point number"/>
+        <param name="origin_y" type="float" value="0.0" label="Y coordinate of origin" help="Floating point number"/>
+        <param name="origin_z" type="float" value="0.0" label="Z coordinate of origin" help="Floating point number"/>
+    </xml>
+    <token name="@lengths_cmd_args@">
+        --length_x $create_process_cond.shape_cond.length_x
+        --length_y $create_process_cond.shape_cond.length_y
+        --length_z $create_process_cond.shape_cond.length_z
+    </token>
+    <xml name="lengths_params">
+        <!-- At least one of these lengths must be greater than zero, but we have no validator for this. -->
+        <param name="length_x" type="float" value="1.0" label="Length in the X direction" help="Floating point number">
+            <validator type="in_range" min="0" exclude_min="false" />
+        </param>
+        <param name="length_y" type="float" value="0.0" label="Length in the Y direction" help="Floating point number">
+            <validator type="in_range" min="0" exclude_min="false" />
+        </param>
+        <param name="length_z" type="float" value="0.0" label="Length in the Z direction" help="Floating point number">
+            <validator type="in_range" min="0" exclude_min="false" />
+        </param>
+    </xml>
+    <xml name="lengths_exclude_min_params">
+        <param name="length_x" type="float" value="1.0" label="Length in the X direction" help="Floating point number">
+            <validator type="in_range" min="0" exclude_min="true" />
+        </param>
+        <param name="length_y" type="float" value="1.0" label="Length in the Y direction" help="Floating point number">
+            <validator type="in_range" min="0" exclude_min="true" />
+        </param>
+        <param name="length_z" type="float" value="1.0" label="Length in the Z direction" help="Floating point number">
+            <validator type="in_range" min="0" exclude_min="true" />
+        </param>
+    </xml>
+    <token name="@radius_cmd_args@">
+        --radius $create_process_cond.shape_cond.radius
+    </token>
+    <xml name="radius_params">
+        <param name="radius" type="float" value="1.0" label="Radius" help="Floating point number">
+            <validator type="in_range" min="0" exclude_min="True" />
+        </param>
+    </xml>
+    <token name="@n_theta_cmd_args@">
+        --n_theta $create_process_cond.shape_cond.n_theta
+    </token>
+    <xml name="n_theta_params">
+        <param name="n_theta" type="integer" value="16" label="Number of slices" help="Controls the tessellation along the longitude direction">
+            <validator type="in_range" min="0" exclude_min="False" />
+        </param>
+    </xml>
+    <token name="@n_phi_cmd_args@">
+        --n_phi $create_process_cond.shape_cond.n_phi
+    </token>
+    <xml name="n_phi_params">
+        <param name="n_phi" type="integer" value="8" label="Number of stacks" help="Controls the tessellation along the latitude direction">
+            <validator type="in_range" min="0" exclude_min="False" />
+        </param>
+    </xml>
+    <xml name="citations">
+        <citations>
+            <citation type="bibtex">
+                @unpublished{None,
+                author = {None},
+                title = {None},
+                year = {None},
+                eprint = {None},
+                url = {https://github.com/gregvonkuster/galaxy-csg}
+            }</citation>
+            <citation type="bibtex">
+                @misc(Schroeder-Martin-Lorensen2006,
+                author = "Will Schroeder and 
+                          Ken Martin and
+                          Bill Lorensen",
+                year = "2006",
+                title = "The Visualization Toolkit (4th ed.)",
+                publisher =  "Kitware",
+                url = "https://en.wikipedia.org/wiki/Special:BookSources/978-1-930934-19-1")
+            </citation>
+        </citations>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/icqsol_rotate_shape.py	Tue Aug 23 15:02:48 2016 -0400
@@ -0,0 +1,45 @@
+#!/usr/bin/env python
+import argparse
+import shutil
+import operator
+
+import icqsol_utils
+
+# Parse Command Line.
+parser = argparse.ArgumentParser()
+parser.add_argument('--input', dest='input', help='Shape dataset selected from history')
+parser.add_argument('--input_file_format_and_type', dest='input_file_format_and_type', help='Input file format and type')
+parser.add_argument('--input_dataset_type', dest='input_dataset_type', help='Input dataset_type')
+parser.add_argument('--rotation_degrees', dest='rotation_degrees', type=float, default=0.0, help='Rotation angle in degrees')
+parser.add_argument('--rotation_axis_x', dest='rotation_axis_x', type=float, default=1.0, help='X coordinate of rotation axis')
+parser.add_argument('--rotation_axis_y', dest='rotation_axis_y', type=float, default=0.0, help='Y coordinate of rotation axis')
+parser.add_argument('--rotation_axis_z', dest='rotation_axis_z', type=float, default=0.0, help='Z coordinate of rotation axis')
+parser.add_argument('--output', dest='output', help='Output file name')
+parser.add_argument('--output_vtk_type', dest='output_vtk_type', default='ascii', help='Output VTK type')
+
+args = parser.parse_args()
+
+# Get the format of the input - either vtk or ply.
+input_format, input_file_type = icqsol_utils.get_format_and_type(args.input_file_format_and_type)
+tmp_dir = icqsol_utils.get_temp_dir()
+
+# Instantiate a ShapeManager for loading the input.
+shape_mgr = icqsol_utils.get_shape_manager(input_format, args.input_dataset_type)
+
+# Get the vtk polydata from the input dataset.
+vtk_poly_data = shape_mgr.loadAsVtkPolyData(args.input)
+
+# Only rotate if the axis has some non-zero coordinates.
+# FIXME: this should be handled in a Galaxy tool validator.
+axis = (args.rotation_axis_x, args.rotation_axis_y, args.rotation_axis_z)
+if reduce(operator.mul, axis) != 0.0:
+    # Rotate (in place operation).
+    shape_mgr.rotateVtkPolyData(vtk_poly_data, angleDeg=args.rotation_degrees, axis=axis)
+
+output_format, output_file_type = icqsol_utils.get_format_and_type(args.output_vtk_type)
+
+# Save the output.
+tmp_dir = icqsol_utils.get_temp_dir()
+tmp_output_path = icqsol_utils.get_temporary_file_path(tmp_dir, icqsol_utils.VTK)
+shape_mgr.saveVtkPolyData(vtk_poly_data, file_name=tmp_output_path, file_type=output_file_type)
+shutil.move(tmp_output_path, args.output)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/icqsol_rotate_shape.xml	Tue Aug 23 15:02:48 2016 -0400
@@ -0,0 +1,65 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<tool id="icqsol_rotate_shape" name="Rotate shape" version="@WRAPPER_VERSION@.0">
+    <description></description>
+    <macros>
+        <import>icqsol_macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <command>
+        <![CDATA[
+            python $__tool_directory__/icqsol_rotate_shape.py
+            --input "$input"
+            --input_file_format_and_type $input.ext
+            --input_dataset_type $input.metadata.dataset_type
+            --rotation_axis_x $rotation_axis_x
+            --rotation_axis_y $rotation_axis_y
+            --rotation_axis_z $rotation_axis_z
+            --rotation_degrees $rotation_degrees
+            --output "$output"
+            --output_vtk_type $output_vtk_type
+        ]]>
+    </command>
+    <inputs>
+        <param name="input" type="data" format="plyascii,plybinary,vtkascii,vtkbinary" label="Shape">
+            <validator type="dataset_ok_validator" />
+        </param>
+        <param name="rotation_axis_x" type="float" value="1.0" label="X coordinate of rotation axis" help="Floating point number." />
+        <param name="rotation_axis_y" type="float" value="0.0" label="Y coordinate of rotation axis" help="Floating point number." />
+        <param name="rotation_axis_z" type="float" value="0.0" label="Z coordinate of rotation axis" help="Floating point number." />
+        <param name="rotation_degrees" type="float" value="0.0" label="Degree of rotation" help="Floating point number." />
+        <expand macro="output_vtk_type_params" />
+    </inputs>
+    <outputs>
+        <data name="output" format="vtkascii">
+            <actions>
+                <action type="format">
+                    <option type="from_param" name="output_vtk_type" />
+                </action>
+            </actions>
+        </data>
+    </outputs>
+    <tests>
+        <test>
+            <param name="input" value="cylinder_with_field.vtkascii" ftype="vtkascii" />
+            <param name="input_file_format_and_type" value="vtkascii" />
+            <param name="input_dataset_type" value="POLYDATA" />
+            <param name="rotation_degrees" value="-90.0" />
+            <param name="rotation_axis_x" value="0.0" />
+            <param name="rotation_axis_y" value="1.0" />
+            <param name="rotation_axis_z" value="-0.5" />
+            <output name="output" file="rotated_cylinder_with_field.vtkascii" ftype="vtkascii" />
+            <param name="output_vtk_type" value="vtkascii" />
+        </test>
+    </tests>
+    <help>
+**What it does**
+
+Applies a rotation to a shape by a given angle about an arbitrary axis.
+
+* **Shape** - Shape to be rotated.
+* **Rotation axis X,Y,Z** - The axis of rotation.
+* **Degree of rotation** - The degree of rotation around the axis.
+
+    </help>
+    <expand macro="citations" />
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/icqsol_utils.py	Tue Aug 23 15:02:48 2016 -0400
@@ -0,0 +1,86 @@
+import os
+import sys
+import tempfile
+
+from icqsol.shapes.icqShapeManager import ShapeManager
+from icqsol.bem.icqLaplaceSolver import LaplaceSolver
+
+PLY = 'ply'
+POLYDATA = 'POLYDATA'
+VTK = 'vtk'
+
+
+def asbool(val):
+    return str(val).lower() in ['yes', 'true']
+
+
+def get_format_and_type(galaxy_ext):
+    # Define the output file format and type.
+    format = None
+    datatype = None
+    if galaxy_ext in ['vtkascii', 'vtkbinary']:
+        format = VTK
+    elif galaxy_ext in ['plyascii', 'plybinary']:
+        format = PLY
+    if galaxy_ext in ['vtkascii', 'plyascii']:
+        datatype = 'ascii'
+    elif galaxy_ext in ['vtkbinary', 'plybinary']:
+        datatype = 'binary'
+    return format, datatype
+
+
+def get_input_file_path(tmp_dir, input_file, format):
+    """
+    iCqSol uses file extensions (e.g., .ply, .vtk) when reading and
+    writing files, so the Galaxy dataset naming convention of
+    setting all file extensions as .dat must be handled.
+    """
+    file_path = get_temporary_file_path(tmp_dir, format)
+    # Remove the file so we can create a symlink.
+    os.remove(file_path)
+    os.symlink(input_file, file_path)
+    return file_path
+
+
+def get_laplace_solver(shape_data, max_edge_length=float('inf')):
+    return LaplaceSolver(shape_data, max_edge_length=max_edge_length)
+
+
+def get_shape_manager(format=None, dataset_type=None):
+    # Instantiate a ShapeManager.
+    return ShapeManager(file_format=format, vtk_dataset_type=dataset_type)
+
+
+def get_temp_dir(prefix='tmp-vtk-', dir=None):
+    """
+    Return a temporary directory.
+    """
+    return tempfile.mkdtemp(prefix=prefix, dir=dir)
+
+
+def get_tempfilename(dir=None, suffix=None):
+    """
+    Return a temporary file name.
+    """
+    if suffix is None:
+        s = None
+    elif suffix.startswith('.'):
+        s = suffix
+    else:
+        s = '.%s' % suffix
+    fd, name = tempfile.mkstemp(suffix=s, dir=dir)
+    os.close(fd)
+    return name
+
+
+def get_temporary_file_path(tmp_dir, file_extension):
+    """
+    Return the path to a temporary file with a valid VTK format
+    file extension.
+    """
+    return get_tempfilename(tmp_dir, file_extension)
+
+
+def stop_err(msg):
+    sys.stderr.write("%s\n" % msg)
+    sys.exit()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/cylinder_with_field.vtkascii	Tue Aug 23 15:02:48 2016 -0400
@@ -0,0 +1,129 @@
+# vtk DataFile Version 3.0
+vtk output
+ASCII
+DATASET POLYDATA
+POINTS 66 float
+0.5 0.2 0.3 0.5 0.2 -0.2 0.5 0.00865828 -0.16194 
+0.85 0.2 -0.2 0.85 0.00865828 -0.16194 0.85 0.2 0.3 
+0.5 -0.153553 -0.0535534 0.85 -0.153553 -0.0535534 0.5 -0.26194 0.108658 
+0.85 -0.26194 0.108658 0.5 -0.3 0.3 0.85 -0.3 0.3 
+0.5 -0.26194 0.491342 0.85 -0.26194 0.491342 0.5 -0.153553 0.653553 
+0.85 -0.153553 0.653553 0.5 0.00865828 0.76194 0.85 0.00865828 0.76194 
+0.5 0.2 0.8 0.85 0.2 0.8 0.5 0.391342 0.76194 
+0.85 0.391342 0.76194 0.5 0.553553 0.653553 0.85 0.553553 0.653553 
+0.5 0.66194 0.491342 0.85 0.66194 0.491342 0.5 0.7 0.3 
+0.85 0.7 0.3 0.5 0.66194 0.108658 0.85 0.66194 0.108658 
+0.5 0.553553 -0.0535534 0.85 0.553553 -0.0535534 0.5 0.391342 -0.16194 
+0.85 0.391342 -0.16194 0.5 0.2 -0.2 0.5 0.00865828 -0.16194 
+0.85 0.2 -0.2 0.85 0.00865828 -0.16194 0.5 -0.153553 -0.0535534 
+0.85 -0.153553 -0.0535534 0.5 -0.26194 0.108658 0.85 -0.26194 0.108658 
+0.5 -0.3 0.3 0.85 -0.3 0.3 0.5 -0.26194 0.491342 
+0.85 -0.26194 0.491342 0.5 -0.153553 0.653553 0.85 -0.153553 0.653553 
+0.5 0.00865828 0.76194 0.85 0.00865828 0.76194 0.5 0.2 0.8 
+0.85 0.2 0.8 0.5 0.391342 0.76194 0.85 0.391342 0.76194 
+0.5 0.553553 0.653553 0.85 0.553553 0.653553 0.5 0.66194 0.491342 
+0.85 0.66194 0.491342 0.5 0.7 0.3 0.85 0.7 0.3 
+0.5 0.66194 0.108658 0.85 0.66194 0.108658 0.5 0.553553 -0.0535534 
+0.85 0.553553 -0.0535534 0.5 0.391342 -0.16194 0.85 0.391342 -0.16194 
+
+POLYGONS 64 256
+3 0 1 2 
+3 4 35 34 
+3 34 3 4 
+3 5 37 36 
+3 0 2 6 
+3 7 38 35 
+3 35 4 7 
+3 5 39 37 
+3 0 6 8 
+3 9 40 38 
+3 38 7 9 
+3 5 41 39 
+3 0 8 10 
+3 11 42 40 
+3 40 9 11 
+3 5 43 41 
+3 0 10 12 
+3 13 44 42 
+3 42 11 13 
+3 5 45 43 
+3 0 12 14 
+3 15 46 44 
+3 44 13 15 
+3 5 47 45 
+3 0 14 16 
+3 17 48 46 
+3 46 15 17 
+3 5 49 47 
+3 0 16 18 
+3 19 50 48 
+3 48 17 19 
+3 5 51 49 
+3 0 18 20 
+3 21 52 50 
+3 50 19 21 
+3 5 53 51 
+3 0 20 22 
+3 23 54 52 
+3 52 21 23 
+3 5 55 53 
+3 0 22 24 
+3 25 56 54 
+3 54 23 25 
+3 5 57 55 
+3 0 24 26 
+3 27 58 56 
+3 56 25 27 
+3 5 59 57 
+3 0 26 28 
+3 29 60 58 
+3 58 27 29 
+3 5 61 59 
+3 0 28 30 
+3 31 62 60 
+3 60 29 31 
+3 5 63 61 
+3 0 30 32 
+3 33 64 62 
+3 62 31 33 
+3 5 65 63 
+3 0 32 1 
+3 3 34 64 
+3 64 33 3 
+3 5 36 65 
+
+POINT_DATA 66
+NORMALS Normals float
+-1 0 0 -1 0 0 -1 0 0 
+0 0.0661589 -0.997809 0 -0.320722 -0.947173 1 0 0 
+-1 0 0 0 -0.658776 -0.752339 -1 0 0 
+0 -0.896537 -0.442968 -1 0 0 0 -0.997809 -0.0661589 
+-1 0 0 0 -0.947173 0.320722 -1 0 0 
+0 -0.752339 0.658776 -1 0 0 0 -0.442968 0.896537 
+-1 0 0 0 -0.0661589 0.997809 -1 0 0 
+0 0.320722 0.947173 -1 0 0 0 0.658776 0.752339 
+-1 0 0 0 0.896538 0.442968 -1 0 0 
+0 0.997809 0.0661589 -1 0 0 0 0.947173 -0.320722 
+-1 0 0 0 0.752339 -0.658776 -1 0 0 
+0 0.442968 -0.896537 0 -0.0661588 -0.997809 0 -0.442968 -0.896537 
+1 0 0 1 0 0 0 -0.752339 -0.658776 
+1 0 0 0 -0.947173 -0.320722 1 0 0 
+0 -0.997809 0.0661589 1 0 0 0 -0.896537 0.442968 
+1 0 0 0 -0.658776 0.752339 1 0 0 
+0 -0.320722 0.947173 1 0 0 0 0.0661589 0.997809 
+1 0 0 0 0.442968 0.896537 1 0 0 
+0 0.752339 0.658776 1 0 0 0 0.947173 0.320722 
+1 0 0 0 0.997809 -0.0661589 1 0 0 
+0 0.896538 -0.442968 1 0 0 0 0.658776 -0.752339 
+1 0 0 0 0.320722 -0.947173 1 0 0 
+
+FIELD FieldData 1
+my_field 1 66 double
+1.19292 1.19292 1.20573 1.3179 1.62563 1.3179 1.21993 1.45051 1.15534 
+1.16035 1.13279 1.0751 1.15534 1.16035 1.21993 1.45051 1.20573 1.62563 
+1.19292 1.3179 1.0824 0.902456 1.00774 0.681662 0.967386 0.577466 0.954762 
+0.547018 0.967386 0.577466 1.00774 0.681662 1.0824 0.902456 1.19292 1.20573 
+1.3179 1.62563 1.21993 1.45051 1.15534 1.16035 1.13279 1.0751 1.15534 
+1.16035 1.21993 1.45051 1.20573 1.62563 1.19292 1.3179 1.0824 0.902456 
+1.00774 0.681662 0.967386 0.577466 0.954762 0.547018 0.967386 0.577466 1.00774 
+0.681662 1.0824 0.902456 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/rotated_cylinder_with_field.vtkascii	Tue Aug 23 15:02:48 2016 -0400
@@ -0,0 +1,129 @@
+# vtk DataFile Version 4.0
+vtk output
+ASCII
+DATASET POLYDATA
+POINTS 66 float
+0.5 0.2 0.3 0.5 0.2 -0.2 0.5 0.00865828 -0.16194 
+0.85 0.2 -0.2 0.85 0.00865828 -0.16194 0.85 0.2 0.3 
+0.5 -0.153553 -0.0535534 0.85 -0.153553 -0.0535534 0.5 -0.26194 0.108658 
+0.85 -0.26194 0.108658 0.5 -0.3 0.3 0.85 -0.3 0.3 
+0.5 -0.26194 0.491342 0.85 -0.26194 0.491342 0.5 -0.153553 0.653553 
+0.85 -0.153553 0.653553 0.5 0.00865828 0.76194 0.85 0.00865828 0.76194 
+0.5 0.2 0.8 0.85 0.2 0.8 0.5 0.391342 0.76194 
+0.85 0.391342 0.76194 0.5 0.553553 0.653553 0.85 0.553553 0.653553 
+0.5 0.66194 0.491342 0.85 0.66194 0.491342 0.5 0.7 0.3 
+0.85 0.7 0.3 0.5 0.66194 0.108658 0.85 0.66194 0.108658 
+0.5 0.553553 -0.0535534 0.85 0.553553 -0.0535534 0.5 0.391342 -0.16194 
+0.85 0.391342 -0.16194 0.5 0.2 -0.2 0.5 0.00865828 -0.16194 
+0.85 0.2 -0.2 0.85 0.00865828 -0.16194 0.5 -0.153553 -0.0535534 
+0.85 -0.153553 -0.0535534 0.5 -0.26194 0.108658 0.85 -0.26194 0.108658 
+0.5 -0.3 0.3 0.85 -0.3 0.3 0.5 -0.26194 0.491342 
+0.85 -0.26194 0.491342 0.5 -0.153553 0.653553 0.85 -0.153553 0.653553 
+0.5 0.00865828 0.76194 0.85 0.00865828 0.76194 0.5 0.2 0.8 
+0.85 0.2 0.8 0.5 0.391342 0.76194 0.85 0.391342 0.76194 
+0.5 0.553553 0.653553 0.85 0.553553 0.653553 0.5 0.66194 0.491342 
+0.85 0.66194 0.491342 0.5 0.7 0.3 0.85 0.7 0.3 
+0.5 0.66194 0.108658 0.85 0.66194 0.108658 0.5 0.553553 -0.0535534 
+0.85 0.553553 -0.0535534 0.5 0.391342 -0.16194 0.85 0.391342 -0.16194 
+
+POLYGONS 64 256
+3 0 1 2 
+3 4 35 34 
+3 34 3 4 
+3 5 37 36 
+3 0 2 6 
+3 7 38 35 
+3 35 4 7 
+3 5 39 37 
+3 0 6 8 
+3 9 40 38 
+3 38 7 9 
+3 5 41 39 
+3 0 8 10 
+3 11 42 40 
+3 40 9 11 
+3 5 43 41 
+3 0 10 12 
+3 13 44 42 
+3 42 11 13 
+3 5 45 43 
+3 0 12 14 
+3 15 46 44 
+3 44 13 15 
+3 5 47 45 
+3 0 14 16 
+3 17 48 46 
+3 46 15 17 
+3 5 49 47 
+3 0 16 18 
+3 19 50 48 
+3 48 17 19 
+3 5 51 49 
+3 0 18 20 
+3 21 52 50 
+3 50 19 21 
+3 5 53 51 
+3 0 20 22 
+3 23 54 52 
+3 52 21 23 
+3 5 55 53 
+3 0 22 24 
+3 25 56 54 
+3 54 23 25 
+3 5 57 55 
+3 0 24 26 
+3 27 58 56 
+3 56 25 27 
+3 5 59 57 
+3 0 26 28 
+3 29 60 58 
+3 58 27 29 
+3 5 61 59 
+3 0 28 30 
+3 31 62 60 
+3 60 29 31 
+3 5 63 61 
+3 0 30 32 
+3 33 64 62 
+3 62 31 33 
+3 5 65 63 
+3 0 32 1 
+3 3 34 64 
+3 64 33 3 
+3 5 36 65 
+
+POINT_DATA 66
+NORMALS Normals float
+-1 0 0 -1 0 0 -1 0 0 
+0 0.0661583 -0.997809 0 -0.320722 -0.947173 1 0 0 
+-1 0 0 0 -0.658776 -0.752339 -1 0 0 
+0 -0.896537 -0.442969 -1 0 0 0 -0.997809 -0.0661584 
+-1 0 0 0 -0.947173 0.320723 -1 0 0 
+0 -0.752338 0.658778 -1 0 0 0 -0.44297 0.896537 
+-1 0 0 0 -0.0661586 0.997809 -1 0 0 
+0 0.320723 0.947173 -1 0 0 0 0.658777 0.752338 
+-1 0 0 0 0.896536 0.44297 -1 0 0 
+0 0.997809 0.0661584 -1 0 0 0 0.947173 -0.320722 
+-1 0 0 0 0.752338 -0.658777 -1 0 0 
+0 0.442969 -0.896537 0 -0.0661586 -0.997809 0 -0.442969 -0.896537 
+1 0 0 1 0 0 0 -0.752338 -0.658777 
+1 0 0 0 -0.947173 -0.320722 1 0 0 
+0 -0.997809 0.0661584 1 0 0 0 -0.896536 0.44297 
+1 0 0 0 -0.658777 0.752338 1 0 0 
+0 -0.320723 0.947173 1 0 0 0 0.0661583 0.997809 
+1 0 0 0 0.44297 0.896536 1 0 0 
+0 0.752338 0.658777 1 0 0 0 0.947173 0.320723 
+1 0 0 0 0.997809 -0.0661584 1 0 0 
+0 0.896537 -0.442969 1 0 0 0 0.658777 -0.752338 
+1 0 0 0 0.320722 -0.947173 1 0 0 
+
+FIELD FieldData 1
+my_field 1 66 double
+1.19292 1.19292 1.20573 1.3179 1.62563 1.3179 1.21993 1.45051 1.15534 
+1.16035 1.13279 1.0751 1.15534 1.16035 1.21993 1.45051 1.20573 1.62563 
+1.19292 1.3179 1.0824 0.902456 1.00774 0.681662 0.967386 0.577466 0.954762 
+0.547018 0.967386 0.577466 1.00774 0.681662 1.0824 0.902456 1.19292 1.20573 
+1.3179 1.62563 1.21993 1.45051 1.15534 1.16035 1.13279 1.0751 1.15534 
+1.16035 1.21993 1.45051 1.20573 1.62563 1.19292 1.3179 1.0824 0.902456 
+1.00774 0.681662 0.967386 0.577466 0.954762 0.547018 0.967386 0.577466 1.00774 
+0.681662 1.0824 0.902456