Luis:
The problem remains that the bounding box retrieves the max/min x and y
based on the object's current orientation. In this crude pictogram, the
bounding box (shown as ......) is not at all the same shape or size as the
object (shown as * * * *) would be if rotated otherwise. As Frank says, I
believe "hacking" is in order.
............................
. * .
. * * .
. * * .
.* *
. * *
. * * .
..................*........
--
John Uhden, Cadlantic/formerly CADvantage
--> mailto:juhden@cadlantic.com
--> http://www.cadlantic.com
2 Village Road
Sea Girt, NJ 08750
Tel. 732-974-1711
FAX 732-528-1332
"Luis Esquivel" wrote in message
news:843D3ADDB21A96CD79E46D25E52B4CC4@in.WebX.maYIadrTaRb...
> Rob,
>
> Here is something that might help you (I don't know, I must have
something
> on this I will search on my functions, not sure)
>
> But in the meantime here is (just excuse my English and bad explanation I
> not a good teacher):
>
> To obtain what you are looking for you need to use the coordinates
> transformation formula
> in example: if you rotate the coordinate axis to a 15 degree angle
> counterclockwise your point
> (x,y) and the new coordinates
>
> (x', y') according to the rotated axis will be:
>
> x' = x * cos(A) + y * sin(A)
> y' = y * cos(A) - x * sin(A)
>
> Now, you need to take the first rotated point as reference to establish
the
> new
> minimum and maximum coordinates and compare with the following points.
> If a new point exists with an less x' than the previous point, then that
> must be
> the new minimum x, the same will be to find ymin', ymax', xmax'.
> Right after to compare all the points you will obtain all the coordinates
of
> the
> rectangle (boundingbox) corner rotated (xmin', ymin') and (xmax', ymax').
> The four corners coordinates respect to the rotated axis then will be:
>
> (xmin', ymin')
> (xmax', ymin')
> (xmax', ymax')
> (xmin', ymax')
>
> To transform this rotated coordinates respect to the normal coordinate
> system
> XY you must apply the following formula:
>
> x = x' * cos(A) - y' * sin(A)
> y = x' * sin(A) + y' * cos(A)
>
>
>