A2Plus part placement
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
A2Plus part placement
Hi All,
How do I move parts in A2Plus so that they line up exactly where they need to be so I can start constraining their movements?
How do I move parts in A2Plus so that they line up exactly where they need to be so I can start constraining their movements?
- Attachments
-
- test.FCStd
- (11 KiB) Downloaded 46 times
Re: A2Plus part placement
Is this what you are trying to do?
The constraint icons shown in the tree should help.
Click back of shaft, CTRL then front of disk, click on the constraint illuminated on bar, same with pin/pegs click on diameter CTRL plus hole diameter then select illuminated constraint icon.
The constraint icons shown in the tree should help.
Click back of shaft, CTRL then front of disk, click on the constraint illuminated on bar, same with pin/pegs click on diameter CTRL plus hole diameter then select illuminated constraint icon.
- Attachments
-
- Test XX.JPG (147.67 KiB) Viewed 2610 times
Re: A2Plus part placement
Hi Un1corn,
That would have been my next question if I couldn't figure it out.
It is kind of in the positions I want, but I can't get them where I want. That was my original question.
How did you move them into their correct places?
That would have been my next question if I couldn't figure it out.
It is kind of in the positions I want, but I can't get them where I want. That was my original question.
How did you move them into their correct places?
Re: A2Plus part placement
You dont move them. The assembly solver moves them. You create a constraint that says "this circle should be coplanar to this plane", "this circles should be concentric to this circle",... and the solver moves things around until all constraints are fulfilled.
Re: A2Plus part placement
Moved to Assembly subforum.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: A2Plus part placement
Well, I was able to move all the parts to their correct position, thanks to Kisolre.
But now I don't know how to make them move in unison to test if the parts work together (I know they do - but remember, this is a test).
Do I use A2Plus or Animation to do this?
But now I don't know how to make them move in unison to test if the parts work together (I know they do - but remember, this is a test).
Do I use A2Plus or Animation to do this?
- Attachments
-
- test.FCStd
- (13.15 KiB) Downloaded 45 times
Re: A2Plus part placement
Sounds rather like a call for animation workbench. I don't know how that workbench interacts with assemblies, but it is worth a try. Please note that there is no collision detection.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: A2Plus part placement
While A2P is not designed to be an assembly animation workbench, using some Python it can produce (slow but stable) animations using the solver as per Klaus' example https://forum.freecadweb.org/viewtopic. ... 30#p290004
I've just tested it successfully using V0.4.26b of the Wb with :
OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18234 (Git)
Build type: Release
Branch: master
Hash: 3af5d97e9b2a60823815f662aba25422c4bc45bb
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)
I've just tested it successfully using V0.4.26b of the Wb with :
OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18234 (Git)
Build type: Release
Branch: master
Hash: 3af5d97e9b2a60823815f662aba25422c4bc45bb
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)
Re: A2Plus part placement
Hi Syres, I've downloaded Klaus' example but can't highlight the constraints to see how they work - so I can only guess where the circularEdge and pointOnPlane constraints are. Is there any way to visualise what's going on (apart from looking at the animation)?
I've never written in python, but it seems I need to write a new macro for every assembly - any suggestions where I should start?
And ChrisB, is there a module that I can use for collision detection within python?
I've never written in python, but it seems I need to write a new macro for every assembly - any suggestions where I should start?
And ChrisB, is there a module that I can use for collision detection within python?
Re: A2Plus part placement
You can click on the constraint and select Highlight both constrained parts from the A2Plus menu (magnifying glass icon) which will show a green line on the edge in the case of circularEdge_002_bearing-ref_001 but you will need to look in the Data tab for the definitive edge numbers. So for example, the circularEdge_002_bearing-ref_001 is defined as star-wheel_001 Edge12 (sub Element1) to bearing-ref_001 Edge 21 (Sub Element2)
I thought this example was as simple and close to your requirements with regard to the Python. I would expect you can take a copy of the simulation.py and just change line 20
to reflect the label (name) of your wheel/crank.
I thought this example was as simple and close to your requirements with regard to the Python. I would expect you can take a copy of the simulation.py and just change line 20
Code: Select all
sw = doc.getObject("star_wheel_001")