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

TraceBoundary false versus true

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
dennis
1027 Views, 9 Replies

TraceBoundary false versus true

I took an idea from:

 

http://through-the-interface.typepad.com/through_the_interface/2010/06/creating-transparent-hatches-...

 

Where I run the TraceBoundary with the false option first to determine that the area is indeed closed to be able to generate the boundary.  Then I run with the true option to collect up the islands.

 

I was finding a lot of areas that would return zero objects when using the false option.  I tested the areas manually using the BPoly command, option off for detection of islands.  Same result.  Wouldn't generate.

 

But then I tested the same area, same zoom, etc, and found that if ran BPoly with Island Detection, as well if I ran TraceBoundary with the true option, the perimeter and islands were generated.

 

The main reason for running the TraceBoundary false option first is to determine whether the area is indeed closed. If it wasn't closed, with the true option, I would get a long, long, long, delay as it went thru highlighting pretty much everything in the drawing, eventually getting an error message. 

 

Can anyone shed some light on this?  Maybe a better way to determine ahead of time if the area is closed up so the boundary can be generated. 

 

 

 

 

 

asdfdf

9 REPLIES 9
Message 2 of 10
moogalm
in reply to: dennis

Can you please share non-confidential drawing sample to have test at my end, I couldn't recreate the behavior. When called with detectIslands set to false, the result contains only one entry, representing the outer boundary.

 

 

Message 3 of 10
dennis
in reply to: moogalm

Find an attached dwg with an example area.
If I do BPOLY without island detection, it doesn't work.
But, then do BPOLY with island detection and it does work.

The same findings show with TraceBoundary as well.

Thanks for any light you can shed on this.

Message 4 of 10
Alexander.Rivilis
in reply to: dennis

@dennis

As usual it is very desirable to clarify the version of AutoCAD in which you tested BPOLY.

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | 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 5 of 10
dennis
in reply to: Alexander.Rivilis

yes, of course, my bad Alexander.  I have tested in both AutoCAD 2016 and 2017

Message 6 of 10
moogalm
in reply to: dennis

BPOLY without island detection works only if picked point is enclosed in a closed area, there shouldn't be any gaps or at least a single loop should exist.

 

Can you show on which group of entities are your trying, I can create boundary on few and not others.

 

You can use screencast to demonstrate. 

 

 

Message 7 of 10
dennis
in reply to: moogalm

I am working specifically with the large area, not the smaller perimeter areas.

Message 8 of 10
Alexander.Rivilis
in reply to: dennis

BPOLY (and TraceBoundary also) is very "pick-point dependent":

 

Bad news: I think you have to write your own algorithm to determine the closed loops (or find other but not a TraceBoundary). I check all AutoCAD versions since 2008 to 2017 and all of them has this issue.

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

I agree with @Alexander.Rivilis, as he said , BPLOY is very pick point depended, when island detection is set false, I believe internal algorithm  check and hunts for neighborhood closed areas or something else not entirely sure how it works,  try picking point somewhere where nearest closed areas are not found in all directions or you can hideobjects and pick point anywhere in closed area.

 

as I shown in below video:

 

 

To explain it better please go through next demo video:

 

Message 10 of 10
dennis
in reply to: moogalm

Thanks Madhukar, that explanation is helpful.  At least, now I see a possible workaround...now to work out a logic for programming.

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report