|
|
macro 'Distance_Marker' called with arguments: <4.0, 5.2, -2.0>, <4.0, 5.2,
-1034944979750668300.0>, 0.0313
Possible Parse Error: Degenerate cone/cylinder.
Fatal error in parser: Uncategorized error.
Render failed
This appears to be triggered by:
object {Distance_Marker(Middle12D, vtransform (Middle12D, transform {translate
-Normal12D*CS_Radius}), Line_radius) texture {SolidGreen}}
Referring to the arguments passed to the Distance_Marker macro, it doesn't
appear that a cylinder is degenerate (start and end points the same) but that
the capping cones at the cylinder endpoints are the problem. I'm guessing that
the -1034944979750668300.0 number is about as big as it's allowed to get, and
then _starting_ a cone there and trying make it extend _beyond_ that doesn't
work - thereby throwing a "degenerate cone" error.
I've read some threads about wanting to ignore zero-thickness cylinders, and can
appreciate the orientation problem - but that can be overridden with an
orientation vector - just like the disc object uses - as a failsafe. Yes?
I really didn't expect to run into "infinite" length cylinders leaving no room
to extend off of (if indeed that's what the problem really is).
Does anyone have any failsafe / error checking / sanity checks to code into the
works so that I can get this to render without hiccups?
Post a reply to this message
|
|
|
|
>
> macro 'Distance_Marker' called with arguments: <4.0, 5.2, -2.0>, <4.0, 5.2,
> -1034944979750668300.0>, 0.0313
> Possible Parse Error: Degenerate cone/cylinder.
> Fatal error in parser: Uncategorized error.
> Render failed
>
> This appears to be triggered by:
>
> object {Distance_Marker(Middle12D, vtransform (Middle12D, transform {translate
> -Normal12D*CS_Radius}), Line_radius) texture {SolidGreen}}
>
> Referring to the arguments passed to the Distance_Marker macro, it doesn't
> appear that a cylinder is degenerate (start and end points the same) but that
> the capping cones at the cylinder endpoints are the problem. I'm guessing that
> the -1034944979750668300.0 number is about as big as it's allowed to get, and
> then _starting_ a cone there and trying make it extend _beyond_ that doesn't
> work - thereby throwing a "degenerate cone" error.
>
> I've read some threads about wanting to ignore zero-thickness cylinders, and can
> appreciate the orientation problem - but that can be overridden with an
> orientation vector - just like the disc object uses - as a failsafe. Yes?
No.
Cylinder/cone and disc are totaly different entities.
The cylinder and cones are solids, finite primitives.
A disc is a bounded subset of the plane primitive whitch is infinite. It
have the same inside as the plane sharing it's center point and normal.
As a test, run this:
plane{<0,1,-0.1>,0 pigment{rgb 1}}//a slightly tilted ground plane
disc{<0,3,5>, <1,0,-0.001>, 1 pigment{rgb<1,0,0>}}
//a disk seen almost on edge
fog{distance 10 rgb 0}
light_source{<0,100,0> rgb 1}
//using the default camera
The fog will not show on the left of the image.
Now, replace the disc with:
cylinder{<-0.1,0,0><0.1,0,0>,1 scale <0.001,1,1>
pigment{rgb<0,1,0>}rotate 0.1*y}
The fog will show everywhere.
>
> I really didn't expect to run into "infinite" length cylinders leaving no room
> to extend off of (if indeed that's what the problem really is).
>
> Does anyone have any failsafe / error checking / sanity checks to code into the
> works so that I can get this to render without hiccups?
>
>
The value -1.0349449797506683*10^18, or 1.0349449797506683*10^18 is just
to damn huge!
Such large values cause major loss of precision.
Workaround #1
Always keep your coordinates values in the -1000000 to 1000000 range
unless absolutely needed. In this case, don't use values within -1 to 1.
In your case, divide your large value by 10^13 and replace the two other
values by zero.
Suggested arguments:
<4.0, 5.2, -2.0>, <0, 0,-10000>, 0.0313
The difference in location will by largely sub-pixel.
Workaround #2
Test if the end point have any coordinate larger than 1000000 and not
place the end cone in that case.
Alain
Post a reply to this message
|
|