Skip to content

Commit

Permalink
Merge pull request #259 from Zolko-123/development
Browse files Browse the repository at this point in the history
v0.11.3
  • Loading branch information
Zolko-123 authored Oct 9, 2021
2 parents 758a1ad + 35b7510 commit 1a68b6e
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 812 deletions.
5 changes: 3 additions & 2 deletions Asm4_libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -797,8 +797,9 @@ def getSelectedVarLink():
if len(selection)==1:
selObj = selection[0]
# it's an App::Link
if selObj.TypeId=='Part::FeaturePython' and selObj.Type=='Asm4::VariantLink':
retval = selObj
if selObj.TypeId=='Part::FeaturePython':
if hasattr(selObj,'Type') and selObj.Type=='Asm4::VariantLink':
retval = selObj
return retval

def getSelectedDatum():
Expand Down
36 changes: 16 additions & 20 deletions InitGui.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ def Initialize(self):
self.appendMenu(QT_TRANSLATE_NOOP("Workbench", "&Assembly"), self.assemblyMenuItems())
self.dot()

# put all constraints related commands in a sperate menu
self.appendMenu("&Constraints",self.constraintsMenuItems())
self.dot()

# self.appendMenu("&Geometry",["Asm4_newPart"])

# additional entry in the Help menu
Expand Down Expand Up @@ -196,24 +200,15 @@ def assemblyMenuItems(self):
"Asm4_newSketch",
'Asm4_createDatum',
self.FastenersCmd,
#"Asm4_newLCS",
#"Asm4_newPlane",
#"Asm4_newAxis",
#"Asm4_newPoint",
#"Asm4_newHole",
"Separator",
"Asm4_insertLink",
"Asm4_placeLink",
"Asm4_releaseAttachment",
"Asm4_mirrorPart",
"Asm4_circularArray",
"Asm4_variantLink",
"Separator",
"Asm4_placeFastener",
"Asm4_cloneFastenersToAxes",
"Asm4_importDatum",
"Asm4_shapeBinder",
#"Asm4_placeDatum",
"Separator",
"Asm4_infoPart",
"Asm4_makeBOM",
Expand All @@ -222,14 +217,19 @@ def assemblyMenuItems(self):
'Asm4_hideLcs',
"Asm4_addVariable",
"Asm4_delVariable",
#"Asm4_applyConfiguration",
"Asm4_openConfigurations",
#'Asm4_saveConfiguration',
#'Asm4_newConfiguration',
"Asm4_Animate",
"Asm4_updateAssembly"]
"Asm4_updateAssembly",
]
return commandList


def constraintsMenuItems(self):
commandList = [ "Asm4_placeLink",
"Asm4_releaseAttachment",
"Separator",
]
return commandList

def assemblyToolbarItems(self):
commandList = [ "Asm4_makeAssembly",
"Asm4_newPart",
Expand All @@ -246,9 +246,7 @@ def assemblyToolbarItems(self):
"Separator",
"Asm4_placeLink",
"Asm4_releaseAttachment",
'Asm4_placeFastener',
#'Asm4_cloneFastenersToAxes',
#"Asm4_placeDatum",
"Separator",
"Asm4_mirrorPart",
"Asm4_circularArray",
"Asm4_variantLink",
Expand Down Expand Up @@ -289,12 +287,10 @@ def ContextMenu(self, recipient):
'Asm4_showLcs' ,
'Asm4_hideLcs' ]
# commands to appear in the 'Assembly' sub-menu in the contextual menu (right-click)
assemblySubMenu =[ "Asm4_insertLink" ,
assemblySubMenu =[ "Asm4_insertLink" ,
"Asm4_placeLink" ,
"Asm4_importDatum" ,
'Asm4_FSparameters' ,
'Asm4_placeFastener' ,
'Asm4_cloneFastenersToAxes' ,
'Separator' ,
'Asm4_applyConfiguration']
# commands to appear in the 'Create' sub-menu in the contextual menu (right-click)
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# FreeCAD Assembly 4 workbench

Current version 0.11.2
Current version 0.11.3



Expand Down Expand Up @@ -52,6 +52,10 @@ You can get more information in the [user instructions](INSTRUCTIONS.md), the [t

## Release notes

* 2021.10.09 (**0.11.3**) :
Merged all placement of parts (links, fasteners, anything with a "Placement" into a single command, which launches the corresponding task UI
Created the "Constraints" menu and moved the placement command there (in preparation of the merge of the A2+ solver)

* 2021.10.08 (**0.11.2**) :
added "Open File" to insertLink
BOM and infoPart improvements
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Assembly 4 Workbench for FreeCAD
v0.11.2
v0.11.3



Loading

0 comments on commit 1a68b6e

Please sign in to comment.