Skip to content

Commit

Permalink
Merge pull request #220 from kbwbe/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
kbwbe authored Feb 17, 2019
2 parents 95d20b4 + 9582802 commit 36ee052
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 42 deletions.
15 changes: 9 additions & 6 deletions GuiA2p/Resources/ui/a2p_prefs.ui
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<item>
<widget class="Gui::PrefCheckBox" name="checkBox_6">
<property name="text">
<string>Show constraints on toolbar</string>
<string>Show constraints in toolbar</string>
</property>
<property name="checked">
<bool>true</bool>
Expand Down Expand Up @@ -105,7 +105,7 @@
<item>
<widget class="Gui::PrefCheckBox" name="checkBox_5">
<property name="text">
<string>Enable recursive update of imported parts (process all subassemblies)</string>
<string>Enable recursive update of imported parts</string>
</property>
<property name="prefEntry" stdset="0">
<cstring>enableRecursiveUpdate</cstring>
Expand All @@ -131,7 +131,7 @@
<item>
<widget class="Gui::PrefCheckBox" name="checkBox_7">
<property name="text">
<string>Inherit per face transparency from parts and sub-assemblies (experimental)</string>
<string>Inherit per face transparency from parts and subassemblies (experimental)</string>
</property>
<property name="prefEntry" stdset="0">
<cstring>usePerFaceTransparency</cstring>
Expand All @@ -144,7 +144,7 @@
<item>
<widget class="Gui::PrefCheckBox" name="checkBox_8">
<property name="text">
<string>Do not import invisible shapes (use with caution, can break assemblies)</string>
<string>Do not import invisible shapes (for expert users)</string>
</property>
<property name="prefEntry" stdset="0">
<cstring>doNotImportInvisibleShapes</cstring>
Expand Down Expand Up @@ -320,8 +320,11 @@
</item>
<item>
<widget class="Gui::PrefRadioButton" name="radioButton_5">
<property name="toolTip">
<string>Specify the project folder in the field below</string>
</property>
<property name="text">
<string>Use project-folder, all files are below this</string>
<string>All files are in this project folder:</string>
</property>
<property name="prefEntry" stdset="0">
<cstring>useProjectFolder</cstring>
Expand Down Expand Up @@ -391,7 +394,7 @@
<item>
<widget class="Gui::PrefCheckBox" name="checkBox">
<property name="text">
<string>Solve automatically if a constraints property is changed</string>
<string>Solve automatically if a constraint property is changed</string>
</property>
<property name="checked">
<bool>true</bool>
Expand Down
2 changes: 1 addition & 1 deletion a2p_MuxAssembly.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ class a2p_SimpleAssemblyShapeCommand():
def GetResources(self):
import a2plib
return {'Pixmap' : a2plib.path_a2p +'/icons/a2p_SimpleAssemblyShape.svg',
'MenuText': "Create or refresh simple shape of complete Assembly",
'MenuText': "Create or refresh simple shape of complete assembly",
'ToolTip': toolTip
}

Expand Down
8 changes: 4 additions & 4 deletions a2p_constraintDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def initUI(self):

self.flipDirectionButton = QtGui.QPushButton(self)
self.flipDirectionButton.setIcon(QtGui.QIcon(':/icons/a2p_FlipConstraint.svg'))
self.flipDirectionButton.setText("Flip Dir.")
self.flipDirectionButton.setText("Flip direction")
self.flipDirectionButton.setFixedHeight(32)
QtCore.QObject.connect(self.flipDirectionButton, QtCore.SIGNAL("clicked()"), self.flipDirection)
self.mainLayout.addWidget(self.flipDirectionButton,self.lineNo,2)
Expand Down Expand Up @@ -194,19 +194,19 @@ def initUI(self):
self.deleteButton = QtGui.QPushButton(self.buttonPanel)
self.deleteButton.setFixedHeight(32)
self.deleteButton.setIcon(QtGui.QIcon(':/icons/a2p_DeleteConnections.svg')) #need new Icon
self.deleteButton.setToolTip("delete this constraint")
self.deleteButton.setToolTip("Delete this constraint")
self.deleteButton.setText("Delete this constraint")

self.solveButton = QtGui.QPushButton(self.buttonPanel)
self.solveButton.setFixedHeight(32)
self.solveButton.setIcon(QtGui.QIcon(':/icons/a2p_Solver.svg'))
self.solveButton.setToolTip("solve Constraints")
self.solveButton.setToolTip("Solve constraints")
self.solveButton.setText("Solve")

self.acceptButton = QtGui.QPushButton(self.buttonPanel)
self.acceptButton.setFixedHeight(32)
self.acceptButton.setIcon(QtGui.QIcon(':/icons/a2p_CheckAssembly.svg')) #need new Icon
self.acceptButton.setToolTip("solve Constraints")
self.acceptButton.setToolTip("Solve constraints")
self.acceptButton.setText("Accept")
#self.acceptButton.setDefault(True)

