Draft: Ability to set working plane from PartDesign datum planes
This commit is contained in:
@@ -385,6 +385,11 @@ class SelectPlane(DraftTool):
|
||||
self.display(plane.axis)
|
||||
self.finish()
|
||||
return
|
||||
elif sel.SubElementNames[0] == "Plane":
|
||||
plane.setFromPlacement(sel.Object.Placement,rebase=True)
|
||||
self.display(plane.axis)
|
||||
self.finish()
|
||||
return
|
||||
elif len(sel.SubElementNames) == 3:
|
||||
if ("Vertex" in sel.SubElementNames[0]) \
|
||||
and ("Vertex" in sel.SubElementNames[1]) \
|
||||
@@ -396,6 +401,13 @@ class SelectPlane(DraftTool):
|
||||
self.display(plane.axis)
|
||||
self.finish()
|
||||
return
|
||||
elif sel.Object.isDerivedFrom("Part::Feature"):
|
||||
if sel.Object.Shape:
|
||||
if len(sel.Object.Shape.Faces) == 1:
|
||||
plane.alignToFace(sel.Object.Shape.Faces[0], self.offset)
|
||||
self.display(plane.axis)
|
||||
self.finish()
|
||||
return
|
||||
elif sel:
|
||||
subs = []
|
||||
import Part
|
||||
|
||||
Reference in New Issue
Block a user