Fix #4162. Reduce minimum area requirement for auto space generation down to 0.1sqm.

This commit is contained in:
Dion Moult
2024-01-09 18:20:51 +11:00
parent 20e599ca05
commit 8ce2b4d2d7
+2 -2
View File
@@ -31,6 +31,7 @@ from math import pi
from mathutils import Vector, Matrix from mathutils import Vector, Matrix
from shapely import Polygon, MultiPolygon from shapely import Polygon, MultiPolygon
class Spatial(blenderbim.core.tool.Spatial): class Spatial(blenderbim.core.tool.Spatial):
@classmethod @classmethod
def can_contain(cls, structure_obj, element_obj): def can_contain(cls, structure_obj, element_obj):
@@ -411,8 +412,7 @@ class Spatial(blenderbim.core.tool.Spatial):
polys = cls.get_polygons(boundary_elements) polys = cls.get_polygons(boundary_elements)
converted_tolerance = cls.get_converted_tolerance(tolerance=0.03) converted_tolerance = cls.get_converted_tolerance(tolerance=0.03)
union = shapely.ops.unary_union(polys).buffer(converted_tolerance, cap_style=2, join_style=2) union = shapely.ops.unary_union(polys).buffer(converted_tolerance, cap_style=2, join_style=2)
union = cls.get_purged_inner_holes_poly(union_geom=union, min_area=cls.get_converted_tolerance(tolerance=3)) union = cls.get_purged_inner_holes_poly(union_geom=union, min_area=cls.get_converted_tolerance(tolerance=0.1))
return union return union
@classmethod @classmethod