Skip to content
s-leger edited this page Mar 11, 2017 · 78 revisions

Welcome to the blenderPolygons wiki!

What does it do ?

Detect polygons from unordered splines (spaghettis) like in architectural 2d drawings within a single click. Fix precision issues filling small gaps between lines encountred when importing. Once detected, you are able to pick polygons with a select tool and extract curves from your selection.

Why ?

Cleaning dxf files or redrawing walls in worst cases is often a painfull task. This script does automagically fix most issues encountred in imported cad drawings, eg: not well formed lines, and allow you to simply select needed polygons to get a clean curve of polygons boundarys.

How does it do ?

Under the hood, i do write from scratch the cleaning code and intersection detection to handle precision and optimization issuees occuring on medium data sets using a spacial tree (adapted pyqtree). Polygonization is only a wrapper arround shapely as it is realy powerfull and quick.

Installation:

Install shapely
Setup the plugin as usual

Find it under view3d -> Tools -> Polgons

Usage:

1 Detection

Select one or many curves, choose extend value to fill gaps (ideally 1cm should be sufficient) keep it as lower as possible to prevent filling of unwanted areas.

Push "Detect" and wait a bit while processing.

detect

2 Selection

Under "Polygon"

  • Use "Select / union" to pick polygons and follow on screen instructions.
  • Use "all" to output all detected polygons.

Under "Lines"

  • Use "Select / union" to pick lines and follow on screen instructions.
  • Use "all" to output all non-intersecting detected lines.

select

3 Result

polygons

Report errors and general feedback:

Should you find an error or want to report success/issues ? Issues Tracker

Clone this wiki locally