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!
Re: Another approach to assembly solver (A2plus)
Don't worry, I just found the error.
The name of the file was : Coupole supérieur, and when I rename the file as Coupole Superieur, ( no accent on e form superieur), all is correct.
Three hours to find this error ....
Conclusion: No accent in the name of the file for A2plus.
Best regard
The name of the file was : Coupole supérieur, and when I rename the file as Coupole Superieur, ( no accent on e form superieur), all is correct.
Three hours to find this error ....
Conclusion: No accent in the name of the file for A2plus.
Best regard
Re: Another approach to assembly solver (A2plus)
Hello
I would like to know, if is it possible to add an assembly do with A2plus, to a body of Part Design, and then to use this assembly like a part of FreeCAD.
My problem is to do and hole between all the assembly.
Best regard.
I would like to know, if is it possible to add an assembly do with A2plus, to a body of Part Design, and then to use this assembly like a part of FreeCAD.
My problem is to do and hole between all the assembly.
Best regard.
Re: Another approach to assembly solver (A2plus)
Hi jbe,
In standard mode this will probably cause problems. A2+ tries to generate solids. But often this is not possible and the resulting assembly will be a shell. If this happens, you cannot do holes through it.
But you can activate the option "use solid union..." in preferences. With this option, all parts are "fused" to a solid and you can use the assembly as base feature for a part design body. Part Design will work as long as there are no gaps between the parts. It requires one continous solid. If Part Design fails due to this, you could work with the Part WB to do your holes.
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)
Hi All,
I made a small modification on partslibrary macro, now it runs in my system (details below).
I changed the behavior of double click, now it imports files as a2p objects.
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16117 (Git)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: dbb4cc6415bac848a294f03b80f65e888d531742
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Italian/Italy (it_IT)
I made a small modification on partslibrary macro, now it runs in my system (details below).
I changed the behavior of double click, now it imports files as a2p objects.
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16117 (Git)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: dbb4cc6415bac848a294f03b80f65e888d531742
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Italian/Italy (it_IT)
- Attachments
-
- PartsLibrary.FCMacro
- (17.09 KiB) Downloaded 51 times
Re: Another approach to assembly solver (A2plus)
Hi,
I'm trying to hole 2 parts after their assembly.
I use bodies cloned for do that.
But the second part seems not be an expected behavior: it don't move if I change the first part (the bloc start).
Here my files. Change the BlocDépart 's pocket position to check out that.
...
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18644 (Git)
Build type: Release
Branch: master
Hash: 481870be2b48ef95b59acf1440b069d42b6fad23
Python version: 3.6.7
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
I'm trying to hole 2 parts after their assembly.
I use bodies cloned for do that.
But the second part seems not be an expected behavior: it don't move if I change the first part (the bloc start).
Here my files. Change the BlocDépart 's pocket position to check out that.
...
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18644 (Git)
Build type: Release
Branch: master
Hash: 481870be2b48ef95b59acf1440b069d42b6fad23
Python version: 3.6.7
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
- Attachments
-
- PièceFixée.FCStd
- (9.45 KiB) Downloaded 55 times
-
- BlocDépart.FCStd
- (14.69 KiB) Downloaded 55 times
-
- assemby_drilled.FCStd
- (35.5 KiB) Downloaded 49 times
-
- Capture.PNG (93.52 KiB) Viewed 2293 times
Re: Another approach to assembly solver (A2plus)
Hi @GlouGlou,
usually it is no good idea to mix up work with A2plus and other workbenches in one file.
Problem 1 here: After cloning, the clone get's an independent (decoupled) placement of its original. If the original is moved, the clone is not. As the A2plus constraints are only operating at the originals, the clones are not moved accordingly.
Problem 2: I tried to follow your hints and moved the pocket in the block depart. When updating the assembly, the sketches in "body def drill" jumped to false positions. For sure some toponaming issue. See here:
. .
It would be better, if you do such a small assembly completey with the PartDesign WB. If you need it later in a bigger assembly, you can import it complete or only single part of it to a main assembly.
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)
thanks for that. It's a try to modify an assembly afterward.
https://forum.freecadweb.org/viewtopic.php?f=12&t=40353
https://forum.freecadweb.org/viewtopic.php?f=12&t=40353
Re: Another approach to assembly solver (A2plus)
A2plus Workbench wiki page doesn't have a Scripting section on the wiki. Can we start to document scripting in A2plus ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Another approach to assembly solver (A2plus)
Bump.Kunda1 wrote: ↑Sun Nov 03, 2019 5:52 pm A2plus Workbench wiki page doesn't have a Scripting section on the wiki. Can we start to document scripting in A2plus ?
Reason: users aren't aware it's possible to animate assemblies. See https://forum.freecadweb.org/viewtopic. ... 11#p348308
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Another approach to assembly solver (A2plus)
Kunda1 wrote: ↑Tue Nov 19, 2019 12:52 pm Reason: users aren't aware it's possible to animate assemblies. See https://forum.freecadweb.org/viewtopic. ... 11#p348308
The script is pretty simpledcapeletti wrote: ↑Mon May 20, 2019 11:37 pm I made an engine and assembly with some parts and a script to run the animation. You can see the gif and the repository of the project.
https://gitlab.com/dcapeletti/ejercicio ... A2Plus.gif
https://gitlab.com/dcapeletti/ejercicio ... %20tiempos
Code: Select all
from a2p_solversystem import SolverSystem
import time
import FreeCADGui
class Motor():
def __init__(self):
self.angulo = 0
self.solver = SolverSystem()
def iniciar_animacion(self):
for val in range(0, 90):
self.angulo = val*4
FreeCAD.ActiveDocument.b_Ciguenal_001_.Placement = App.Placement(App.Vector(0,0,0),App.Rotation(App.Vector(0,0,1),self.angulo))
self.solver.solveSystem(App.ActiveDocument)
FreeCADGui.updateGui()
time.sleep(0.01)
def stop(self):
self.angulo = 0
FreeCAD.ActiveDocument.b_Ciguenal_001_.Placement = App.Placement(App.Vector(0,0,0),App.Rotation(App.Vector(0,0,1),0))
self.solver.solveSystem(App.ActiveDocument)
motor = Motor()
motor.iniciar_animacion()
# It stops after a while or can be stopped with a method as well
motor.stop()
These are the steps
- It creates a class to encapsulate everything. In this class it creates an instance of A2plus's SolverSystem.
- Then a method is defined to cycle a few times. In this cycle the placement of the body is changed; the change could be in the base placement, in the rotation, or both. In this example it's the angle of rotation the only thing that changes.
- After the change in placement, it solves the system again with solver.solveSytem(App.ActiveDocument).
- Then it updates the graphical interface with FreeCADGui.updateGui()
- Finally, to finish the cycle it makes a tiny pause of 0.01 seconds. This can be changed to control the rate of update of the frames in the animation.
- The animation will stop itself after the number of cycles is completed. However, a method is defined to stop the animation at any time, by resetting the angle of rotation, and solving the system again only once.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.