Expand Down
16 changes: 8 additions & 8 deletions a2p_constraintcommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def IsActive(self):
def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_PointIdentity.svg',
'MenuText': 'Add PointIdentity Constraint',
'MenuText': 'Add pointIdentity constraint',
'ToolTip': a2p_constraints.PointIdentityConstraint.getToolTip()
}

Expand All @@ -78,7 +78,7 @@ def IsActive(self):
def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_PointOnLineConstraint.svg',
'MenuText': 'Add PointOnLine constraint',
'MenuText': 'Add pointOnLine constraint',
'ToolTip': a2p_constraints.PointOnLineConstraint.getToolTip()
}

Expand All @@ -104,7 +104,7 @@ def IsActive(self):
def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_PointOnPlaneConstraint.svg',
'MenuText': 'Add PointOnPlane constraint',
'MenuText': 'Add pointOnPlane constraint',
'ToolTip': a2p_constraints.PointOnPlaneConstraint.getToolTip()
}

Expand All @@ -129,7 +129,7 @@ def IsActive(self):
def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_SphericalSurfaceConstraint.svg',
'MenuText': 'Add a spherical constraint',
'MenuText': 'Add sphereCenterIdent constraint',
'ToolTip': a2p_constraints.SphericalConstraint.getToolTip()
}

Expand All @@ -154,7 +154,7 @@ def IsActive(self):
def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_CircularEdgeConstraint.svg' ,
'MenuText': 'Add circular edge connection',
'MenuText': 'Add circularEdge constraint',
'ToolTip': a2p_constraints.CircularEdgeConstraint.getToolTip()
}

Expand All @@ -179,7 +179,7 @@ def IsActive(self):
def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_AxialConstraint.svg',
'MenuText': 'Add axial constraint',
'MenuText': 'Add axis Coincident constraint',
'ToolTip': a2p_constraints.AxialConstraint.getToolTip()
}

Expand Down Expand Up @@ -279,7 +279,7 @@ def IsActive(self):
def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_PlaneCoincidentConstraint.svg',
'MenuText': 'Add plane constraint',
'MenuText': 'Add planeCoincident constraint',
'ToolTip': a2p_constraints.PlaneConstraint.getToolTip()
}

Expand All @@ -305,7 +305,7 @@ def IsActive(self):
def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_AngleConstraint.svg',
'MenuText': 'Add angleBetweenPlanes constraint',
'MenuText': 'Add angledPlanes constraint',
'ToolTip': a2p_constraints.AngledPlanesConstraint.getToolTip()
}

Expand Down
40 changes: 19 additions & 21 deletions a2p_importpart.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def importPartFromFile(_doc, filename, importToCache=False):
ImportGui.insert(filename,newname)
importDoc = FreeCAD.ActiveDocument
else:
msg = "A part can only be imported from a FreeCAD '*.fcstd' file"
msg = "A part can only be imported from a FreeCAD '*.FCStd' file"
QtGui.QMessageBox.information( QtGui.QApplication.activeWindow(), "Value Error", msg )
return

Expand Down Expand Up @@ -245,7 +245,7 @@ class a2p_ImportPartCommand():
def GetResources(self):
return {'Pixmap' : a2plib.pathOfModule()+'/icons/a2p_ImportPart.svg',
'Accel' : "Shift+A", # a default shortcut (optional)
'MenuText': "Add a Part from an external file",
'MenuText': "Add a part from an external file",
'ToolTip' : toolTip
}

Expand Down Expand Up @@ -554,7 +554,7 @@ def Activated(self):
def GetResources(self):
return {
'Pixmap' : a2plib.pathOfModule()+'/icons/a2p_DuplicatePart.svg',
'MenuText': 'Make a duplicate of a part',
'MenuText': 'Create duplicate of a part',
'ToolTip': toolTip
}

Expand Down Expand Up @@ -680,7 +680,7 @@ def Activated(self):
def GetResources(self):
return {
'Pixmap' : a2plib.pathOfModule()+'/icons/a2p_EditPart.svg',
'MenuText': 'Edit an imported Part (open linked fcstd file)',
'MenuText': 'Edit an imported part (open linked FCStd file)',
'ToolTip': toolTip
}

Expand Down Expand Up @@ -822,7 +822,7 @@ def Activated(self):
QtGui.QMessageBox.critical(
QtGui.QApplication.activeWindow(),
"Selection Error",
"Select exactly 1 Part")
"Select exactly 1 part")
return
part = selection[0]
deleteList = []
Expand Down Expand Up @@ -1003,7 +1003,7 @@ def Activated(self):
def GetResources(self):
return {
'Pixmap' : a2plib.pathOfModule()+'/icons/a2p_Isolate_Element.svg',
'MenuText': 'Show only selected elements, or all if none is selected',
'MenuText': 'Show only selected elements or all if none is selected',
'ToolTip': toolTip
}

