diff --git a/data/examples/ArchDetail.FCStd b/data/examples/ArchDetail.FCStd index aedb76309..c388f54b5 100644 Binary files a/data/examples/ArchDetail.FCStd and b/data/examples/ArchDetail.FCStd differ diff --git a/src/Mod/Arch/ArchSectionPlane.py b/src/Mod/Arch/ArchSectionPlane.py index b59127d71..9b2ede35f 100644 --- a/src/Mod/Arch/ArchSectionPlane.py +++ b/src/Mod/Arch/ArchSectionPlane.py @@ -110,6 +110,10 @@ class _SectionPlane: if hasattr(obj.ViewObject,"DisplayLength"): l = obj.ViewObject.DisplayLength.Value h = obj.ViewObject.DisplayHeight.Value + elif hasattr(obj.ViewObject,"DisplaySize"): + # old objects + l = obj.ViewObject.DisplaySize.Value + h = obj.ViewObject.DisplaySize.Value else: l = 1 h = 1 @@ -213,6 +217,10 @@ class _ViewProviderSectionPlane: if hasattr(vobj,"DisplayLength"): ld = vobj.DisplayLength.Value/2 hd = vobj.DisplayHeight.Value/2 + elif hasattr(vobj,"DisplaySize"): + # old objects + ld = vobj.DisplaySize.Value/2 + hd = vobj.DisplaySize.Value/2 else: ld = 1 hd = 1 @@ -273,6 +281,9 @@ class _ArchDrawingView: self.onChanged(obj,"Source") if not hasattr(self,"svg"): return '' + if not hasattr(self,"direction"): + p = FreeCAD.Placement(obj.Source.Placement) + self.direction = p.Rotation.multVec(FreeCAD.Vector(0,0,1)) linewidth = obj.LineWidth/obj.Scale st = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch").GetFloat("CutLineThickness",2) da = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch").GetString("archHiddenPattern","30,10") diff --git a/src/Mod/Arch/ArchVRM.py b/src/Mod/Arch/ArchVRM.py index 7e0f9e2e8..27b1aba9a 100644 --- a/src/Mod/Arch/ArchVRM.py +++ b/src/Mod/Arch/ArchVRM.py @@ -274,6 +274,9 @@ class Renderer: def isInside(self,vert,face): "Returns True if the vert is inside the face in Z projection" + + if not face: + return False # http://paulbourke.net/geometry/insidepoly/ count = 0 @@ -298,6 +301,9 @@ class Renderer: face1 = self.flattenFace(face1) face2 = self.flattenFace(face2) + if (not face1) or (not face2): + return False + # first we check if one of the verts is inside the other face for v in face1[0].Vertexes: if self.isInside(v,face2):