Merge branch 'master' of ssh://free-cad.git.sourceforge.net/gitroot/free-cad/free-cad
This commit is contained in:
@@ -1796,7 +1796,8 @@ class _ViewProviderDraft:
|
||||
def unsetEdit(self,vp,mode):
|
||||
if FreeCAD.activeDraftCommand:
|
||||
FreeCAD.activeDraftCommand.finish()
|
||||
return
|
||||
FreeCADGui.Control.closeDialog()
|
||||
return False
|
||||
|
||||
def getIcon(self):
|
||||
return(":/icons/Draft_Draft.svg")
|
||||
|
||||
@@ -908,6 +908,7 @@ class DraftToolBar:
|
||||
if self.cancel:
|
||||
self.cancel()
|
||||
self.cancel = None
|
||||
FreeCADGui.ActiveDocument.resetEdit()
|
||||
|
||||
def escape(self):
|
||||
"escapes the current command"
|
||||
@@ -919,6 +920,7 @@ class DraftToolBar:
|
||||
def closeLine(self):
|
||||
"close button action"
|
||||
self.sourceCmd.finish(True)
|
||||
FreeCADGui.ActiveDocument.resetEdit()
|
||||
|
||||
def wipeLine(self):
|
||||
"wipes existing segments of a line"
|
||||
|
||||
@@ -3114,12 +3114,17 @@ class Edit(Modifier):
|
||||
Modifier.finish(self)
|
||||
plane.restore()
|
||||
self.running = False
|
||||
FreeCADGui.ActiveDocument.resetEdit()
|
||||
|
||||
def action(self,arg):
|
||||
"scene event handler"
|
||||
if arg["Type"] == "SoKeyboardEvent":
|
||||
if arg["Key"] == "ESCAPE":
|
||||
self.finish()
|
||||
elif arg["Key"] == "f":
|
||||
self.finish()
|
||||
elif arg["Key"] == "c":
|
||||
self.finish(closed=True)
|
||||
elif arg["Type"] == "SoLocation2Event": #mouse movement detection
|
||||
if self.editing != None:
|
||||
self.point,ctrlPoint,info = getPoint(self,arg)
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.4 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.6 KiB |
@@ -14,7 +14,7 @@
|
||||
height="64px"
|
||||
id="svg2726"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.48.1 r9760"
|
||||
inkscape:version="0.48.3.1 r9886"
|
||||
sodipodi:docname="Snap_Perpendicular.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
version="1.1">
|
||||
@@ -58,17 +58,17 @@
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="3.8890873"
|
||||
inkscape:cx="21.852178"
|
||||
inkscape:cy="16.273213"
|
||||
inkscape:zoom="7.7781746"
|
||||
inkscape:cx="24.45243"
|
||||
inkscape:cy="13.674951"
|
||||
inkscape:current-layer="g4289"
|
||||
showgrid="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:window-width="1280"
|
||||
inkscape:window-height="755"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1057"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="22"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata2731">
|
||||
@@ -91,9 +91,10 @@
|
||||
transform="matrix(0.1621282,0,0,0.1621282,6.3605986,-66.108806)">
|
||||
<path
|
||||
style="color:#000000;fill:#00b286;fill-opacity:1;fill-rule:nonzero;stroke:#002e2e;stroke-width:29.87757301;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||
d="m 126.31496,439.55224 0,254.71983 -137.088541,0 0,69.15728 340.250461,0 0,-69.15728 -132.51282,0 0,-254.71983 -70.6491,0 z"
|
||||
d="m 126.31496,439.55224 c 0,0 -0.79298,86.49258 -0.79298,128.94588 0,42.45331 0.79298,125.77395 0.79298,125.77395 l -137.088541,0 0,69.15728 c 0,0 111.830851,0.79298 168.539261,0.79298 56.70841,0 171.7112,-0.79298 171.7112,-0.79298 l 0,-69.15728 -132.51282,0 c 0,0 0.79298,-56.05449 0.79298,-121.80903 0,-65.75454 -0.79298,-132.9108 -0.79298,-132.9108 z"
|
||||
id="rect3942"
|
||||
inkscape:connector-curvature="0" />
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="czccczccczcc" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.5 KiB |
@@ -199,6 +199,8 @@ class AddSCADTask:
|
||||
FreeCAD.Console.PrintError(unicode(translate('OpenSCAD','Running OpenSCAD failed'))+u'\n')
|
||||
|
||||
class AddOpenSCADElement:
|
||||
def IsActive(self):
|
||||
return not FreeCADGui.Control.activeDialog()
|
||||
def Activated(self):
|
||||
panel = AddSCADTask()
|
||||
FreeCADGui.Control.showDialog(panel)
|
||||
|
||||
@@ -539,7 +539,10 @@ def p_linear_extrude_with_twist(p):
|
||||
print "Linear Extrude With Twist"
|
||||
h = float(p[3]['height'])
|
||||
print "Twist : ",p[3]
|
||||
t = float(p[3]['twist'])
|
||||
if 'twist' in p[3]:
|
||||
t = float(p[3]['twist'])
|
||||
else:
|
||||
t = 0
|
||||
if (len(p[6]) > 1) :
|
||||
obj = fuse(p[6],"Linear Extrude Union")
|
||||
else :
|
||||
@@ -862,7 +865,7 @@ def p_square_action(p) :
|
||||
mysquare = doc.addObject('Part::Plane',p[1])
|
||||
mysquare.Length=x
|
||||
mysquare.Width=y
|
||||
if p[9]=='true' :
|
||||
if p[3]['center']=='true' :
|
||||
center(mysquare,x,y,0)
|
||||
p[0] = [mysquare]
|
||||
|
||||
|
||||
@@ -11,14 +11,15 @@ def replaceobj(parent,oldchild,newchild):
|
||||
setattr(parent,propname,newchild)
|
||||
print propname, parent.getPropertyByName(propname)
|
||||
#else: print propname,propvalue
|
||||
parent.touch()
|
||||
|
||||
def replaceobjfromselection(objs):
|
||||
assert(len(objs)==3)
|
||||
if objs[0] in objs[1].InList: parent, oldchild, newchild = objs
|
||||
if objs[2] in objs[0].InList: oldchild, newchild, parent = objs
|
||||
elif objs[0] in objs[1].InList: parent, oldchild, newchild = objs
|
||||
elif objs[0] in objs[2].InList: parent, newchild, oldchild = objs
|
||||
elif objs[1] in objs[0].InList: oldchild, parent, newchild = objs
|
||||
elif objs[1] in objs[2].InList: newchild, parent, oldchild = objs
|
||||
elif objs[2] in objs[0].InList: oldchild, newchild, parent = objs
|
||||
elif objs[2] in objs[1].InList: newchild, oldchild, parent = objs
|
||||
else: assert(False)
|
||||
replaceobj(parent,oldchild,newchild)
|
||||
|
||||
Reference in New Issue
Block a user