Skip to content

Commit

Permalink
Draft: Refined Select plane to accept any 3 selected vertices
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Jul 8, 2017
1 parent ad2a4b5 commit d31be31
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Mod/Draft/DraftTools.py
Expand Up @@ -381,6 +381,21 @@ def Activated(self):
self.display(plane.axis)
self.finish()
return
elif sel:
subs = []
import Part
for s in sel:
for so in s.SubObjects:
if isinstance(so,Part.Vertex):
subs.append(so)
if len(subs) == 3:
plane.alignTo3Points(subs[0].Point,
subs[1].Point,
subs[2].Point,
self.offset)
self.display(plane.axis)
self.finish()
return
self.ui.selectPlaneUi()
msg(translate("draft", "Pick a face to define the drawing plane\n"))
if plane.alignToSelection(self.offset):
Expand Down

0 comments on commit d31be31

Please sign in to comment.