mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-05 23:41:44 +00:00
* Bonsai: place auto-generated opening boundaries at their real position #8237 auto_generate_boundaries (single-space mode) built each opening/filling boundary from the opening's LOCAL geometry (get_vertices) but first did mat.translation = (0, 0, 0) on its placement matrix. Because the vertices are local, that placement translation is exactly what carries the opening to its real location, so zeroing it collapsed every window/door boundary onto the origin. This is why the auto path misplaced window boundaries while the single-element path (create_element_boundary) placed them correctly, as @MDHering observed with the two modes. Keep the full placement matrix. Verified on the reporter's file: the opening's real placement is (0.1, 1.5, 1.0); a vertex went from (0.6, 0, 0) under the old code to (0.7, 1.5, 1.0) with the fix, i.e. moved by exactly the (0.1, 1.5, 1.0) that was being discarded. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Remove superfluous comment from #8237 fix --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: CyrilWaechter <cyril@biminsight.ch>
This commit is contained in:
@@ -843,7 +843,6 @@ class AddBoundary(bpy.types.Operator, tool.Ifc.Operator):
|
||||
settings = ifcopenshell.geom.settings()
|
||||
shape = ifcopenshell.geom.create_shape(settings, opening)
|
||||
mat = Matrix(ifcopenshell.util.shape.get_shape_matrix(shape))
|
||||
mat.translation = (0, 0, 0)
|
||||
opening_bm = bmesh.new()
|
||||
verts = ifcopenshell.util.shape.get_vertices(shape.geometry)
|
||||
for vert in verts:
|
||||
|
||||
Reference in New Issue
Block a user