karl- / pb_CSG

A C# port of CSG.js by Evan W (http://evanw.github.io/csg.js/).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Polygon multiplication bug in Node.AllPolygons()

goitrodos opened this issue · comments

Calling Node.AllPolygons will multiplicate the polygons drastically due to:

List<Polygon> list = polygons;

This breaks the initial data structure due to not copying the data to a new list. The correct code should be:

List<Polygon> list = new List<Polygon>(polygons);