Thank you very much for the detailed explanation Pat, we are now able to position and scale our VRML models (im working along with Andres who sent the question). Thank you also to you Utkarsh for the help. Just for the tip i finally downcasted to a vtkSMDoubleVectorProperty when calling GetProperty(&quot;Position&quot;) on the proxy.<br>
<br>Thanks again.<br><br><div class="gmail_quote">El 16 de julio de 2009 17:30, pat marion <span dir="ltr">&lt;<a href="mailto:pat.marion@kitware.com">pat.marion@kitware.com</a>&gt;</span> escribió:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
pqPipelineSource is a type of pqProxy, so you can call getProxy() on<br>
it to get a vtkSMProxy*.  From there you can access the properties<br>
that you are seeing in the GUI.  It looks like the transform filter<br>
has just one property, and it&#39;s a proxy property representing the<br>
actual transform (named Transform3 and described in utilities.xml).<br>
So you&#39;ll probably need to call GetProperty(&quot;Transform&quot;) and downcast<br>
the returned pointer to vtkSMProxyProperty.  From the<br>
vtkSMProxyProperty you can get another vtkSMProxy pointer, and this<br>
vtkSMProxy should have the actual Position, Translation, and Scale<br>
properties.<br>
<br>
After you modify properties you can call UpdateVTKObjects() on the<br>
vtkSMProxy, this is similar to clicking the Apply button.<br>
<br>
<a href="http://www.paraview.org/ParaView3/Doc/Nightly/html/classvtkSMProxy.html" target="_blank">http://www.paraview.org/ParaView3/Doc/Nightly/html/classvtkSMProxy.html</a><br>
<a href="http://www.paraview.org/ParaView3/Doc/Nightly/html/classvtkSMProperty.html" target="_blank">http://www.paraview.org/ParaView3/Doc/Nightly/html/classvtkSMProperty.html</a><br>
<br>
Pat<br>
<br>
<br>
2009/7/16 Andrés Felipe Padilla &lt;<a href="mailto:anfeken@gmail.com">anfeken@gmail.com</a>&gt;:<br>
<div><div></div><div class="h5">&gt; Thanks a lotUtkarsh, we can now load our model. We are trying now to create<br>
&gt; a transform filter for moving the model around. We are creating it the same<br>
&gt; way we create a source (with pqObjectBuilder) but we have not found a way to<br>
&gt; specify the transformation attributes (rotation, translation, scaling)<br>
&gt; without using the GUI. We have read the filters.xml and there are such<br>
&gt; propeties specifying those attributes. However, it is not clear how we can<br>
&gt; manipulate those attributes via pqObjectBuilder or via pqPipelineSource.<br>
&gt; Thanks.<br>
&gt;<br>
&gt; 2009/7/15 Utkarsh Ayachit &lt;<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; For some reason the proxy is named &quot;vrmlreader&quot; (all lowercase). Try<br>
&gt;&gt; using that name when calling createSource().<br>
&gt;&gt;<br>
&gt;&gt; If you run into such issues, you can always look at<br>
&gt;&gt; ParaView3Source/Servers/ServerManager/Resources/readers.xml to<br>
&gt;&gt; determine the name of the proxy for the reader you want to create.<br>
&gt;&gt;<br>
&gt;&gt; Utkarsh<br>
&gt;&gt;<br>
&gt;&gt; 2009/7/15 Andrés Felipe Padilla &lt;<a href="mailto:anfeken@gmail.com">anfeken@gmail.com</a>&gt;:<br>
&gt;&gt; &gt; We tried the following using the vtkVRMLSource<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; std::string file = &quot;/models/flag.wrl&quot;;<br>
&gt;&gt; &gt; leVRML = vtkVRMLSource::New();<br>
&gt;&gt; &gt; leVRML-&gt;SetFileName(file.c_str());<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; However, we do not know how to visualize the VRMLObject in the Active<br>
&gt;&gt; &gt; View.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; We tried the following using pqObjectBuilder:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;  pqPendingDisplayManager *pdm =<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; qobject_cast&lt;pqPendingDisplayManager*&gt;(pqApplicationCore::instance()-&gt;manager(&quot;PENDING_DI<br>
&gt;&gt; &gt; SPLAY_MANAGER&quot;));<br>
&gt;&gt; &gt; pdm-&gt;setAddSourceIgnored(true);<br>
&gt;&gt; &gt; leSource = builder-&gt;createSource(&quot;sources&quot;, &quot;VRMLSource&quot;, s);<br>
&gt;&gt; &gt; leSource-&gt;getProxy()-&gt;UpdateVTKObjects();<br>
&gt;&gt; &gt; pdm-&gt;setAddSourceIgnored(false);<br>
&gt;&gt; &gt; leSource-&gt;setModifiedState(pqProxy::UNMODIFIED);<br>
&gt;&gt; &gt; pqOutputPort* oPort = leSource-&gt;getOutputPort(0);<br>
&gt;&gt; &gt; builder-&gt;createDataRepresentation(oPort,<br>
&gt;&gt; &gt; pqActiveView::instance().current());<br>
&gt;&gt; &gt; (pqActiveView::instance().current())-&gt;render();<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; but VRMLSource does not exist, so this approach fails. We were trying to<br>
&gt;&gt; &gt; look if creating a proxy with the vtkVRMLSource would work but we<br>
&gt;&gt; &gt; haven&#39;t<br>
&gt;&gt; &gt; figure that out yet. Can this source be added via an XML or something<br>
&gt;&gt; &gt; (*throwing some ideas) so it can be used with the objectBuilder?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Thanks.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Andrés<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; 2009/7/15 Utkarsh Ayachit &lt;<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; What you described should work. Can you post relevant sections of the<br>
&gt;&gt; &gt;&gt; code?<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Utkarsh<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; 2009/7/15 Andrés Felipe Padilla &lt;<a href="mailto:anfeken@gmail.com">anfeken@gmail.com</a>&gt;:<br>
&gt;&gt; &gt;&gt; &gt; Thanks for your quick answer Utkarsh. However, we are trying to load<br>
&gt;&gt; &gt;&gt; &gt; a<br>
&gt;&gt; &gt;&gt; &gt; VRML<br>
&gt;&gt; &gt;&gt; &gt; file without having to use the menus. We are using vtkVRMLSource, but<br>
&gt;&gt; &gt;&gt; &gt; we<br>
&gt;&gt; &gt;&gt; &gt; don&#39;t know to visualize it. We are trying to use the pqObjectBuilder<br>
&gt;&gt; &gt;&gt; &gt; methods, createSource and createDataRepresentation, but it does not<br>
&gt;&gt; &gt;&gt; &gt; work<br>
&gt;&gt; &gt;&gt; &gt; with VRML files. Is there a way for loading and displaying the file<br>
&gt;&gt; &gt;&gt; &gt; without<br>
&gt;&gt; &gt;&gt; &gt; using the menus? Thanks a lot for your help.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; 2009/7/13 Utkarsh Ayachit &lt;<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; You can simply open a vrml file as if you are loading a data file<br>
&gt;&gt; &gt;&gt; &gt;&gt; using &quot;File |Open&quot;. ParaView will create the vtkVRMLSource for you.<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; vtkVRMLSource has methods like SetFileName that you use to set the<br>
&gt;&gt; &gt;&gt; &gt;&gt; filename programmatically and they are indeed public.<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; Utkarsh<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; 2009/7/13 Andrés Felipe Padilla &lt;<a href="mailto:anfeken@gmail.com">anfeken@gmail.com</a>&gt;:<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; Hi,<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; I&#39;ve been trying to load a VRML on ParaView unsucessfully from<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; code.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; From<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; the API and the code i see that the vtkVRMLSource could allow one<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; to<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; load a<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; VRML but i have some issues with it. I create a vtkVRMLSource with<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; the<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; New()<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; method but from there i cant see where to go. I cannot specify<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; this<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; object<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; the file i want to load as all its members are protected. So my<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; question<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; is<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; how do i tell the vtkVRMLSource to load my VRML?<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; Thanks<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; Visit other Kitware open-source projects at<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; Please keep messages on-topic and check the ParaView Wiki at:<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the ParaView Wiki at:<br>
&gt; <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
&gt;<br>
&gt;<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
</div></div></blockquote></div><br>