<HTML>
<HEAD>
<TITLE>SplineWidget</TITLE>
</HEAD>
<BODY>
<FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hello,<BR>
I’ve been trying to wrap my head around vtkSplineWidget the last couple of days. Basically I’d like to project the spline to<BR>
an arbitrarily oriented plane, which is associated with a vtkImplicitPlaneWidget...I ran into a couple of issues:<BR>
<BR>
1) To use vtkSplineWidget::SetNormalProjectionToOblique() requires a vtkPlaneSource...I couldn’t find another route other than to create a vtkPlaneSource and continually update the normal and origin<BR>
with the normal and origin from my vtkImplicitPlaneWidget. Seems like overkill...<BR>
<BR>
2) The ProjectToPlane method didn’t keep the spline on the plane when the normal’s x or y component went < 0. I figured there was a calculation in Wigdets that wasn’t handling these cases after an arccos or cos (for dot product) calculation<BR>
but I couldn’t track it down.<BR>
<BR>
3) PlaceWidget(bounds) had some strange behaviors based on what the state of ProjectToPlaneOff or ProjectToPlaneOn and if the projection was to be set to an arbitrary plane or not. <BR>
For instance, if projection was on and the plane is arbitrary, the PlaceWidget(bounds) call didn’t put the spline on the polydata only in the same plane. However if it was set to an orthoganal plane,<BR>
PlaceWidget(bounds) would place it correctly....<BR>
On the other hand, if projection is on and the plane is arbitrary, manipulation of the implicitplanewidget would properly move the spline, keeping it locked in the correct plane(just not mapped onto the finite rep of the plane)<BR>
BUT the spline doesn’t resize with the plane...However switching to orthoganal plane projection would resize the spline correctly but the problem mentioned above in 2) occurs...<BR>
<BR>
I was able to get around the second problem by modifying the ProjectPointsToPlane method to a more general formula, basically calculate the offset(positive or negative) of each handle point from the plane, then move<BR>
the point along the normal by the offset. This keeps the points in the plane at all times no matter what type of projection is selected. However, the line itself doesn’t update until one of the handles is moved.<BR>
I made some other changes to PlaceWidget(bounds) to get around this but I’ve hacked at VTK source enough now to get things working for me, I wanted to ask someone if I’m doing things in correctly. Is there an easier way to set this up?<BR>
<BR>
Any advice/help would be greatly appreciated!<BR>
Gerrick<BR>
<BR>
<BR>
</SPAN></FONT></FONT>
</BODY>
</HTML>