<div dir="ltr"><div>Here a small example that i use:<br><br><br>      Field<Vector3D> dhField = (Field) this.getDisplayedData();<br>     <br>        DrillholeMesh dhMesh = dhField.getMesh();<br>        double[] curvilinearAbscissae = dhMesh.getCurvilinear();<br>        int nbFieldValues = dhField.getValues().length;<br>        Drillhole dh = dhField.getDrillhole();<br>          @SuppressWarnings("unchecked")<br>          FieldDh<Vector3D> field = dhField;<br>          if (field == null)<br>            return false;<br>          vtkPoints points = new vtkPoints();<br>          points.SetDataTypeToDouble();<br>          double[] pc = new double[3];<br>          double[] ps = new double[3];<br>          Vector3D[] values = field.getValues();<br>          if (values != null) {<br>            double sizeMaxField = aValue;<br>            vtkArrowSource arrow = new vtkArrowSource();<br>            arrow.SetTipRadius(0.1);<br>            arrow.SetTipLength(1.);<br>            arrow.SetShaftResolution(6);<br>            arrow.SetShaftRadius(0.03);*/<br>            vtkDoubleArray vector3DArray = new vtkDoubleArray();<br>            vector3DArray.SetNumberOfComponents(3);<br>            vector3DArray.SetName("Vector");<br>            for (int i = 0; i < nbFieldValues; i++) {<br>              Vector3D fieldValue = values[i];<br>              if (fieldValue != null && fieldValue != field.getNoValue()) {<br>                Point3D p = dh.getSurvey().getPoint(curvilinearAbscissae[i]);<br>                ps[0] = p.x;<br>                ps[1] = p.y;<br>                ps[2] = p.z;<br>                points.InsertNextPoint(ps);<br>                vector3DArray.InsertNextTuple3(fieldValue.getX(), fieldValue.getY(), fieldValue.getZ());<br>              }<br>            }<br>            vtkPolyData polyData = new vtkPolyData();<br>            polyData.SetPoints(points);<br>            polyData.GetPointData().SetVectors(vector3DArray);<br>            <br><br>            vector3DGlyph = new vtkGlyph3D();<br>            vector3DGlyph.SetVectorModeToUseVector();<br>            vector3DGlyph.OrientOn();<br>            vector3DGlyph.SetScaleFactor(sizeMaxField/2.);<br>            vector3DGlyph.SetScaleModeToDataScalingOff();<br>            vector3DGlyph.SetColorModeToColorByScalar();<br><br>            vector3DGlyph.SetSourceConnection(arrow.GetOutputPort());<br>            vector3DGlyph.SetInputData(polyData);<br>            vector3DGlyph.Update();<br><br><br></div>Hope it help you.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-08-15 18:21 GMT+02:00 Виталий Симаков <span dir="ltr"><<a href="mailto:simakov.w@gmail.com" target="_blank">simakov.w@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span id="m_8718865439033944692gmail-result_box" class="m_8718865439033944692gmail-" lang="en"><span>Hello.</span><br><span>Recently began to study the VTK.</span><br><span>Faced the following problem:</span><br><span class="m_8718865439033944692gmail-">It is necessary to draw vtkPlotLine3D and on it to represent vectors (Presumably vtkArrowSource).</span><br><span class="m_8718865439033944692gmail-">Someone did this?</span> <span>Examples did not help ... = (</span><br><span class="m_8718865439033944692gmail-">Thank you.</span></span></div>
<br>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>