Merge branch 'master' of ssh://free-cad.git.sourceforge.net/gitroot/free-cad/free-cad
This commit is contained in:
commit
fd3d2ce266
|
@ -994,9 +994,9 @@ PyMethodDef SelectionSingleton::Methods[] = {
|
||||||
"removeObserver(Object) -- Uninstall an observer\n"},
|
"removeObserver(Object) -- Uninstall an observer\n"},
|
||||||
{"addSelectionGate", (PyCFunction) SelectionSingleton::sAddSelectionGate, 1,
|
{"addSelectionGate", (PyCFunction) SelectionSingleton::sAddSelectionGate, 1,
|
||||||
"addSelectionGate(String) -- activate the selection gate.\n"
|
"addSelectionGate(String) -- activate the selection gate.\n"
|
||||||
"The selection gate will prohibit all selections which do not match the\n"
|
"The selection gate will prohibit all selections which do not match\n"
|
||||||
"the given selection filter string. Examples strings are:\n"
|
"the given selection filter string. Examples strings are:\n"
|
||||||
"'SELECT Part::Feature SUB Edge',\n"
|
"'SELECT Part::Feature SUBELEMENT Edge',\n"
|
||||||
"'SELECT Robot::RobotObject'\n"},
|
"'SELECT Robot::RobotObject'\n"},
|
||||||
{"removeSelectionGate", (PyCFunction) SelectionSingleton::sRemoveSelectionGate, 1,
|
{"removeSelectionGate", (PyCFunction) SelectionSingleton::sRemoveSelectionGate, 1,
|
||||||
"removeSelectionGate() -- remove the active slection gate\n"},
|
"removeSelectionGate() -- remove the active slection gate\n"},
|
||||||
|
|
|
@ -136,6 +136,12 @@ def removeComponents(objectsList,host=None):
|
||||||
elif o.Base.Support.Name == host.Name:
|
elif o.Base.Support.Name == host.Name:
|
||||||
FreeCAD.Console.PrintMessage(str(translate("Arch","removing sketch support to avoid cross-referencing")))
|
FreeCAD.Console.PrintMessage(str(translate("Arch","removing sketch support to avoid cross-referencing")))
|
||||||
o.Base.Support = None
|
o.Base.Support = None
|
||||||
|
elif o.Base.ExternalGeometry:
|
||||||
|
for i in range(len(o.Base.ExternalGeometry)):
|
||||||
|
if o.Base.ExternalGeometry[i][0].Name == host.Name:
|
||||||
|
o.Base.delExternal(i)
|
||||||
|
FreeCAD.Console.PrintMessage(str(translate("Arch","removing sketch support to avoid cross-referencing")))
|
||||||
|
break
|
||||||
host.Subtractions = s
|
host.Subtractions = s
|
||||||
else:
|
else:
|
||||||
for o in objectsList:
|
for o in objectsList:
|
||||||
|
@ -165,6 +171,26 @@ def removeComponents(objectsList,host=None):
|
||||||
a.remove(o)
|
a.remove(o)
|
||||||
h.Objects = a
|
h.Objects = a
|
||||||
|
|
||||||
|
def fixWindow(obj):
|
||||||
|
'''fixWindow(object): Fixes non-DAG problems in windows
|
||||||
|
by removing supports and external geometry from underlying sketches'''
|
||||||
|
if Draft.getType(obj) == "Window":
|
||||||
|
if obj.Base:
|
||||||
|
if hasattr(obj.Base,"Support"):
|
||||||
|
if obj.Base.Support:
|
||||||
|
if isinstance(o.Base.Support,tuple):
|
||||||
|
if obj.Base.Support[0]:
|
||||||
|
FreeCAD.Console.PrintMessage(str(translate("Arch","removing sketch support to avoid cross-referencing")))
|
||||||
|
obj.Base.Support = None
|
||||||
|
elif obj.Base.Support:
|
||||||
|
FreeCAD.Console.PrintMessage(str(translate("Arch","removing sketch support to avoid cross-referencing")))
|
||||||
|
obj.Base.Support = None
|
||||||
|
if hasattr(obj.Base,"ExternalGeometry"):
|
||||||
|
if obj.Base.ExternalGeometry:
|
||||||
|
for i in range(len(obj.Base.ExternalGeometry)):
|
||||||
|
obj.Base.delExternal(0)
|
||||||
|
FreeCAD.Console.PrintMessage(str(translate("Arch","removing sketch external references to avoid cross-referencing")))
|
||||||
|
|
||||||
def copyProperties(obj1,obj2):
|
def copyProperties(obj1,obj2):
|
||||||
'''copyProperties(obj1,obj2): Copies properties values from obj1 to obj2,
|
'''copyProperties(obj1,obj2): Copies properties values from obj1 to obj2,
|
||||||
when that property exists in both objects'''
|
when that property exists in both objects'''
|
||||||
|
|
|
@ -976,10 +976,13 @@ class DraftToolBar:
|
||||||
self.toggleradius(-1)
|
self.toggleradius(-1)
|
||||||
elif txt.endsWith("x"):
|
elif txt.endsWith("x"):
|
||||||
self.constrain("x")
|
self.constrain("x")
|
||||||
|
self.displayPoint()
|
||||||
elif txt.endsWith("y"):
|
elif txt.endsWith("y"):
|
||||||
self.constrain("y")
|
self.constrain("y")
|
||||||
|
self.displayPoint()
|
||||||
elif txt.endsWith("z"):
|
elif txt.endsWith("z"):
|
||||||
self.constrain("z")
|
self.constrain("z")
|
||||||
|
self.displayPoint()
|
||||||
elif txt.endsWith("c"):
|
elif txt.endsWith("c"):
|
||||||
if self.closeButton.isVisible():
|
if self.closeButton.isVisible():
|
||||||
self.closeLine()
|
self.closeLine()
|
||||||
|
@ -1033,12 +1036,14 @@ class DraftToolBar:
|
||||||
self.textline -= 1
|
self.textline -= 1
|
||||||
self.textValue.setText(self.textbuffer[self.textline])
|
self.textValue.setText(self.textbuffer[self.textline])
|
||||||
|
|
||||||
def displayPoint(self, point, last=None, plane=None, mask=None):
|
def displayPoint(self, point=None, last=None, plane=None, mask=None):
|
||||||
"this function displays the passed coords in the x, y, and z widgets"
|
"this function displays the passed coords in the x, y, and z widgets"
|
||||||
|
|
||||||
if (not self.taskmode) or self.isTaskOn:
|
if (not self.taskmode) or self.isTaskOn:
|
||||||
|
|
||||||
# get coords to display
|
# get coords to display
|
||||||
|
dp = None
|
||||||
|
if point:
|
||||||
dp = point
|
dp = point
|
||||||
if self.relativeMode and (last != None):
|
if self.relativeMode and (last != None):
|
||||||
if plane:
|
if plane:
|
||||||
|
@ -1050,14 +1055,17 @@ class DraftToolBar:
|
||||||
if self.mask in ['y','z']:
|
if self.mask in ['y','z']:
|
||||||
self.xValue.setText("0.00")
|
self.xValue.setText("0.00")
|
||||||
else:
|
else:
|
||||||
|
if dp:
|
||||||
self.xValue.setText("%.2f" % dp.x)
|
self.xValue.setText("%.2f" % dp.x)
|
||||||
if self.mask in ['x','z']:
|
if self.mask in ['x','z']:
|
||||||
self.yValue.setText("0.00")
|
self.yValue.setText("0.00")
|
||||||
else:
|
else:
|
||||||
|
if dp:
|
||||||
self.yValue.setText("%.2f" % dp.y)
|
self.yValue.setText("%.2f" % dp.y)
|
||||||
if self.mask in ['x','y']:
|
if self.mask in ['x','y']:
|
||||||
self.zValue.setText("0.00")
|
self.zValue.setText("0.00")
|
||||||
else:
|
else:
|
||||||
|
if dp:
|
||||||
self.zValue.setText("%.2f" % dp.z)
|
self.zValue.setText("%.2f" % dp.z)
|
||||||
|
|
||||||
# set masks
|
# set masks
|
||||||
|
|
|
@ -2984,8 +2984,8 @@ class Edit(Modifier):
|
||||||
elif arg["Key"] == "c":
|
elif arg["Key"] == "c":
|
||||||
self.finish(closed=True)
|
self.finish(closed=True)
|
||||||
elif arg["Type"] == "SoLocation2Event": #mouse movement detection
|
elif arg["Type"] == "SoLocation2Event": #mouse movement detection
|
||||||
if self.editing != None:
|
|
||||||
self.point,ctrlPoint,info = getPoint(self,arg)
|
self.point,ctrlPoint,info = getPoint(self,arg)
|
||||||
|
if self.editing != None:
|
||||||
self.trackers[self.editing].set(self.point)
|
self.trackers[self.editing].set(self.point)
|
||||||
self.update(self.trackers[self.editing].get())
|
self.update(self.trackers[self.editing].get())
|
||||||
elif arg["Type"] == "SoMouseButtonEvent":
|
elif arg["Type"] == "SoMouseButtonEvent":
|
||||||
|
@ -3000,6 +3000,7 @@ class Edit(Modifier):
|
||||||
self.pos = arg["Position"]
|
self.pos = arg["Position"]
|
||||||
self.addPoint(self.point)
|
self.addPoint(self.point)
|
||||||
elif self.ui.delButton.isChecked():
|
elif self.ui.delButton.isChecked():
|
||||||
|
if sel.SubElementNames:
|
||||||
if 'EditNode' in sel.SubElementNames[0]:
|
if 'EditNode' in sel.SubElementNames[0]:
|
||||||
self.delPoint(int(sel.SubElementNames[0][8:]))
|
self.delPoint(int(sel.SubElementNames[0][8:]))
|
||||||
elif 'EditNode' in sel.SubElementNames[0]:
|
elif 'EditNode' in sel.SubElementNames[0]:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user