comparison icqsol_compose_shapes.xml @ 0:1574fdcc16df draft default tip

Uploaded
author iuc
date Tue, 23 Aug 2016 14:59:12 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:1574fdcc16df
1 <?xml version='1.0' encoding='UTF-8'?>
2 <tool id="icqsol_compose_shapes" name="Compose shapes" version="@WRAPPER_VERSION@.0">
3 <description></description>
4 <macros>
5 <import>icqsol_macros.xml</import>
6 </macros>
7 <expand macro="requirements" />
8 <command>
9 <![CDATA[
10 python $__tool_directory__/icqsol_compose_shapes.py
11 --expression "$expression"
12 #for $i in $input_shapes:
13 --shape_dataset "${i.expression_var}" "${i.input_shape}" "${i.input_shape.ext}" "${i.input_shape.metadata.dataset_type}"
14 #end for
15 --output "$output"
16 --output_vtk_type $output_vtk_type
17 ]]>
18 </command>
19 <inputs>
20 <param name="expression" type="text" value="" label="Composition expression" help="Example: A + B - C * D"/>
21 <repeat name="input_shapes" title="Expression variable and shape" min="2">
22 <param name="expression_var" type="text" value="" label="Expression variable" help="The selected shape will be associated with this variable in the expression."/>
23 <param name="input_shape" type="data" format="plyascii,plybinary,vtkascii,vtkbinary" label="Shape">
24 <validator type="dataset_ok_validator" />
25 </param>
26 </repeat>
27 <expand macro="output_vtk_type_params" />
28 </inputs>
29 <outputs>
30 <data name="output" format="vtkascii">
31 <actions>
32 <action type="format">
33 <option type="from_param" name="output_vtk_type" />
34 </action>
35 </actions>
36 </data>
37 </outputs>
38 <tests>
39 <test>
40 <param name="expression" value="head + shaft - notch1 - notch2" />
41 <repeat name="input_shapes">
42 <param name="expression_var" value="head" />
43 <param name="input_shape" value="head.vtkascii" ftype="vtkascii" />
44 </repeat>
45 <repeat name="input_shapes">
46 <param name="expression_var" value="shaft" />
47 <param name="input_shape" value="shaft.vtkascii" ftype="vtkascii" />
48 </repeat>
49 <repeat name="input_shapes">
50 <param name="expression_var" value="notch1" />
51 <param name="input_shape" value="notch1.vtkascii" ftype="vtkascii" />
52 </repeat>
53 <repeat name="input_shapes">
54 <param name="expression_var" value="notch2" />
55 <param name="input_shape" value="notch2.vtkascii" ftype="vtkascii" />
56 </repeat>
57 <output name="output" file="philips_bolt.vtkascii" ftype="vtkascii" />
58 <param name="output_vtk_type" value="vtkascii" />
59 </test>
60 </tests>
61 <help>
62 **What it does**
63
64 Creates a shape composed of any number of selected shapes where the composition is based on a mathematical
65 expression consisting of **+**, **-** and ***** operations. The **+** results in a union of shapes, the
66 **-** operator removes a shape and the ***** operator results in an intersection of shapes.
67
68 For example, if the **Composition expression** is **A + B - C - D**, selecting 4 shapes from your history
69 and associating each shape with a variable from the expression will result in a shape composed of the shapes
70 associated with A and B, but eliminating the shapes associated with C and D.
71
72 </help>
73 <expand macro="citations" />
74 </tool>