mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-02 21:12:07 +00:00
Fix #4162. Reduce minimum area requirement for auto space generation down to 0.1sqm.
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user