POV-Ray : Newsgroups : povray.beta-test : Round_Box #macro (in shapes.inc) and negative values : Re: Round_Box #macro (in shapes.inc) and negative values Server Time
29 Jul 2024 14:21:46 EDT (-0400)
  Re: Round_Box #macro (in shapes.inc) and negative values  
From: Christoph Hormann
Date: 21 Apr 2002 13:12:15
Message: <3CC2F2ED.855B72C5@gmx.de>
Fabien Mosen wrote:
> 
> Anders K. wrote:
> 
> > I've been meaning to report this problem forever. The other problem that I
> > had noticed with Round_Box is that if the radius is exactly half the length
> > of one of the edges, you get "Parse Error: Degenerate cylinder, base point =
> > apex point".

This could be caught in the macro, but if you really need it, you can
always write a wrapper macro for that yourself.  The problem would also be
what to do if the radius is even larger.  

> 
> Maybe it's time to fix an inconsistency between primitives.
> Here's how RC1 acts with zero-dimension volumes :
> 
> [...]
> 
> Of course, these are very specific cases, but they can easily
> happen in scenes with automatic object generation.  IMO, the
> best thing that POV-Ray should do is render anyway, with a
> warning, as it currently does with 'degenerate' triangles.

A warning for boxes with two identical points would be practicable, but i
don't see much use in that.  Cylinders with two identical points and
non-zero radius don't form a defined shape therefore the error is
inevitable (if radius is zero you could just render nothing, like the box,
but this is an even rarer situation).

If you have code automatically generating such objects you can always
catch those special situations yourself, just write a wrapper macro and
usage would not be much more difficult.

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 20 Apr. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.