.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Line intersect with block

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
ditran
2422 Views, 3 Replies

Line intersect with block

Hi All,

I find the intersected point of Line and block as this code:

'bref is a block reference
Dim tmpLine As New Line(pt1, bref.Position)
Dim ptCol As New Point3dCollection
bref.IntersectWith(tmpLine, Intersect.OnBothOperands, ptCol, 0, 0) 
Dim acLine As New Line(pt1,ptCol(0))

 But the intersected point is not located on block as picture below. I don't know what happen.

Thank you for any help.

3 REPLIES 3
Message 2 of 4
Alexander.Rivilis
in reply to: ditran

It is look like you found intersect point which on bounding box of block reference:

Intersecting any entity with a BlockReference and retrieving the intersection points

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | 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

Message 3 of 4
ditran
in reply to: ditran

I found the intersecting point of line and bounding box of block reference. Can you help me with VB.net code.

 

Thanks,

Message 4 of 4
Alexander.Rivilis
in reply to: ditran

Easiest way is explode BlockRerence (method BlockReference.Explode but without adding entities to Database) and then intersect your's line with every entity in collection of exploded entities (maybe recursive if entity in collection is also BlockReference).

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | 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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost