Boundary geom creation : fix math + small ui fix (#1938)

_Neo accidentally took the red pill so I transposed the matrix to make
it blue_

* Fix how placement matrix of updated geometry is created.
* Fix ui: was throwing an error when boundary had no
`RelatedBuildingElement`
This commit is contained in:
Cyril Waechter
2022-01-04 03:04:06 +01:00
committed by GitHub
parent 02a62a943c
commit d22a0c7cb8
2 changed files with 6 additions and 1 deletions
@@ -305,6 +305,7 @@ class UpdateBoundaryGeometry(bpy.types.Operator):
matrix[0].xyz = i
matrix[1].xyz = j
matrix[2].xyz = k
matrix.transpose()
matrix.translation = location
settings = {
@@ -145,6 +145,10 @@ class BIM_PT_SpaceBoundaries(Panel):
boundary_data = Data.boundaries[boundary_id]
building_element = self.ifc_file.by_id(boundary_data["RelatedBuildingElement"])
row = self.layout.row()
row.label(text=f"{boundary_id} > {building_element.is_a()}/{building_element.Name}", icon="GHOST_ENABLED")
if building_element:
bld_el_description = f"{building_element.is_a()}/{building_element.Name}"
else:
bld_el_description = None
row.label(text=f"{boundary_id} > {bld_el_description}", icon="GHOST_ENABLED")
op = row.operator("bim.load_boundary", text="", icon="RESTRICT_SELECT_OFF")
op.boundary_id = boundary_id