Merge branch 'master' of ssh://git.code.sf.net/p/free-cad/code
This commit is contained in:
commit
71efef4761
|
@ -36,10 +36,11 @@ __title__="FreeCAD Axis System"
|
||||||
__author__ = "Yorik van Havre"
|
__author__ = "Yorik van Havre"
|
||||||
__url__ = "http://www.freecadweb.org"
|
__url__ = "http://www.freecadweb.org"
|
||||||
|
|
||||||
def makeAxis(num=5,size=1000,name=translate("Arch","Axes")):
|
def makeAxis(num=5,size=1000,name="Axes"):
|
||||||
'''makeAxis(num,size): makes an Axis System
|
'''makeAxis(num,size): makes an Axis System
|
||||||
based on the given number of axes and interval distances'''
|
based on the given number of axes and interval distances'''
|
||||||
obj = FreeCAD.ActiveDocument.addObject("App::FeaturePython",name)
|
obj = FreeCAD.ActiveDocument.addObject("App::FeaturePython",name)
|
||||||
|
obj.Label = translate("Arch",name)
|
||||||
_Axis(obj)
|
_Axis(obj)
|
||||||
if FreeCAD.GuiUp:
|
if FreeCAD.GuiUp:
|
||||||
_ViewProviderAxis(obj.ViewObject)
|
_ViewProviderAxis(obj.ViewObject)
|
||||||
|
|
|
@ -34,7 +34,7 @@ __title__="FreeCAD Building"
|
||||||
__author__ = "Yorik van Havre"
|
__author__ = "Yorik van Havre"
|
||||||
__url__ = "http://www.freecadweb.org"
|
__url__ = "http://www.freecadweb.org"
|
||||||
|
|
||||||
def makeBuilding(objectslist=None,baseobj=None,name=translate("Arch","Building")):
|
def makeBuilding(objectslist=None,baseobj=None,name="Building"):
|
||||||
'''makeBuilding(objectslist): creates a building including the
|
'''makeBuilding(objectslist): creates a building including the
|
||||||
objects from the given list.'''
|
objects from the given list.'''
|
||||||
obj = FreeCAD.ActiveDocument.addObject("App::DocumentObjectGroupPython",name)
|
obj = FreeCAD.ActiveDocument.addObject("App::DocumentObjectGroupPython",name)
|
||||||
|
@ -43,6 +43,7 @@ def makeBuilding(objectslist=None,baseobj=None,name=translate("Arch","Building")
|
||||||
_ViewProviderBuilding(obj.ViewObject)
|
_ViewProviderBuilding(obj.ViewObject)
|
||||||
if objectslist:
|
if objectslist:
|
||||||
obj.Group = objectslist
|
obj.Group = objectslist
|
||||||
|
obj.Label = translate("Arch",name)
|
||||||
return obj
|
return obj
|
||||||
|
|
||||||
class _CommandBuilding:
|
class _CommandBuilding:
|
||||||
|
|
|
@ -41,7 +41,7 @@ else:
|
||||||
Roles = ["Furniture", "Hydro Equipment", "Electric Equipment"]
|
Roles = ["Furniture", "Hydro Equipment", "Electric Equipment"]
|
||||||
|
|
||||||
|
|
||||||
def makeEquipment(baseobj=None,placement=None,name=translate("Arch","Equipment"),type=None):
|
def makeEquipment(baseobj=None,placement=None,name="Equipment",type=None):
|
||||||
"makeEquipment([baseobj,placement,name,type]): creates an equipment object from the given base object"
|
"makeEquipment([baseobj,placement,name,type]): creates an equipment object from the given base object"
|
||||||
if type:
|
if type:
|
||||||
if type == "Part":
|
if type == "Part":
|
||||||
|
@ -62,7 +62,7 @@ def makeEquipment(baseobj=None,placement=None,name=translate("Arch","Equipment")
|
||||||
else:
|
else:
|
||||||
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
|
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
|
||||||
_Equipment(obj)
|
_Equipment(obj)
|
||||||
obj.Label = name
|
obj.Label = translate("Arch",name)
|
||||||
if placement:
|
if placement:
|
||||||
obj.Placement = placement
|
obj.Placement = placement
|
||||||
if FreeCAD.GuiUp:
|
if FreeCAD.GuiUp:
|
||||||
|
|
|
@ -34,11 +34,11 @@ __title__="FreeCAD Arch Floor"
|
||||||
__author__ = "Yorik van Havre"
|
__author__ = "Yorik van Havre"
|
||||||
__url__ = "http://www.freecadweb.org"
|
__url__ = "http://www.freecadweb.org"
|
||||||
|
|
||||||
def makeFloor(objectslist=None,baseobj=None,name=translate("Arch","Floor")):
|
def makeFloor(objectslist=None,baseobj=None,name="Floor"):
|
||||||
'''makeFloor(objectslist): creates a floor including the
|
'''makeFloor(objectslist): creates a floor including the
|
||||||
objects from the given list.'''
|
objects from the given list.'''
|
||||||
obj = FreeCAD.ActiveDocument.addObject("App::DocumentObjectGroupPython",name)
|
obj = FreeCAD.ActiveDocument.addObject("App::DocumentObjectGroupPython",name)
|
||||||
obj.Label = name
|
obj.Label = translate("Arch",name)
|
||||||
_Floor(obj)
|
_Floor(obj)
|
||||||
if FreeCAD.GuiUp:
|
if FreeCAD.GuiUp:
|
||||||
_ViewProviderFloor(obj.ViewObject)
|
_ViewProviderFloor(obj.ViewObject)
|
||||||
|
|
|
@ -42,6 +42,7 @@ def makeFrame(baseobj,profile,name=translate("Arch","Frame")):
|
||||||
"""makeFrame(baseobj,profile,[name]): creates a frame object from a base sketch (or any other object
|
"""makeFrame(baseobj,profile,[name]): creates a frame object from a base sketch (or any other object
|
||||||
containing wires) and a profile object (an extrudable 2D object containing faces or closed wires)"""
|
containing wires) and a profile object (an extrudable 2D object containing faces or closed wires)"""
|
||||||
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
|
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
|
||||||
|
obj.Label = translate("Arch",name)
|
||||||
_Frame(obj)
|
_Frame(obj)
|
||||||
if FreeCAD.GuiUp:
|
if FreeCAD.GuiUp:
|
||||||
_ViewProviderFrame(obj.ViewObject)
|
_ViewProviderFrame(obj.ViewObject)
|
||||||
|
|
|
@ -43,12 +43,13 @@ Presets = [None,
|
||||||
["Plywoood 25mm, 1220 x 2440",1200,2400,18]]
|
["Plywoood 25mm, 1220 x 2440",1200,2400,18]]
|
||||||
|
|
||||||
|
|
||||||
def makePanel(baseobj=None,length=0,width=0,thickness=0,placement=None,name=translate("Arch","Panel")):
|
def makePanel(baseobj=None,length=0,width=0,thickness=0,placement=None,name="Panel"):
|
||||||
'''makePanel([obj],[length],[width],[thickness],[placement]): creates a
|
'''makePanel([obj],[length],[width],[thickness],[placement]): creates a
|
||||||
panel element based on the given profile object and the given
|
panel element based on the given profile object and the given
|
||||||
extrusion thickness. If no base object is given, you can also specify
|
extrusion thickness. If no base object is given, you can also specify
|
||||||
length and width for a simple cubic object.'''
|
length and width for a simple cubic object.'''
|
||||||
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
|
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
|
||||||
|
obj.Label = translate("Arch",name)
|
||||||
_Panel(obj)
|
_Panel(obj)
|
||||||
_ViewProviderPanel(obj.ViewObject)
|
_ViewProviderPanel(obj.ViewObject)
|
||||||
if baseobj:
|
if baseobj:
|
||||||
|
|
|
@ -36,11 +36,12 @@ __author__ = "Yorik van Havre"
|
||||||
__url__ = "http://www.freecadweb.org"
|
__url__ = "http://www.freecadweb.org"
|
||||||
|
|
||||||
|
|
||||||
def makeRebar(baseobj,sketch,diameter=None,amount=1,offset=None,name=translate("Arch","Rebar")):
|
def makeRebar(baseobj,sketch,diameter=None,amount=1,offset=None,name="Rebar"):
|
||||||
"""makeRebar(baseobj,sketch,[diameter,amount,offset,name]): adds a Reinforcement Bar object
|
"""makeRebar(baseobj,sketch,[diameter,amount,offset,name]): adds a Reinforcement Bar object
|
||||||
to the given structural object, using the given sketch as profile."""
|
to the given structural object, using the given sketch as profile."""
|
||||||
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch")
|
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch")
|
||||||
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
|
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
|
||||||
|
obj.Label = translate("Arch",name)
|
||||||
_Rebar(obj)
|
_Rebar(obj)
|
||||||
if FreeCAD.GuiUp:
|
if FreeCAD.GuiUp:
|
||||||
_ViewProviderRebar(obj.ViewObject)
|
_ViewProviderRebar(obj.ViewObject)
|
||||||
|
|
|
@ -35,12 +35,13 @@ __title__="FreeCAD Roof"
|
||||||
__author__ = "Yorik van Havre", "Jonathan Wiedemann"
|
__author__ = "Yorik van Havre", "Jonathan Wiedemann"
|
||||||
__url__ = "http://www.freecadweb.org"
|
__url__ = "http://www.freecadweb.org"
|
||||||
|
|
||||||
def makeRoof(baseobj=None,facenr=1, angles=[45.,], run = [], idrel = [0,],thickness = [1.,], overhang=[2.,], name=translate("Arch","Roof")):
|
def makeRoof(baseobj=None,facenr=1, angles=[45.,], run = [], idrel = [0,],thickness = [1.,], overhang=[2.,], name="Roof"):
|
||||||
'''makeRoof(baseobj,[facenr],[angle],[name]) : Makes a roof based on a closed wire.
|
'''makeRoof(baseobj,[facenr],[angle],[name]) : Makes a roof based on a closed wire.
|
||||||
face from an existing object. You can provide a list of angles, run, idrel, thickness,
|
face from an existing object. You can provide a list of angles, run, idrel, thickness,
|
||||||
overhang for each edges in the wire to define the roof shape. The default for angle is 45
|
overhang for each edges in the wire to define the roof shape. The default for angle is 45
|
||||||
and the list is automatically complete to match with number of edges in the wire.'''
|
and the list is automatically complete to match with number of edges in the wire.'''
|
||||||
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
|
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
|
||||||
|
obj.Label = translate("Arch",name)
|
||||||
_Roof(obj)
|
_Roof(obj)
|
||||||
if FreeCAD.GuiUp:
|
if FreeCAD.GuiUp:
|
||||||
_ViewProviderRoof(obj.ViewObject)
|
_ViewProviderRoof(obj.ViewObject)
|
||||||
|
|
|
@ -32,10 +32,11 @@ else:
|
||||||
def translate(ctxt,txt):
|
def translate(ctxt,txt):
|
||||||
return txt
|
return txt
|
||||||
|
|
||||||
def makeSectionPlane(objectslist=None,name=translate("Arch","Section")):
|
def makeSectionPlane(objectslist=None,name="Section"):
|
||||||
"""makeSectionPlane([objectslist]) : Creates a Section plane objects including the
|
"""makeSectionPlane([objectslist]) : Creates a Section plane objects including the
|
||||||
given objects. If no object is given, the whole document will be considered."""
|
given objects. If no object is given, the whole document will be considered."""
|
||||||
obj = FreeCAD.ActiveDocument.addObject("App::FeaturePython",name)
|
obj = FreeCAD.ActiveDocument.addObject("App::FeaturePython",name)
|
||||||
|
obj.Label = translate("Arch",name)
|
||||||
_SectionPlane(obj)
|
_SectionPlane(obj)
|
||||||
if FreeCAD.GuiUp:
|
if FreeCAD.GuiUp:
|
||||||
_ViewProviderSectionPlane(obj.ViewObject)
|
_ViewProviderSectionPlane(obj.ViewObject)
|
||||||
|
|
|
@ -34,10 +34,11 @@ __title__="FreeCAD Site"
|
||||||
__author__ = "Yorik van Havre"
|
__author__ = "Yorik van Havre"
|
||||||
__url__ = "http://www.freecadweb.org"
|
__url__ = "http://www.freecadweb.org"
|
||||||
|
|
||||||
def makeSite(objectslist=None,baseobj=None,name=translate("Arch","Site")):
|
def makeSite(objectslist=None,baseobj=None,name="Site"):
|
||||||
'''makeBuilding(objectslist): creates a site including the
|
'''makeBuilding(objectslist): creates a site including the
|
||||||
objects from the given list.'''
|
objects from the given list.'''
|
||||||
obj = FreeCAD.ActiveDocument.addObject("App::DocumentObjectGroupPython",name)
|
obj = FreeCAD.ActiveDocument.addObject("App::DocumentObjectGroupPython",name)
|
||||||
|
obj.Label = translate("Arch",name)
|
||||||
_Site(obj)
|
_Site(obj)
|
||||||
if FreeCAD.GuiUp:
|
if FreeCAD.GuiUp:
|
||||||
_ViewProviderSite(obj.ViewObject)
|
_ViewProviderSite(obj.ViewObject)
|
||||||
|
|
|
@ -38,11 +38,12 @@ else:
|
||||||
def translate(ctxt,txt):
|
def translate(ctxt,txt):
|
||||||
return txt
|
return txt
|
||||||
|
|
||||||
def makeSpace(objects=None,baseobj=None,name=translate("Arch","Space")):
|
def makeSpace(objects=None,baseobj=None,name="Space"):
|
||||||
"""makeSpace([objects]): Creates a space object from the given objects. Objects can be one
|
"""makeSpace([objects]): Creates a space object from the given objects. Objects can be one
|
||||||
document object, in which case it becomes the base shape of the space object, or a list of
|
document object, in which case it becomes the base shape of the space object, or a list of
|
||||||
selection objects as got from getSelectionEx(), or a list of tuples (object, subobjectname)"""
|
selection objects as got from getSelectionEx(), or a list of tuples (object, subobjectname)"""
|
||||||
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
|
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
|
||||||
|
obj.Label = translate("Arch",name)
|
||||||
_Space(obj)
|
_Space(obj)
|
||||||
if FreeCAD.GuiUp:
|
if FreeCAD.GuiUp:
|
||||||
_ViewProviderSpace(obj.ViewObject)
|
_ViewProviderSpace(obj.ViewObject)
|
||||||
|
|
|
@ -36,11 +36,12 @@ else:
|
||||||
return txt
|
return txt
|
||||||
|
|
||||||
|
|
||||||
def makeStairs(baseobj=None,length=None,width=None,height=None,steps=None,name=translate("Arch","Stairs")):
|
def makeStairs(baseobj=None,length=None,width=None,height=None,steps=None,name="Stairs"):
|
||||||
"""makeStairs([baseobj,length,width,height,steps]): creates a Stairs
|
"""makeStairs([baseobj,length,width,height,steps]): creates a Stairs
|
||||||
objects with given attributes."""
|
objects with given attributes."""
|
||||||
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch")
|
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch")
|
||||||
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
|
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
|
||||||
|
obj.Label = translate("Arch",name)
|
||||||
_Stairs(obj)
|
_Stairs(obj)
|
||||||
if FreeCAD.GuiUp:
|
if FreeCAD.GuiUp:
|
||||||
_ViewProviderStairs(obj.ViewObject)
|
_ViewProviderStairs(obj.ViewObject)
|
||||||
|
|
|
@ -287,13 +287,14 @@ Presets = [None,
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
def makeStructure(baseobj=None,length=None,width=None,height=None,name=translate("Arch","Structure")):
|
def makeStructure(baseobj=None,length=None,width=None,height=None,name="Structure"):
|
||||||
'''makeStructure([obj],[length],[width],[heigth],[swap]): creates a
|
'''makeStructure([obj],[length],[width],[heigth],[swap]): creates a
|
||||||
structure element based on the given profile object and the given
|
structure element based on the given profile object and the given
|
||||||
extrusion height. If no base object is given, you can also specify
|
extrusion height. If no base object is given, you can also specify
|
||||||
length and width for a cubic object.'''
|
length and width for a cubic object.'''
|
||||||
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch")
|
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch")
|
||||||
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
|
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
|
||||||
|
obj.Label = translate("Arch",name)
|
||||||
_Structure(obj)
|
_Structure(obj)
|
||||||
if FreeCAD.GuiUp:
|
if FreeCAD.GuiUp:
|
||||||
_ViewProviderStructure(obj.ViewObject)
|
_ViewProviderStructure(obj.ViewObject)
|
||||||
|
@ -321,7 +322,7 @@ def makeStructure(baseobj=None,length=None,width=None,height=None,name=translate
|
||||||
obj.Role = "Column"
|
obj.Role = "Column"
|
||||||
return obj
|
return obj
|
||||||
|
|
||||||
def makeStructuralSystem(objects=[],axes=[],name=translate("Arch","StructuralSystem")):
|
def makeStructuralSystem(objects=[],axes=[],name="StructuralSystem"):
|
||||||
'''makeStructuralSystem(objects,axes): makes a structural system
|
'''makeStructuralSystem(objects,axes): makes a structural system
|
||||||
based on the given objects and axes'''
|
based on the given objects and axes'''
|
||||||
result = []
|
result = []
|
||||||
|
@ -335,6 +336,7 @@ def makeStructuralSystem(objects=[],axes=[],name=translate("Arch","StructuralSys
|
||||||
objects = [None]
|
objects = [None]
|
||||||
for o in objects:
|
for o in objects:
|
||||||
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
|
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
|
||||||
|
obj.Label = translate("Arch",name)
|
||||||
_StructuralSystem(obj)
|
_StructuralSystem(obj)
|
||||||
if FreeCAD.GuiUp:
|
if FreeCAD.GuiUp:
|
||||||
_ViewProviderStructuralSystem(obj.ViewObject)
|
_ViewProviderStructuralSystem(obj.ViewObject)
|
||||||
|
@ -358,6 +360,7 @@ def makeProfile(W=46,H=80,tw=3.8,tf=5.2,name="Profile"):
|
||||||
tw = flange thickness (see http://en.wikipedia.org/wiki/I-beam for
|
tw = flange thickness (see http://en.wikipedia.org/wiki/I-beam for
|
||||||
reference)'''
|
reference)'''
|
||||||
obj = FreeCAD.ActiveDocument.addObject("Part::Part2DObjectPython",name)
|
obj = FreeCAD.ActiveDocument.addObject("Part::Part2DObjectPython",name)
|
||||||
|
obj.Label = translate("Arch",name)
|
||||||
_Profile(obj)
|
_Profile(obj)
|
||||||
obj.Width = W
|
obj.Width = W
|
||||||
obj.Height = H
|
obj.Height = H
|
||||||
|
|
|
@ -38,13 +38,14 @@ __url__ = "http://www.freecadweb.org"
|
||||||
# Possible roles for walls
|
# Possible roles for walls
|
||||||
Roles = ['Wall','Wall Layer','Beam','Column','Curtain Wall']
|
Roles = ['Wall','Wall Layer','Beam','Column','Curtain Wall']
|
||||||
|
|
||||||
def makeWall(baseobj=None,length=None,width=None,height=None,align="Center",face=None,name=translate("Arch","Wall")):
|
def makeWall(baseobj=None,length=None,width=None,height=None,align="Center",face=None,name="Wall"):
|
||||||
'''makeWall([obj],[length],[width],[height],[align],[face],[name]): creates a wall based on the
|
'''makeWall([obj],[length],[width],[height],[align],[face],[name]): creates a wall based on the
|
||||||
given object, which can be a sketch, a draft object, a face or a solid, or no object at
|
given object, which can be a sketch, a draft object, a face or a solid, or no object at
|
||||||
all, then you must provide length, width and height. Align can be "Center","Left" or "Right",
|
all, then you must provide length, width and height. Align can be "Center","Left" or "Right",
|
||||||
face can be an index number of a face in the base object to base the wall on.'''
|
face can be an index number of a face in the base object to base the wall on.'''
|
||||||
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch")
|
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch")
|
||||||
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
|
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
|
||||||
|
obj.Label = translate("Arch",name)
|
||||||
_Wall(obj)
|
_Wall(obj)
|
||||||
if FreeCAD.GuiUp:
|
if FreeCAD.GuiUp:
|
||||||
_ViewProviderWall(obj.ViewObject)
|
_ViewProviderWall(obj.ViewObject)
|
||||||
|
|
|
@ -43,7 +43,7 @@ WindowPresets = ["Fixed", "Open 1-pane", "Open 2-pane", "Sash 2-pane",
|
||||||
Roles = ["Window","Door"]
|
Roles = ["Window","Door"]
|
||||||
|
|
||||||
|
|
||||||
def makeWindow(baseobj=None,width=None,height=None,parts=None,name=translate("Arch","Window")):
|
def makeWindow(baseobj=None,width=None,height=None,parts=None,name="Window"):
|
||||||
'''makeWindow(baseobj,[width,height,parts,name]): creates a window based on the
|
'''makeWindow(baseobj,[width,height,parts,name]): creates a window based on the
|
||||||
given base 2D object (sketch or draft).'''
|
given base 2D object (sketch or draft).'''
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ def makeWindow(baseobj=None,width=None,height=None,parts=None,name=translate("Ar
|
||||||
return obj
|
return obj
|
||||||
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch")
|
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch")
|
||||||
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
|
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
|
||||||
obj.Label = name
|
obj.Label = translate("Arch",name)
|
||||||
_Window(obj)
|
_Window(obj)
|
||||||
if FreeCAD.GuiUp:
|
if FreeCAD.GuiUp:
|
||||||
_ViewProviderWindow(obj.ViewObject)
|
_ViewProviderWindow(obj.ViewObject)
|
||||||
|
@ -515,18 +515,18 @@ class _CommandWindow:
|
||||||
"sets up a taskbox widget"
|
"sets up a taskbox widget"
|
||||||
w = QtGui.QWidget()
|
w = QtGui.QWidget()
|
||||||
ui = FreeCADGui.UiLoader()
|
ui = FreeCADGui.UiLoader()
|
||||||
w.setWindowTitle(translate("Arch","Window options"))
|
w.setWindowTitle(translate("Arch","Window options").decode("utf8"))
|
||||||
grid = QtGui.QGridLayout(w)
|
grid = QtGui.QGridLayout(w)
|
||||||
|
|
||||||
# sill height
|
# sill height
|
||||||
labels = QtGui.QLabel(translate("Arch","Sill height"))
|
labels = QtGui.QLabel(translate("Arch","Sill height").decode("utf8"))
|
||||||
values = ui.createWidget("Gui::InputField")
|
values = ui.createWidget("Gui::InputField")
|
||||||
grid.addWidget(labels,0,0,1,1)
|
grid.addWidget(labels,0,0,1,1)
|
||||||
grid.addWidget(values,0,1,1,1)
|
grid.addWidget(values,0,1,1,1)
|
||||||
QtCore.QObject.connect(values,QtCore.SIGNAL("valueChanged(double)"),self.setSill)
|
QtCore.QObject.connect(values,QtCore.SIGNAL("valueChanged(double)"),self.setSill)
|
||||||
|
|
||||||
# presets box
|
# presets box
|
||||||
labelp = QtGui.QLabel(translate("Arch","Preset"))
|
labelp = QtGui.QLabel(translate("Arch","Preset").decode("utf8"))
|
||||||
valuep = QtGui.QComboBox()
|
valuep = QtGui.QComboBox()
|
||||||
valuep.addItems(["Create from scratch"]+WindowPresets)
|
valuep.addItems(["Create from scratch"]+WindowPresets)
|
||||||
valuep.setCurrentIndex(self.Preset)
|
valuep.setCurrentIndex(self.Preset)
|
||||||
|
|
|
@ -688,7 +688,7 @@ class BezCurve(Line):
|
||||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Draft_BezCurve", "Creates a Bezier curve. CTRL to snap, SHIFT to constrain")}
|
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Draft_BezCurve", "Creates a Bezier curve. CTRL to snap, SHIFT to constrain")}
|
||||||
|
|
||||||
def Activated(self):
|
def Activated(self):
|
||||||
Line.Activated(self,name=translate("draft","BezCurve"))
|
Line.Activated(self,name=translate("draft","BezCurve").decode("utf8"))
|
||||||
if self.doc:
|
if self.doc:
|
||||||
self.bezcurvetrack = bezcurveTracker()
|
self.bezcurvetrack = bezcurveTracker()
|
||||||
|
|
||||||
|
@ -2061,7 +2061,7 @@ class Move(Modifier):
|
||||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Draft_Move", "Moves the selected objects between 2 points. CTRL to snap, SHIFT to constrain, ALT to copy")}
|
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Draft_Move", "Moves the selected objects between 2 points. CTRL to snap, SHIFT to constrain, ALT to copy")}
|
||||||
|
|
||||||
def Activated(self):
|
def Activated(self):
|
||||||
self.name = translate("draft","Move")
|
self.name = translate("draft","Move").decode("utf8")
|
||||||
Modifier.Activated(self,self.name)
|
Modifier.Activated(self,self.name)
|
||||||
self.ghost = None
|
self.ghost = None
|
||||||
if self.ui:
|
if self.ui:
|
||||||
|
@ -2972,7 +2972,7 @@ class Scale(Modifier):
|
||||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Draft_Scale", "Scales the selected objects from a base point. CTRL to snap, SHIFT to constrain, ALT to copy")}
|
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Draft_Scale", "Scales the selected objects from a base point. CTRL to snap, SHIFT to constrain, ALT to copy")}
|
||||||
|
|
||||||
def Activated(self):
|
def Activated(self):
|
||||||
self.name = translate("draft","Scale")
|
self.name = translate("draft","Scale").decode("utf8")
|
||||||
Modifier.Activated(self,self.name)
|
Modifier.Activated(self,self.name)
|
||||||
self.ghost = None
|
self.ghost = None
|
||||||
if self.ui:
|
if self.ui:
|
||||||
|
@ -4548,5 +4548,3 @@ FreeCADGui.addCommand('Draft_Snap_WorkingPlane',Draft_Snap_WorkingPlane())
|
||||||
|
|
||||||
# a global place to look for active draft Command
|
# a global place to look for active draft Command
|
||||||
FreeCAD.activeDraftCommand = None
|
FreeCAD.activeDraftCommand = None
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user