Mercurial > repos > iuc > icqsol_create_shape
comparison icqsol_create_shape.xml @ 0:fe94052daa00 draft default tip
Uploaded
author | iuc |
---|---|
date | Tue, 23 Aug 2016 15:00:22 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:fe94052daa00 |
---|---|
1 <?xml version='1.0' encoding='UTF-8'?> | |
2 <tool id="icqsol_create_shape" name="Create shape" 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_create_shape.py | |
11 --create_process $create_process_cond.create_process | |
12 #if $create_process_cond.create_process == 'create': | |
13 --shape $create_process_cond.shape_cond.shape | |
14 #if $create_process_cond.shape_cond.shape == 'box': | |
15 @origin_cmd_args@ | |
16 @lengths_cmd_args@ | |
17 #else if $create_process_cond.shape_cond.shape == 'cone': | |
18 @radius_cmd_args@ | |
19 @origin_cmd_args@ | |
20 @lengths_cmd_args@ | |
21 @n_theta_cmd_args@ | |
22 #else if $create_process_cond.shape_cond.shape == 'cylinder': | |
23 @radius_cmd_args@ | |
24 @origin_cmd_args@ | |
25 @lengths_cmd_args@ | |
26 @n_theta_cmd_args@ | |
27 #else if $create_process_cond.shape_cond.shape == 'sphere': | |
28 @radius_cmd_args@ | |
29 @origin_cmd_args@ | |
30 @n_theta_cmd_args@ | |
31 @n_phi_cmd_args@ | |
32 #end if | |
33 --output_vtk_type $create_process_cond.output_vtk_type | |
34 --output "$output_create" | |
35 #else: | |
36 --shape_input "$create_process_cond.shape_input" | |
37 --rotate $create_process_cond.rotate_cond.rotate | |
38 #if $create_process_cond.rotate_cond.rotate == 'yes': | |
39 --rotation_axis_x $create_process_cond.rotate_cond.rotation_axis_x | |
40 --rotation_axis_y $create_process_cond.rotate_cond.rotation_axis_y | |
41 --rotation_axis_z $create_process_cond.rotate_cond.rotation_axis_z | |
42 --rotation_degree $create_process_cond.rotate_cond.rotation_degree | |
43 #end if | |
44 #if $create_process_cond.translate_cond.translate == 'yes': | |
45 --translate $create_process_cond.translate_cond.translate | |
46 --origin_x $create_process_cond.translate_cond.translate_origin_x | |
47 --origin_y $create_process_cond.translate_cond.translate_origin_y | |
48 --origin_z $create_process_cond.translate_cond.translate_origin_z | |
49 #end if | |
50 --output_vtk_type $create_process_cond.shape_input.ext | |
51 --output "$output_clone" | |
52 #end if | |
53 ]]> | |
54 </command> | |
55 <inputs> | |
56 <conditional name="create_process_cond"> | |
57 <param name="create_process" type="select" label="Create or clone?" help="Create a new shape or clone a shape in your history."> | |
58 <option value="create" selected="True">Create a shape</option> | |
59 <option value="clone">Clone a shape in your history</option> | |
60 </param> | |
61 <when value="create"> | |
62 <conditional name="shape_cond"> | |
63 <param name="shape" type="select" label="Select shape"> | |
64 <option value="box" selected="True">Box</option> | |
65 <option value="cone">Cone</option> | |
66 <option value="cylinder">Cylinder</option> | |
67 <option value="sphere">Sphere</option> | |
68 </param> | |
69 <when value="box"> | |
70 <expand macro="origin_params" /> | |
71 <expand macro="lengths_exclude_min_params" /> | |
72 </when> | |
73 <when value="cone"> | |
74 <expand macro="radius_params" /> | |
75 <expand macro="origin_params" /> | |
76 <expand macro="lengths_params" /> | |
77 <expand macro="n_theta_params" /> | |
78 </when> | |
79 <when value="cylinder"> | |
80 <expand macro="radius_params" /> | |
81 <expand macro="origin_params" /> | |
82 <expand macro="lengths_params" /> | |
83 <expand macro="n_theta_params" /> | |
84 </when> | |
85 <when value="sphere"> | |
86 <expand macro="radius_params" /> | |
87 <expand macro="origin_params" /> | |
88 <expand macro="n_theta_params" /> | |
89 <expand macro="n_phi_params" /> | |
90 </when> | |
91 </conditional> | |
92 <expand macro="output_vtk_type_params" /> | |
93 </when> | |
94 <when value="clone"> | |
95 <param name="shape_input" type="data" format="plyascii,plybinary,vtkascii,vtkbinary" label="Shape to clone" help="Select shape for cloning."> | |
96 <validator type="dataset_ok_validator" /> | |
97 </param> | |
98 <conditional name="rotate_cond"> | |
99 <param name="rotate" type="select" label="Rotate cloned shape?"> | |
100 <option value="no" selected="True">No</option> | |
101 <option value="yes">Yes</option> | |
102 </param> | |
103 <when value="no"/> | |
104 <when value="yes"> | |
105 <param name="rotation_axis_x" type="float" value="0.0" label="X coordinate of rotation axis" help="Floating point number"/> | |
106 <param name="rotation_axis_y" type="float" value="0.0" label="Y coordinate of rotation axis" help="Floating point number"/> | |
107 <param name="rotation_axis_z" type="float" value="0.0" label="Z coordinate of rotation axis" help="Floating point number"/> | |
108 <param name="rotation_degree" type="float" value="0.0" label="Degree of rotation" help="Floating point number"/> | |
109 </when> | |
110 </conditional> | |
111 <conditional name="translate_cond"> | |
112 <param name="translate" type="select" label="Translate cloned shape?"> | |
113 <option value="no" selected="True">No</option> | |
114 <option value="yes">Yes</option> | |
115 </param> | |
116 <when value="no"/> | |
117 <when value="yes"> | |
118 <param name="translate_origin_x" type="float" value="0.0" label="X coordinate of new origin" help="Floating point number"/> | |
119 <param name="translate_origin_y" type="float" value="0.0" label="Y coordinate of new origin" help="Floating point number"/> | |
120 <param name="translate_origin_z" type="float" value="0.0" label="Z coordinate of new origin" help="Floating point number"/> | |
121 </when> | |
122 </conditional> | |
123 </when> | |
124 </conditional> | |
125 </inputs> | |
126 <outputs> | |
127 <data name="output_create" format="vtkascii" label="${tool.name} ${on_string}: ${create_process_cond.shape_cond.shape}"> | |
128 <filter>create_process_cond['create_process'] == "create"</filter> | |
129 <actions> | |
130 <action type="format"> | |
131 <option type="from_param" name="create_process_cond.output_vtk_type" /> | |
132 </action> | |
133 </actions> | |
134 </data> | |
135 <data name="output_clone" format_source="shape_input" label="${tool.name}: Cloned ${on_string}"> | |
136 <filter>create_process_cond['create_process'] == "clone"</filter> | |
137 </data> | |
138 </outputs> | |
139 <tests> | |
140 <test> | |
141 <param name="shape" value="cone" /> | |
142 <param name="radius" value="0.25" /> | |
143 <param name="origin_x" value="-0.06" /> | |
144 <param name="length_x" value="0.14" /> | |
145 <param name="output_vtk_type" value="vtkascii" /> | |
146 <output name="output" file="head.vtkascii" /> | |
147 </test> | |
148 <test> | |
149 <param name="shape" value="box" /> | |
150 <param name="origin_x" value="-0.06" /> | |
151 <param name="origin_y" value="-0.015" /> | |
152 <param name="origin_z" value="-0.15" /> | |
153 <param name="length_x" value="0.03" /> | |
154 <param name="length_y" value="0.03" /> | |
155 <param name="length_z" value="0.30" /> | |
156 <param name="output_vtk_type" value="vtkascii" /> | |
157 <output name="output" file="notch1.vtkascii" /> | |
158 </test> | |
159 <test> | |
160 <param name="shape" value="cylinder" /> | |
161 <param name="radius" value="0.1" /> | |
162 <param name="origin_x" value="0.0" /> | |
163 <param name="origin_y" value="0.0" /> | |
164 <param name="origin_z" value="0.0" /> | |
165 <param name="length_x" value="1.0" /> | |
166 <param name="length_y" value="0.0" /> | |
167 <param name="length_z" value="0.0" /> | |
168 <param name="n_theta" value="16" /> | |
169 <param name="output_vtk_type" value="vtkascii" /> | |
170 <output name="output" file="shaft.vtkascii" /> | |
171 </test> | |
172 <test> | |
173 <param name="create_process" value="clone" /> | |
174 <param name="shape_input" value="notch1.vtkascii" ftype="vtkascii" /> | |
175 <param name="rotate" value="yes" /> | |
176 <param name="rotation_axis_x" value="1.0" /> | |
177 <param name="rotation_degree" value="90.0" /> | |
178 <output name="output" file="notch2.vtkascii" ftype="vtkascii" /> | |
179 </test> | |
180 </tests> | |
181 <help> | |
182 **What it does** | |
183 | |
184 **Create a shape** - creates a selected primitive shape where shapes are Box, Cone, Cylinder and Sphere. | |
185 | |
186 * **Origin X,Y,Z** - Origin coordinate for all shapes. | |
187 * **Lengths X,Y,Z** - Edge lengths for Box, Cone and Cylinder. | |
188 * **Radius** - Radius length for Cone, Cylinder and Sphere. | |
189 * **Number of slices** - Controls the tessellation along the longitude direction for all shapes. | |
190 * **Number of stacks** - Controls the tessellation along the latitude direction for all shapes. | |
191 * **Output format and file type** - Choose the output format **ply** or **vtk** and file type **ascii** or **binary**. | |
192 | |
193 ----- | |
194 | |
195 **Clone a shape from your history** - creates a new copy of a shape selected from your history. | |
196 | |
197 * **Shape to clone** - Shape selected from your history for cloning. | |
198 * **Rotate cloned shape?** - Enables rotation of the cloned shape around a defined axis. | |
199 * **Rotation axis X,Y,Z** - The axis of rotation for the cloned shape. | |
200 * **Degree of rotation** - The degree of rotation around the axis. | |
201 * **Translate cloned shape?** - Enables resetting the origin of the cloned shape, moving the shape. | |
202 * **New origin X,Y,Z** - Translated origin of cloned shape. | |
203 | |
204 </help> | |
205 <expand macro="citations" /> | |
206 </tool> |