|  |  | Having some trouble getting my prism to work.
Can anyone catch where the bug is?
 #local _Spline = dimension_size (ToothPrismArray, 1)-1;
 #debug concat ( "_Points = 0-", str (_Point, 3, 0),  " points \n")
 #debug concat ( "_Spline has 0-", str (_Spline, 3, 0),  " elements \n")
 #local _Tooth = prism {
  cubic_spline
  0, 0.1, _Spline
  #for (SplinePoint, 0, _Spline)
   #debug concat ( "[", str (SplinePoint, 3, 0),  "] = ",  vstr(2,
ToothPrismArray[SplinePoint], ", ", 3, 0),"\n")
   ToothPrismArray [SplinePoint],
  #end
 }
_Points = 0-288 points
_Spline has 0-288 elements
[  0] =  14,  14
[  1] =  14,  -0     <---------- this
[  2] =  15,  -0
....
[286] =  15,   0
[287] =  14,  -0   <---------- DOES match this
[288] =  14, -14
line 190: Possible Parse Error: Too few points in prism.
Fatal error in parser: Uncategorized error.
Render failed
From the docs:
"Likewise, cubic splines need both the first and last points to be control
points, therefore, to close a shape made with a cubic spline, we must match the
second point to the second from last point. If we do not match the correct
points on a quadratic or cubic shape, that is when we will get the too few
points in prism error. POV-Ray is still waiting for us to close the shape, and
when it runs out of points without seeing the closure, an error is issued."
Post a reply to this message
 |  |