From 13cc6a8d220c0d61b38eafd6168c492a7ce5811c Mon Sep 17 00:00:00 2001 From: tritao Date: Sat, 11 Jan 2025 22:29:36 +0000 Subject: [PATCH] BIM: Only import `TechDraw` when its actually needed. Allows FreeCAD BIM module to load without TechDraw module compiled. --- src/Mod/BIM/ArchComponent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/BIM/ArchComponent.py b/src/Mod/BIM/ArchComponent.py index 89e79ba173..6a4927ef12 100644 --- a/src/Mod/BIM/ArchComponent.py +++ b/src/Mod/BIM/ArchComponent.py @@ -986,7 +986,6 @@ class Component(ArchIFC.IfcProduct): return import Part - import TechDraw import DraftGeomUtils fmax = params.get_param_arch("MaxComputeAreas") @@ -1022,6 +1021,7 @@ class Component(ArchIFC.IfcProduct): pset = [] for f in fset: try: + import TechDraw pf = Part.Face(DraftGeomUtils.findWires(TechDraw.project(f,FreeCAD.Vector(0,0,1))[0].Edges)) except Part.OCCError: # error in computing the areas. Better set them to zero than show a wrong value