Find 'empty' sector outlines

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Apeirogon
Posts: 1606
Joined: Mon Jun 12, 2017 12:57 am

Find 'empty' sector outlines

Post by Apeirogon »

I have function that collect one sided map lines and then sort them into a groups of closed outline aka group of lines that 'draw' closed polygon.
It works, but it also create groups of 'empty' sectors.
On the example of a picture
new.jpg
it filter lines in three groups, rectangle, square and weird shape respectively.

Problem here, I dont need that square and shape for future processing, only a rectangle. How find out that group of lines is an 'empty' space and delete them?

Picture is only an example, 'real life' maps have more complex geometry.
Post Reply

Return to “Scripting”