[Arch] fix true north handling on IFC import and export
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user