Expand Down Expand Up @@ -1036,7 +1036,7 @@ def GetResources(self):
return {
'Pixmap' : a2plib.pathOfModule()+'/icons/a2p_ToggleTransparency.svg',
'MenuText': 'Toggle transparency of assembly',
'ToolTip': 'Toggle transparency of assembly',
'ToolTip': 'Toggles transparency of assembly',
'Checkable': self.IsChecked()
}
FreeCADGui.addCommand('a2p_ToggleTransparencyCommand', a2p_ToggleTransparencyCommand())
Expand Down Expand Up @@ -1068,7 +1068,7 @@ def IsChecked(self):
def GetResources(self):
return {
'Pixmap' : a2plib.pathOfModule()+'/icons/a2p_ToggleAutoSolve.svg',
'MenuText': 'Toggle AutoSolve',
'MenuText': 'Toggle auto solve',
'ToolTip': toolTipMessage,
'Checkable': self.IsChecked()
}
Expand All @@ -1087,8 +1087,8 @@ def IsChecked(self):
def GetResources(self):
return {
'Pixmap' : a2plib.pathOfModule()+'/icons/a2p_TogglePartial.svg',
'MenuText': 'toggle partial processing',
'ToolTip': 'toggle partial processing',
'MenuText': 'Toggle partial processing',
'ToolTip': 'Toggles partial processing',
'Checkable': self.IsChecked()
}
FreeCADGui.addCommand('a2p_TogglePartialProcessingCommand', a2p_TogglePartialProcessingCommand())
Expand Down Expand Up @@ -1119,7 +1119,7 @@ def Activated(self):
def GetResources(self):
return {
'Pixmap' : a2plib.pathOfModule()+'/icons/a2p_RepairTree.svg',
'MenuText': 'Repair the treeView, if it is damaged somehow',
'MenuText': 'Repair the tree view if it is somehow damaged',
'ToolTip': toolTipMessage
}
FreeCADGui.addCommand('a2p_repairTreeViewCommand', a2p_repairTreeViewCommand())
Expand All @@ -1130,11 +1130,9 @@ def GetResources(self):
If the last constraint, which has
been defined, has a property
'direction', it's value will be
'direction', its value will be
toggled between 'aligned' and
'opposed'
(alignment of axis's)
'opposed' (alignment of axis)
'''


Expand Down Expand Up @@ -1200,7 +1198,7 @@ def GetResources(self):
return {
'Pixmap' : a2plib.pathOfModule()+'/icons/a2p_Treeview.svg',
'MenuText': 'Generate HTML file with detailed constraining structure',
'ToolTip': 'Generate HTML file with detailed constraining structure'
'ToolTip': 'Generates HTML file with detailed constraining structure'
}
FreeCADGui.addCommand('a2p_Show_Hierarchy_Command', a2p_Show_Hierarchy_Command())

Expand All @@ -1222,7 +1220,7 @@ def GetResources(self):
return {
'Pixmap' : a2plib.pathOfModule()+'/icons/a2p_DOFs.svg',
'MenuText': 'Print detailed DOF information to console',
'ToolTip': 'Print detailed DOF information to console'
'ToolTip': 'Prints detailed DOF information to console'
}
FreeCADGui.addCommand('a2p_Show_DOF_info_Command', a2p_Show_DOF_info_Command())

Expand Down Expand Up @@ -1256,8 +1254,8 @@ def Activated(self):
def GetResources(self):
return {
'Pixmap' : a2plib.pathOfModule()+'/icons/a2p_SetRelativePathes.svg',
'MenuText': 'Convert absolute paths of importParts to relative ones',
'ToolTip': 'Convert absolute paths of importParts to relative ones'
'MenuText': 'Convert absolute paths of imported parts to relative ones',
'ToolTip': 'Converts absolute paths of imported parts to relative ones'
}
FreeCADGui.addCommand('a2p_absPath_to_relPath_Command', a2p_absPath_to_relPath_Command())

Expand Down Expand Up @@ -1372,12 +1370,12 @@ def importUpdateConstraintSubobjects( doc, oldObject, newObject ):
for cName in deletionList:

flags = QtGui.QMessageBox.StandardButton.Yes | QtGui.QMessageBox.StandardButton.Abort
message = "constraint %s is broken. Delete constraint? otherwise check for wrong linkage." % cName
message = "Constraint %s is broken. Delete constraint? Otherwise check for wrong linkage." % cName
#response = QtGui.QMessageBox.critical(QtGui.qApp.activeWindow(), "Broken Constraint", message, flags )
response = QtGui.QMessageBox.critical(None, "Broken Constraint", message, flags )

if response == QtGui.QMessageBox.Yes:
FreeCAD.Console.PrintError("removing constraint %s" % cName)
FreeCAD.Console.PrintError("Removing constraint %s" % cName)
c = doc.getObject(cName)
a2plib.removeConstraint(c)

Expand Down
4 changes: 2 additions & 2 deletions a2p_solversystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,8 @@ def Activated(self):
def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_Solver.svg',
'MenuText': 'Solve',
'ToolTip': 'Solve A2plus constraints'
'MenuText': 'Solve constraints',
'ToolTip': 'Solves constraints'
}

FreeCADGui.addCommand('a2p_SolverCommand', a2p_SolverCommand())
Expand Down

0 comments on commit 36ee052

Please sign in to comment.