POV-Ray : Newsgroups : povray.general : union of door and handle pushes item off z axis : Re: union of door and handle pushes item off z axis Server Time
30 Jul 2024 06:21:36 EDT (-0400)
  Re: union of door and handle pushes item off z axis  
From: Alain
Date: 24 Aug 2009 13:53:04
Message: <4a92d380$1@news.povray.org>

> Hi,
> When I open the door of cabinet, say 45o, the cabinet is pushed back along z
> axis. If the door is closed, zero rotation, problem disappears. So it has to do
> something with rotations inside a union of 5-6 objects.
> I guess the object order or rotation placement is wrong in the Union.
> I couldn't figure out the solution, if someone was kind enough to offer some
> help, I will appreciate it very much. Thanks a lot.
> 
> Why is the cabinet on the right is pushed back when its door is opened?
> 
> sample is at http://www.kitchendesigned.com/download/handle.zip
> 
> Ibrahim Dogan
> 
> 
> 
> 

It realy look like a bad grouping of the union's components.

The door's rotation should ONLY affect the door itself and any element 
that are ON the door.
You need to use nested unions.
Your union *should* look like:

union{// First, the "static" objects
	object {Cabinet rotate Some_Rotation translate Some_position}
	union {// then the door and components.
		object{Door}
		object{Door_handle}//things that must moove with the door
		onject{Door_Decorations}
		rotate Door_opening translate Door_Location
		}
	}

Note: The door and it's handle and decoration can be defines as a 
complete object:
#declare Door_Complete = 
union{object{Door}object{Handle}object{Decorations}}

It's best to declare the door with the AXIS of it's hinges along the Y 
axis. It will be much easier to place it.


Alain


Post a reply to this message

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