<div dir="ltr"><div>thanks alot for your great efforts,</div>
<div> </div>
<div>Please I have another question it's not a perfect traingle ,I want to create a mesh to be used in FEM any advice please</div>
<div> </div>
<div> </div>
<div>best regards <br><br></div>
<div class="gmail_quote">On Wed, Oct 7, 2009 at 9:59 PM, David Feng <span dir="ltr"><<a href="mailto:dfeng@cs.unc.edu">dfeng@cs.unc.edu</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">I haven't used the vtkUnstructuredGridVolumeRayCastMapper before, nor do I know anything about meshing.   I'm guessing that vtkUnstructuredGridVolumeRayCastMapper is trying to composite all of the scalars on the geometry points, and fails when there aren't any. <br>
It looks like you're trying to set the scalars with this code: 
<div class="im"><br>unstructuredReader->GetOutput()->GetPointData()->AddArray(arr);<br>unstructuredReader->GetOutput()->GetPointData()->SetActiveScalars("myarray");<br><br></div>I'd be careful with that.  Modifications to the output of a filter often get wiped out when the filter updates.  Better to make a copy of the output, if you have space:<br>
<br>copy = vtkUnstructuredGrid::New()<br>copy->DeepCopy(unstructuredReader->GetOutput());<br>copy->GetPointData()->SetScalars(arr);<br><br>But it seems like you really don't care about scalars defined at points, since you're just filling the scalar array with 1.0 everywhere.  If all you want is to see a surface, then render it using one of the standard geometry mappers.  The code would look something like this, in python:<br>
<br>-----------<br>sphereSource = vtk.vtkSphereSource()<br>delaunay = vtk.vtkDelaunay3D()<br>delaunay.SetInputConnection(sphereSource.GetOutputPort())<br><br>mapper = vtk.vtkDataSetMapper()<br>mapper.SetInputConnection(delaunay.GetOutputPort())<br>
<br>actor = vtk.vtkActor()<br>actor.SetMapper(mapper)<br><br>ren = vtk.vtkRenderer()<br>rwin = vtk.vtkRenderWindow()<br>iren = vtk.vtkRenderWindowInteractor()<br><br>ren.AddActor(actor)<br>rwin.AddRenderer(ren)<br>rwin.SetInteractor(iren)<br>
iren.Start()<br>-------------<br><br>I tested this out and it rendered a sphere.  It looks the same as the normal output from vtkSphereSource.  Again, I'm not familiar with what you're trying to do, but hopefully this was helpful.<br>
<br>David<br><br>Ali Habib wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div class="im">Dear All<br> I know it's for developing just , but I sent 6 times to vtk user forum , with no reply helped me , so I am not sure is this bug or not<br> best regards<br><br>---------- Forwarded message ----------<br>
</div>
<div class="im">From: *Ali Habib* <<a href="mailto:ali.mahmoud.habib@gmail.com" target="_blank">ali.mahmoud.habib@gmail.com</a> <mailto:<a href="mailto:ali.mahmoud.habib@gmail.com" target="_blank">ali.mahmoud.habib@gmail.com</a>>><br>
Date: Tue, Sep 29, 2009 at 9:47 PM<br>Subject: vtkUnstructuredGridVolumeRayCastMapper (05B22CB8): Can't use the ray cast mapper without scalars!<br></div>
<div class="im">To: <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a> <mailto:<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>><br><br><br>I wrote a code to make tetrahedral mesh on sphere , but it no give result except :<br>
 ERROR: In m:\dev\cur\vtkdotnet\branch\50\VolumeRendering\vtkUnstructuredGridVolumeRayCastMapper.cxx, line 274<br>vtkUnstructuredGridVolumeRayCastMapper (05B22CB8): Can't use the ray cast mapper without scalars!<br> every time I  run the code<br>
 attached is the c++ code , your fast reply is highly appretiated<br>  best regards<br><br></div>------------------------------------------------------------------------ 
<div class="im"><br><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>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br><br> <br></div></blockquote><br></blockquote>
</div><br></div>