From 98af9aabd9e6f6f84840288fd62ccbcad6a1b5ce Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Wed, 25 Jul 2018 20:25:11 -0300 Subject: [PATCH] Draft: Snap to BuildingPart base points --- src/Mod/Draft/DraftSnap.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Mod/Draft/DraftSnap.py b/src/Mod/Draft/DraftSnap.py index c048c5e815..cc16e647c1 100644 --- a/src/Mod/Draft/DraftSnap.py +++ b/src/Mod/Draft/DraftSnap.py @@ -303,7 +303,10 @@ class Snapper: if Draft.getType(obj) == "Polygon": # special snapping for polygons: add the center snaps.extend(self.snapToPolygon(obj)) - + elif Draft.getType(obj) == "BuildingPart": + # special snapping for Arch building parts: add the location + snaps.append([obj.Placement.Base,'endpoint',self.toWP(obj.Pacement.Base)]) + if (not self.maxEdges) or (len(shape.Edges) <= self.maxEdges): if "Edge" in comp: # we are snapping to an edge