[vtk-developers] Fwd: vtkArcSource vs vtkEllipseArcSource

João Luis joaolsvieira at gmail.com
Mon Aug 15 12:09:36 EDT 2016


Hello vtkusers,

I have VTK 7.0 and I am drawing an Arc against a plane surface. This Arc is
a representation of a Geometry(e.g. Plane). I have an algorithm that by
user information of Azimuth/Strike and Plunge/Dip returns a set of
vtkPoints. With these points, I am building a line using vtkLineSource to
represent my Plane/Arc as well as expected (attached pictures PlaneArc1 and
PlaneArc2) and worked smoothly.

Snapshot Code:
vtkSmartPointer<vtkPoints> PointViewGC = MyFunction(235/*Azimuth*/,
225/*Plunge*/);
vtkSmartPointer<vtkLineSource> lineDataGCO =
vtkSmartPointer<vtkLineSource>::New();
lineDataGCO->SetPoints(PointViewGC);

However, I am trying do the same with vtk ArcSource using the same set of
Points, but the result is not the correct.(Attached picture ArcSource1)
Snapshot Code:
vtkSmartPointer<vtkArcSource> arcSource = vtkSmartPointer<vtkArcSource>:
:New();
arcSource->SetAngle(225);
arcSource->SetResolution(40);
vtkIdType numPts = PointViewGC->GetNumberOfPoints()-1;
double point1[3]; PointViewGC->GetPoint(1,point1);
double point2[3]; PointViewGC->GetPoint(numPts, point2);
arcSource->SetPoint1(point1);
arcSource->SetPoint1(point2);
arcSource->NegativeOff();
arcSource->UseNormalAndAngleOn();

After some research I found out that VTK 7 doesn't released
vtkEllipseArcSource classes, then I decided download from (
https://github.com/Kitware/VTK). The point is there anybody knows what's
wrong in my code? If vtkArcSource could handle itself my goals to draw this
geometry? And/or if vtkEllipseArcSource could solve my problem to justify I
do again a compilation of VTK just to integrate this class?

Many thanks for any help.

Regards,

Luis.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20160815/b747ded4/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ArcSource1.png
Type: image/png
Size: 18753 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20160815/b747ded4/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PlaneArc1.png
Type: image/png
Size: 20637 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20160815/b747ded4/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PlaneArc2.png
Type: image/png
Size: 25041 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20160815/b747ded4/attachment-0005.png>


More information about the vtk-developers mailing list