[Arch] fix true north handling on IFC import and export

This commit is contained in:
hlg
2020-01-09 19:46:54 +01:00
committed by Yorik van Havre
parent ce2441c0b2
commit feaf9b24dc
2 changed files with 6 additions and 5 deletions

View File

@@ -224,8 +224,8 @@ def export(exportList,filename,colors=None,preferences=None):
objectslist = [obj for obj in objectslist if obj != contextCreator.project_object]
if Draft.getObjectsOfType(objectslist, "Site"): # we assume one site and one representation context only
trueNorthX = math.tan(-Draft.getObjectsOfType(objectslist, "Site")[0].Declination.getValueAs(FreeCAD.Units.Radian))
contextCreator.model_context.TrueNorth.DirectionRatios = (trueNorthX, 1.)
decl = Draft.getObjectsOfType(objectslist, "Site")[0].Declination.getValueAs(FreeCAD.Units.Radian)
contextCreator.model_context.TrueNorth.DirectionRatios = (math.cos(decl+math.pi/2), math.sin(decl+math.pi/2))
products = {} # { Name: IfcEntity, ... }
subproducts = {} # { Name: IfcEntity, ... } for storing additions/subtractions and other types of subcomponents of a product