Change position of Hatch?

Change position of Hatch?

Anonymous
Not applicable
1,014 Views
3 Replies
Message 1 of 4

Change position of Hatch?

Anonymous
Not applicable

Hello Everyone,

I want to change the position of Hatch..Like setPosition in 'acdbBlockReference'

 

0 Likes
Accepted solutions (1)
1,015 Views
3 Replies
Replies (3)
Message 2 of 4

Alexander.Rivilis
Mentor
Mentor
Accepted solution

@Anonymous

What about next code:

AcGePoint3d p_old; // Old base boint
AcGePoint3d p_new; // New base boint
AcGeVector3d v = p_new - p_old;
AcGeMatrix3d mat; mat.setToTranslation(v);
pHatch->transformBy(mat);

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

0 Likes
Message 3 of 4

Anonymous
Not applicable

thank you sir for answering 

but how can i get the base point of any Hatch.

0 Likes
Message 4 of 4

Alexander.Rivilis
Mentor
Mentor

@Anonymous wrote:

thank you sir for answering 

but how can i get the base point of any Hatch.


There is no "base point" for any Hatch. But you can use (for example) minPoint of getGeomExtents of Hatch as a base point. If you want to change the "position of the Hatch" - you must understand what is the "position of hatch".

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

0 Likes