committed by
Kacper Donat
parent
bee89d0447
commit
75b2ef67fc
@@ -51,12 +51,9 @@ class CommandAxoLengthDimension:
|
||||
"""Return a dictionary with data that will be used by the button or menu item."""
|
||||
return {'Pixmap': 'actions/TechDraw_AxoLengthDimension.svg',
|
||||
'Accel': "",
|
||||
'MenuText': QT_TRANSLATE_NOOP("TechDraw_AxoLengthDimension", "Axonometric length dimension"),
|
||||
'ToolTip': QT_TRANSLATE_NOOP("TechDraw_AxoLengthDimension", "Create an axonometric length dimension<br>\
|
||||
- select first edge to define direction and length of the dimension line<br>\
|
||||
- select second edge to define the direction of the extension lines<br>\
|
||||
- optional: select two more vertexes which define the measurement instead of the length<br>\
|
||||
of the first selected edge")}
|
||||
'MenuText': QT_TRANSLATE_NOOP("TechDraw_AxoLengthDimension", "Axonometric Length Dimension"),
|
||||
'ToolTip': QT_TRANSLATE_NOOP("TechDraw_AxoLengthDimension", "Creates a length dimension in with "
|
||||
"axonometric view, using selected edges or vertex pairs to define direction and measurement")}
|
||||
|
||||
def Activated(self):
|
||||
"""Run the following code when the command is activated (button press)."""
|
||||
|
||||
@@ -46,11 +46,11 @@ class CommandFillTemplateFields:
|
||||
"Pixmap": "actions/TechDraw_FillTemplateFields.svg",
|
||||
"Accel": "",
|
||||
"MenuText": QT_TRANSLATE_NOOP(
|
||||
"TechDraw_FillTemplateFields", "Update template fields"
|
||||
"TechDraw_FillTemplateFields", "Update Template Fields"
|
||||
),
|
||||
"ToolTip": QT_TRANSLATE_NOOP(
|
||||
"TechDraw_FillTemplateFields",
|
||||
"Use document info to populate the template fields",
|
||||
"Uses document info to populate the template fields",
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
@@ -47,15 +47,11 @@ class CommandHoleShaftFit:
|
||||
"Pixmap": "actions/TechDraw_HoleShaftFit.svg",
|
||||
"Accel": "",
|
||||
"MenuText": QT_TRANSLATE_NOOP(
|
||||
"TechDraw_HoleShaftFit", "Add hole or shaft fit"
|
||||
"TechDraw_HoleShaftFit", "Hole/Shaft Fit"
|
||||
),
|
||||
"ToolTip": QT_TRANSLATE_NOOP(
|
||||
"TechDraw_HoleShaftFit",
|
||||
"Add a hole or shaft fit to a dimension\n"
|
||||
"- select one length dimension or diameter dimension\n"
|
||||
"- click the tool button, a panel opens\n"
|
||||
"- select shaft fit / hole fit\n"
|
||||
"- select the desired ISO 286 fit field using the combo box",
|
||||
"Adds a hole or shaft fit to a selected length or diameter dimension"
|
||||
),
|
||||
}
|
||||
|
||||
@@ -73,7 +69,7 @@ class CommandHoleShaftFit:
|
||||
)
|
||||
msg = translate(
|
||||
"TechDraw_HoleShaftFit",
|
||||
"Please select one length dimension or diameter dimension and retry",
|
||||
"Select one length dimension or diameter dimension and retry",
|
||||
)
|
||||
msgBox.setText(msg)
|
||||
msgBox.setWindowTitle(msgTitle)
|
||||
|
||||
@@ -45,7 +45,7 @@ class CommandMoveView:
|
||||
return {'Pixmap': 'actions/TechDraw_MoveView.svg',
|
||||
'Accel': "",
|
||||
'MenuText': QT_TRANSLATE_NOOP("TechDraw_MoveView", "Move View"),
|
||||
'ToolTip': QT_TRANSLATE_NOOP("TechDraw_MoveView", "Move a View to a new Page")}
|
||||
'ToolTip': QT_TRANSLATE_NOOP("TechDraw_MoveView", "Moves a view to a new page")}
|
||||
|
||||
def Activated(self):
|
||||
"""Run the following code when the command is activated (button press)."""
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
"""
|
||||
Provides the TechDraw PositionSectionView GuiCommand.
|
||||
00.01 2021/03/17 C++ Basic version
|
||||
00.02 2023/12/21 Option to select an edge and it's corresponding vertex
|
||||
00.02 2023/12/21 Option to select an edge and its corresponding vertex
|
||||
"""
|
||||
|
||||
__title__ = "TechDrawTools.CommandPositionSectionView"
|
||||
@@ -50,11 +50,7 @@ class CommandPositionSectionView:
|
||||
'Accel': "",
|
||||
'MenuText': QT_TRANSLATE_NOOP("TechDraw_PositionSectionView", "Position Section View"),
|
||||
'ToolTip': QT_TRANSLATE_NOOP("TechDraw_PositionSectionView",
|
||||
"Orthogonally align a section view with its source view:<br>\
|
||||
- Select a single section view<br>\
|
||||
- Click this tool<br>\
|
||||
- optional: select one edge in the section view and it's corresponding vertex in the base view<br>\
|
||||
Click this tool")}
|
||||
"Aligns the selected section view with its source view orthogonally or the selected edge in the section view to the selected vertex in the base view")}
|
||||
|
||||
def Activated(self):
|
||||
"""Run the following code when the command is activated (button pressed)."""
|
||||
@@ -113,8 +109,14 @@ class CommandPositionSectionView:
|
||||
|
||||
def getTrianglePoint(self,p1,dir,p2):
|
||||
'''
|
||||
Get third point of a perpendicular triangle
|
||||
p1, p2 ...vertexes of hypothenusis, dir ...direction of one kathete, p3 ...3rd vertex
|
||||
Calculate the third vertex of a right triangle.
|
||||
|
||||
Parameters:
|
||||
p1, p2 : vertices of the hypotenuse
|
||||
dir : direction vector of one leg (kathete)
|
||||
|
||||
Returns:
|
||||
p3 : the third vertex completing the right triangle
|
||||
'''
|
||||
a = -dir.y
|
||||
b = dir.x
|
||||
|
||||
@@ -34,7 +34,7 @@ import FreeCADGui as Gui
|
||||
import TechDrawTools
|
||||
|
||||
class CommandShareView:
|
||||
"""Shares a View on current Page to another Page."""
|
||||
"""Shares a view on current page to another page."""
|
||||
|
||||
def __init__(self):
|
||||
"""Initialize variables for the command that must exist at all times."""
|
||||
@@ -45,7 +45,7 @@ class CommandShareView:
|
||||
return {'Pixmap': 'actions/TechDraw_ShareView.svg',
|
||||
'Accel': "",
|
||||
'MenuText': QT_TRANSLATE_NOOP("TechDraw_ShareView", "Share View"),
|
||||
'ToolTip': QT_TRANSLATE_NOOP("TechDraw_ShareView", "Share a View on a second Page")}
|
||||
'ToolTip': QT_TRANSLATE_NOOP("TechDraw_ShareView", "Shares a view on a second page")}
|
||||
|
||||
def Activated(self):
|
||||
"""Run the following code when the command is activated (button press)."""
|
||||
|
||||
@@ -57,10 +57,8 @@ class CommandVertexCreationGroup:
|
||||
"""Return a dictionary with data that will be used by the button or menu item."""
|
||||
return {'Pixmap': 'TechDraw_ExtensionVertexAtIntersection.svg',
|
||||
'Accel': "",
|
||||
'MenuText': QT_TRANSLATE_NOOP("TechDraw_ExtensionVertexAtIntersection","Add Cosmetic Intersection Vertex(es)"),
|
||||
'ToolTip': QT_TRANSLATE_NOOP("TechDraw_ExtensionVertexAtIntersection", "Add cosmetic vertex(es) at the intersection(s) of selected edges:<br>\
|
||||
- Select two edges<br>\
|
||||
- Click this tool")}
|
||||
'MenuText': QT_TRANSLATE_NOOP("TechDraw_ExtensionVertexAtIntersection","Cosmetic Intersection Vertices"),
|
||||
'ToolTip': QT_TRANSLATE_NOOP("TechDraw_ExtensionVertexAtIntersection", "Adds cosmetic vertices at the intersectionss of selected edges")}
|
||||
|
||||
def IsActive(self):
|
||||
"""Return True when the command should be active or False when it should be disabled (greyed)."""
|
||||
@@ -80,11 +78,8 @@ class CommandAddOffsetVertex:
|
||||
"""Return a dictionary with data that will be used by the button or menu item."""
|
||||
return {'Pixmap': 'actions/TechDraw_AddOffsetVertex.svg',
|
||||
'Accel': "",
|
||||
'MenuText': QT_TRANSLATE_NOOP("TechDraw_AddOffsetVertex", "Add an offset vertex"),
|
||||
'ToolTip': QT_TRANSLATE_NOOP("TechDraw_AddOffsetVertex", "Create an offset vertex<br>\
|
||||
- select one vertex<br>\
|
||||
- start the tool<br>\
|
||||
- enter offset values in panel")}
|
||||
'MenuText': QT_TRANSLATE_NOOP("TechDraw_AddOffsetVertex", "Offset Vertex"),
|
||||
'ToolTip': QT_TRANSLATE_NOOP("TechDraw_AddOffsetVertex", "Creates an offset from one selected vertex")}
|
||||
|
||||
def Activated(self):
|
||||
"""Run the following code when the command is activated (button pressed)."""
|
||||
|
||||
@@ -103,7 +103,7 @@ class TaskFillTemplateFields:
|
||||
msgBox = QtGui.QMessageBox()
|
||||
msgTitle = QtCore.QT_TRANSLATE_NOOP(
|
||||
"Techdraw_FillTemplateFields",
|
||||
"View or Projection Group missing",
|
||||
"View or projection group missing",
|
||||
)
|
||||
msg = QtCore.QT_TRANSLATE_NOOP(
|
||||
"Techdraw_FillTemplateFields",
|
||||
@@ -131,7 +131,7 @@ class TaskFillTemplateFields:
|
||||
self.dialog.resize(1050, 400)
|
||||
self.dialog.setWindowTitle(
|
||||
QtCore.QT_TRANSLATE_NOOP(
|
||||
"TechDraw_FillTemplateFields", "Fill Template Fields in "
|
||||
"TechDraw_FillTemplateFields", "Fill Template Fields In "
|
||||
)
|
||||
+ self.page.Label
|
||||
)
|
||||
|
||||
@@ -39,9 +39,9 @@ translate = App.Qt.translate
|
||||
class TaskHoleShaftFit:
|
||||
def __init__(self, sel):
|
||||
|
||||
loose = translate("TechDraw_HoleShaftFit", "loose fit")
|
||||
snug = translate("TechDraw_HoleShaftFit", "snug fit")
|
||||
press = translate("TechDraw_HoleShaftFit", "press fit")
|
||||
loose = translate("TechDraw_HoleShaftFit", "Loose fit")
|
||||
snug = translate("TechDraw_HoleShaftFit", "Snug fit")
|
||||
press = translate("TechDraw_HoleShaftFit", "Press fit")
|
||||
self.isHole = True
|
||||
self.sel = sel
|
||||
self.holeValues = [
|
||||
@@ -88,7 +88,7 @@ class TaskHoleShaftFit:
|
||||
self.form = Gui.PySideUic.loadUi(self._uiPath)
|
||||
|
||||
self.form.setWindowTitle(
|
||||
translate("TechDraw_HoleShaftFit", "Hole / Shaft Fit ISO 286")
|
||||
translate("TechDraw_HoleShaftFit", "Hole/Shaft Fit ISO 286")
|
||||
)
|
||||
|
||||
self.form.rbHoleBase.clicked.connect(partial(self.on_HoleShaftChanged, True))
|
||||
|
||||
@@ -45,7 +45,7 @@ class TaskMoveView:
|
||||
self._uiPath = os.path.join(self._uiPath, "Mod/TechDraw/TechDrawTools/Gui/TaskMoveView.ui")
|
||||
self.form = Gui.PySideUic.loadUi(self._uiPath)
|
||||
|
||||
self.form.setWindowTitle(translate("TechDraw_MoveView", "Move View to a different Page"))
|
||||
self.form.setWindowTitle(translate("TechDraw_MoveView", "Move View to Different Page"))
|
||||
|
||||
self.form.pbView.clicked.connect(self.pickView)
|
||||
self.form.pbFromPage.clicked.connect(self.pickFromPage)
|
||||
@@ -77,7 +77,7 @@ class TaskMoveView:
|
||||
_dlgPath = os.path.join(_dlgPath, "Mod/TechDraw/TechDrawTools/Gui/DlgPageChooser.ui")
|
||||
dlg = Gui.PySideUic.loadUi(_dlgPath)
|
||||
self.dialogOpen = True
|
||||
dlg.lPrompt.setText(translate("TechDraw_MoveView", "Select View to move from list."))
|
||||
dlg.lPrompt.setText(translate("TechDraw_MoveView", "Select view to move from list."))
|
||||
dlg.setWindowTitle(translate("TechDraw_MoveView", "Select View"))
|
||||
|
||||
views = [x for x in App.ActiveDocument.Objects if x.isDerivedFrom("TechDraw::DrawView")]
|
||||
@@ -100,7 +100,7 @@ class TaskMoveView:
|
||||
_dlgPath = os.path.join(_dlgPath, "Mod/TechDraw/TechDrawTools/Gui/DlgPageChooser.ui")
|
||||
dlg = Gui.PySideUic.loadUi(_dlgPath)
|
||||
self.dialogOpen = True
|
||||
dlg.lPrompt.setText(translate("TechDraw_MoveView", "Select From Page."))
|
||||
dlg.lPrompt.setText(translate("TechDraw_MoveView", "Select from page."))
|
||||
dlg.setWindowTitle(translate("TechDraw_MoveView", "Select Page"))
|
||||
|
||||
pages = [x for x in App.ActiveDocument.Objects if x.isDerivedFrom("TechDraw::DrawPage")]
|
||||
@@ -123,7 +123,7 @@ class TaskMoveView:
|
||||
_dlgPath = os.path.join(_dlgPath, "Mod/TechDraw/TechDrawTools/Gui/DlgPageChooser.ui")
|
||||
dlg = Gui.PySideUic.loadUi(_dlgPath)
|
||||
self.dialogOpen = True
|
||||
dlg.lPrompt.setText(translate("TechDraw_MoveView", "Select To Page."))
|
||||
dlg.lPrompt.setText(translate("TechDraw_MoveView", "Select to page."))
|
||||
dlg.setWindowTitle(translate("TechDraw_MoveView", "Select Page"))
|
||||
|
||||
pages = [x for x in App.ActiveDocument.Objects if x.isDerivedFrom("TechDraw::DrawPage")]
|
||||
|
||||
@@ -44,7 +44,7 @@ class TaskShareView:
|
||||
self._uiPath = os.path.join(self._uiPath, "Mod/TechDraw/TechDrawTools/Gui/TaskMoveView.ui")
|
||||
self.form = Gui.PySideUic.loadUi(self._uiPath)
|
||||
|
||||
self.form.setWindowTitle(translate("TechDraw_ShareView", "Share View with another Page"))
|
||||
self.form.setWindowTitle(translate("TechDraw_ShareView", "Share View With Another Page"))
|
||||
self.form.lViewName.setText(translate("TechDraw_ShareView", "View to share"))
|
||||
|
||||
self.form.pbView.clicked.connect(self.pickView)
|
||||
@@ -77,7 +77,7 @@ class TaskShareView:
|
||||
_dlgPath = os.path.join(_dlgPath, "Mod/TechDraw/TechDrawTools/Gui/DlgPageChooser.ui")
|
||||
dlg = Gui.PySideUic.loadUi(_dlgPath)
|
||||
self.dialogOpen = True
|
||||
dlg.lPrompt.setText(translate("TechDraw_ShareView", "Select View to share from list."))
|
||||
dlg.lPrompt.setText(translate("TechDraw_ShareView", "Select view to share from list."))
|
||||
dlg.setWindowTitle(translate("TechDraw_ShareView", "Select View"))
|
||||
|
||||
views = [x for x in App.ActiveDocument.Objects if x.isDerivedFrom("TechDraw::DrawView")]
|
||||
@@ -100,7 +100,7 @@ class TaskShareView:
|
||||
_dlgPath = os.path.join(_dlgPath, "Mod/TechDraw/TechDrawTools/Gui/DlgPageChooser.ui")
|
||||
dlg = Gui.PySideUic.loadUi(_dlgPath)
|
||||
self.dialogOpen = True
|
||||
dlg.lPrompt.setText(translate("TechDraw_ShareView", "Select From Page."))
|
||||
dlg.lPrompt.setText(translate("TechDraw_ShareView", "Select from page."))
|
||||
dlg.setWindowTitle(translate("TechDraw_ShareView", "Select Page"))
|
||||
|
||||
pages = [x for x in App.ActiveDocument.Objects if x.isDerivedFrom("TechDraw::DrawPage")]
|
||||
@@ -124,7 +124,7 @@ class TaskShareView:
|
||||
_dlgPath = os.path.join(_dlgPath, "Mod/TechDraw/TechDrawTools/Gui/DlgPageChooser.ui")
|
||||
dlg = Gui.PySideUic.loadUi(_dlgPath)
|
||||
self.dialogOpen = True
|
||||
dlg.lPrompt.setText(translate("TechDraw_ShareView", "Select To Page."))
|
||||
dlg.lPrompt.setText(translate("TechDraw_ShareView", "Select to page."))
|
||||
dlg.setWindowTitle(translate("TechDraw_ShareView", "Select Page"))
|
||||
|
||||
pages = [x for x in App.ActiveDocument.Objects if x.isDerivedFrom("TechDraw::DrawPage")]
|
||||
|
||||
Reference in New Issue
Block a user