mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 14:41:25 +00:00
Fix #2374. Axis for walls should be in the 2D plan context.
This commit is contained in:
@@ -831,7 +831,7 @@ class DumbWallGenerator:
|
|||||||
|
|
||||||
|
|
||||||
def generate_axis(usecase_path, ifc_file, settings):
|
def generate_axis(usecase_path, ifc_file, settings):
|
||||||
axis_context = ifcopenshell.util.representation.get_context(ifc_file, "Model", "Axis", "GRAPH_VIEW")
|
axis_context = ifcopenshell.util.representation.get_context(ifc_file, "Plan", "Axis", "GRAPH_VIEW")
|
||||||
if not axis_context:
|
if not axis_context:
|
||||||
return
|
return
|
||||||
obj = settings["blender_object"]
|
obj = settings["blender_object"]
|
||||||
@@ -839,7 +839,7 @@ def generate_axis(usecase_path, ifc_file, settings):
|
|||||||
parametric = ifcopenshell.util.element.get_psets(product).get("EPset_Parametric")
|
parametric = ifcopenshell.util.element.get_psets(product).get("EPset_Parametric")
|
||||||
if not parametric or parametric["Engine"] != "BlenderBIM.DumbLayer2":
|
if not parametric or parametric["Engine"] != "BlenderBIM.DumbLayer2":
|
||||||
return
|
return
|
||||||
old_axis = ifcopenshell.util.representation.get_representation(product, "Model", "Axis", "GRAPH_VIEW")
|
old_axis = ifcopenshell.util.representation.get_representation(product, "Plan", "Axis", "GRAPH_VIEW")
|
||||||
if settings["context"].ContextType == "Model" and getattr(settings["context"], "ContextIdentifier") == "Body":
|
if settings["context"].ContextType == "Model" and getattr(settings["context"], "ContextIdentifier") == "Body":
|
||||||
if old_axis:
|
if old_axis:
|
||||||
blenderbim.core.geometry.remove_representation(tool.Ifc, tool.Geometry, obj=obj, representation=old_axis)
|
blenderbim.core.geometry.remove_representation(tool.Ifc, tool.Geometry, obj=obj, representation=old_axis)
|
||||||
|
|||||||
Reference in New Issue
Block a user