Another approach to assembly solver (A2plus)
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- manuelkrause
- Posts: 442
- Joined: Thu Jul 05, 2018 7:16 pm
Re: Another approach to assembly solver (A2plus)
@kbwbe:
Can you please, with your next commits, fix the wrong "print" without brackets?
And this other one in devel-branch:
-> inconsistent use of tabs and spaces in indentation (a2p_rigid.py, line 172)
@wandererfan:
Thank you for taking care of the visibility of PartContainers!
I've tested it across a chain of subassemblies, and when properly updating imported parts in the intermediate subassemblies everything remains consistent (visible/invisible as selected in the very first .fcstd part).
Very good work indeed, thank you!
Best regards, Manuel
Can you please, with your next commits, fix the wrong "print" without brackets?
And this other one in devel-branch:
-> inconsistent use of tabs and spaces in indentation (a2p_rigid.py, line 172)
@wandererfan:
Thank you for taking care of the visibility of PartContainers!
I've tested it across a chain of subassemblies, and when properly updating imported parts in the intermediate subassemblies everything remains consistent (visible/invisible as selected in the very first .fcstd part).
Very good work indeed, thank you!
Best regards, Manuel
Re: Another approach to assembly solver (A2plus)
Did you find false prints in "devel" branch ? If yes, where ?manuelkrause wrote: ↑Wed Aug 15, 2018 11:29 am Can you please, with your next commits, fix the wrong "print" without brackets?
If you found them in branch "turro-dof-3", then @Turro75 should fix this within his PR's.
Otherwise i have to redo this after each merge.
I fixed it in devel branch...manuelkrause wrote: ↑Wed Aug 15, 2018 11:29 am And this other one in devel-branch:
-> inconsistent use of tabs and spaces in indentation (a2p_rigid.py, line 172)
KBWBE
https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
- manuelkrause
- Posts: 442
- Joined: Thu Jul 05, 2018 7:16 pm
Re: Another approach to assembly solver (A2plus)
It's line 287 in a2p_importpart.py:kbwbe wrote: ↑Wed Aug 15, 2018 12:15 pmDid you find false prints in "devel" branch ? If yes, where ?manuelkrause wrote: ↑Wed Aug 15, 2018 11:29 am Can you please, with your next commits, fix the wrong "print" without brackets?
If you found them in branch "turro-dof-3", then @Turro75 should fix this within his PR's.
Otherwise i have to redo this after each merge.
I fixed it in devel branch...manuelkrause wrote: ↑Wed Aug 15, 2018 11:29 am And this other one in devel-branch:
-> inconsistent use of tabs and spaces in indentation (a2p_rigid.py, line 172)
print "imported Object is empty/none"
Re: Another approach to assembly solver (A2plus)
Fixed in "devel" branch.manuelkrause wrote: ↑Wed Aug 15, 2018 12:21 pm It's line 287 in a2p_importpart.py:
print "imported Object is empty/none"
KBWBE
https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
- manuelkrause
- Posts: 442
- Joined: Thu Jul 05, 2018 7:16 pm
Re: Another approach to assembly solver (A2plus)
Thank you!
Now I'm only waiting for your fix for "recalculating the refPointsBoundBoxSize when calculating the spincenter"...
(Edited wrong copy/paste)
Last edited by manuelkrause on Wed Aug 15, 2018 4:05 pm, edited 1 time in total.
- manuelkrause
- Posts: 442
- Joined: Thu Jul 05, 2018 7:16 pm
Re: Another approach to assembly solver (A2plus)
@kbwbe:
I hope you allow me some nitpicking before going for release...
IMO two points should be fixed therefore:
* Cannot find icon: preferences-a2plus
Group icon for preferences-a2plus is not of size 96x96
* When using "Edit imported part" and the imported part is a subassemby it fails and gives the following in Report view:
Running the Python command 'a2p_editImportedPart' failed:
Traceback (most recent call last):
File "/home/manuel/.FreeCAD/Mod/A2plus/a2p_importpart.py", line 458, in Activated
obj = selection[0]
list index out of range
EDIT:
Sorry, I was too fast...
It does NOT fail!!!
It only spits out the mentioned error message.
/EDIT
Regards
I hope you allow me some nitpicking before going for release...
IMO two points should be fixed therefore:
* Cannot find icon: preferences-a2plus
Group icon for preferences-a2plus is not of size 96x96
* When using "Edit imported part" and the imported part is a subassemby it fails and gives the following in Report view:
Running the Python command 'a2p_editImportedPart' failed:
Traceback (most recent call last):
File "/home/manuel/.FreeCAD/Mod/A2plus/a2p_importpart.py", line 458, in Activated
obj = selection[0]
list index out of range
EDIT:
Sorry, I was too fast...
It does NOT fail!!!
It only spits out the mentioned error message.
/EDIT
Regards
- manuelkrause
- Posts: 442
- Joined: Thu Jul 05, 2018 7:16 pm
Re: Another approach to assembly solver (A2plus)
@kbwbe:
Just forget the last point... It only happens, when having another part in the foreground and using "Edit" on a non activated assembly part in Tree view -- what is quite logical.
Sorry for the noise.
Just forget the last point... It only happens, when having another part in the foreground and using "Edit" on a non activated assembly part in Tree view -- what is quite logical.
Sorry for the noise.
Re: Another approach to assembly solver (A2plus)
@wandererfan,manuelkrause wrote: ↑Wed Aug 15, 2018 2:29 pm @kbwbe:
* Cannot find icon: preferences-a2plus
Group icon for preferences-a2plus is not of size 96x96
need your help. I do not get the .ui-file working regarding the icon for preferences page. Is there a trick ??
This happens, if you try to edit a part but you don't have selected one.manuelkrause wrote: ↑Wed Aug 15, 2018 2:29 pm * When using "Edit imported part" and the imported part is a subassemby it fails and gives the following in Report view:
Running the Python command 'a2p_editImportedPart' failed:
Traceback (most recent call last):
File "/home/manuel/.FreeCAD/Mod/A2plus/a2p_importpart.py", line 458, in Activated
obj = selection[0]
list index out of range
It is fixed on "devel" branch. Now you get a console warning.
KBWBE
https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
Re: Another approach to assembly solver (A2plus)
@Turro75,
i need your help.
How can i do a function like that:
booleanResult = rigid.isFullConstrainedTo(anotherRigid) ?
i need your help.
How can i do a function like that:
booleanResult = rigid.isFullConstrainedTo(anotherRigid) ?
KBWBE
https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
Re: Another approach to assembly solver (A2plus)
The function below does nearly what You need, it checks if tempfixed linked obj fully constraint the rigid.
Code: Select all
def linkedTempFixedDOF(self):
self.pointConstraints = []
_dofPos = a2p_libDOF.initPosDOF
_dofRot = a2p_libDOF.initRotDOF
self.reorderDependencies()
if not self.tempfixed:
if len(self.dependencies) > 0:
for x in self.dependencies:
if x.dependedRigid.tempfixed:
_dofPos, _dofRot = x.calcDOF(_dofPos,_dofRot, self.pointConstraints)
return len(_dofPos) + len(_dofRot)
Just be sure that point constraint deps are evaluated as last, reorderdependency does this.
This is taken from a2p_rigid in turro dof 3