POV-Ray : Newsgroups : povray.general : CSG troubles : Re: CSG troubles Server Time
30 Jul 2024 10:20:57 EDT (-0400)
  Re: CSG troubles  
From: clipka
Date: 8 Mar 2009 13:20:00
Message: <web.49b3fd7dda4bf64fa745f7570@news.povray.org>
The problem is that e.g. a window needs to both add *and* subtract something
from the object it is to be placed into. There is no CSG operation that can
achieve both at the same time.

What I'd do is make two macros per element: One that provides a shape to be cut
away using difference, and another one that provides a shape to be added using
union.

This is not perfectly OO-style of course, but then again, oo design patterns is
not something POV SDL ever claimed to be good at.

However, you might use a 2-element array to hold the two shapes. Maybe this gets
you closer to your preferred coding style.


Post a reply to this message

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