Fixed ifc validation errors for generated openings #2925

This commit is contained in:
Andrej730
2023-04-03 19:44:37 +05:00
parent be75ef2596
commit 7842877ba0
2 changed files with 7 additions and 3 deletions
@@ -232,7 +232,9 @@ class FilledOpeningGenerator:
ifcopenshell.util.representation.resolve_representation(profile).Items[0],
magnitude=thickness / unit_scale,
position=Vector([0.0, -0.1 / unit_scale, 0.0]),
extrusion_vector=Vector([0.0, 1.0, 0.0]),
position_x_axis=Vector((1, 0, 0)),
position_z_axis=Vector((0, -1, 0)),
extrusion_vector=Vector((0, 0, -1)),
)
return shape_builder.get_representation(context, [extrusion])
@@ -69,10 +69,12 @@ def update_simple_openings(element, opening_width, opening_height):
context = ifcopenshell.util.representation.get_context(ifc_file, "Model", "Body", "MODEL_VIEW")
extrusion = shape_builder.extrude(
shape_builder.rectangle(size=Vector([opening_width, 0.0, opening_height])),
shape_builder.rectangle(size=Vector([opening_width, 0.0, opening_height]).xz),
magnitude=thickness / unit_scale,
position=Vector([0.0, -0.1 / unit_scale, 0.0]),
extrusion_vector=Vector([0.0, 1.0, 0.0]),
position_x_axis=V(1, 0, 0),
position_z_axis=V(0, -1, 0),
extrusion_vector=V(0, 0, -1),
)
new_representation = shape_builder.get_representation(context, extrusion)