Page 1 of 1
Translating a drawing
Posted: 08 Oct 2009, 11:26
by aby
Hi,
How can I translate a whole drawing to new coordinates.
I want to move every entity form one point to another.
Thanks
Aby
Re: Translating a drawing
Posted: 16 Oct 2009, 13:10
by support
Hello.
To translate the whole drawing to new coordinates you need:
1. Change coordinates of every entity.
2. Call TsgCADImage.GetExtents to recalculate new coordinates.
Alexander.
Re: Translating a drawing
Posted: 19 Oct 2009, 10:47
by aby
Hello.
To translate the whole drawing to new coordinates you need:
" 1. Change coordinates of every entity."
I was asking how am I going to change the coordinates of every entity.
The long way is to write a virtual method for every type of entity to translate to new coordinates,
and the price for thisparadigm is very high in terms of time.
The short way is,
I'm observing you are rotating the drawings as you wish.
Certainly you wouldn't supply a method for each entity to rotate, rather you should do it with matrix multiplication.
How can I do the same. I don't want not to rotate but to translate.
Thanks
Aby
Re: Translating a drawing
Posted: 19 Oct 2009, 11:31
by support
Hello aby.
Your question was about translating whole drawing to the new coordinates. Or you want to move picture on screen? When translating picture to new coordinates, you won't see any differences on screen after such manipulation. But rotation is only change of visible reflection - entities' coordinates won't change. If you want to change picture location onscreen, it is possible to use such method like rotation does.
Alexander.