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)
Here is a demo of updating the part. At the end of the video I show that all of the constraints are still in the assembly.
Dan
Dan
Re: Another approach to assembly solver (A2plus)
Hi,dan-miel wrote: ↑Mon Jul 27, 2020 3:12 amMRx wrote: ↑Sun Jul 26, 2020 5:37 pm I usually remove the constraints and update the objects. After that I'll re-apply the constraints (because just updating the objects doesn't seem to work properly - or in some cases I'm modifying the objects too much).
The problem is if you have a bigger design, there are too many of those popups.
Unzip the file. Copy the directory to you "mod" directory and restart FreeCAD. Right click in the icon rows to add the new buttons to your customized dash.
Dan
I did that. Although my design is a bit big.
I propose to print this message after all the other checks, and not during the check.
I have 126 parts in my design at the moment and many rules it takes quite some time to go through the checks. (the conflictfinder takes > 30 Minutes)
msg = '''
The highlighted parts were not moved. They are
not constrained (also over constraint chains)
to a fixed part!
'''
# QtGui.QMessageBox.information(
# QtGui.QApplication.activeWindow(),
# "Could not move some parts",
# msg
# )
the issues should be collected and displayed at the end, this is just stopping the check and waiting for user input.
I'm not into all that, is there a way to update the script without having to restart FreeCAD?
Re: Another approach to assembly solver (A2plus)
Copy/paste the A2plusupdater file into the mod/A2plusmore folder. The conflictfinder will not run. After the updater runs if there are missing features the viewer will open.
I see that you remarked out Lines 518 - 522. I would need to add code to the solver file which would get wiped out each time a2plus was updated so I try to leave those files alone. That error is created because the two parts are not constrained to a fixed part. I'm not even sure if that is really an error, I think a note at the end would suffice. A lot of times when I get that error I just fix one of the parts.
It would be nice to have this solved at a higher level but I find it to much of a pain to remove all the constraints and redo them so I'm tackling it at this lower level.
I hope this helps.
Dan
- Attachments
-
- A2plusupdater.py
- (22.65 KiB) Downloaded 109 times
Re: Another approach to assembly solver (A2plus)
Hi,
could you allow multiselect for adding some rules? eg. "add a plane coincident constraint"
A direct use case is following:
could you allow multiselect for adding some rules? eg. "add a plane coincident constraint"
A direct use case is following:
-
- Posts: 196
- Joined: Tue Jul 28, 2020 7:31 am
Re: Another approach to assembly solver (A2plus)
There actually is a "planeCooincident constraint" already (a2P v 0.4.47d)
Maybe explain your usage procedure to make it clear of preconditions and outcomes.
Re: Another approach to assembly solver (A2plus)
Yes the feature is there, but it doesn't allow multiselect. It would be very helpful to align all elements at once instead of one after each other.
All elements should depend on the first selected element to be aligned properly.
Another but yet open topic would be the joint between the links but that might be scriptable.
All elements should depend on the first selected element to be aligned properly.
Another but yet open topic would be the joint between the links but that might be scriptable.
-
- Posts: 196
- Joined: Tue Jul 28, 2020 7:31 am
Re: Another approach to assembly solver (A2plus)
Suppose, that multi-select - align. might be possible to solve by adding the CTRL to separate source from target.
Like select multiple sources - press CTRL - select target -> constrain.
And maybe the more required option would be to disable popup: set multiple constraints without having the "Set / solve " constraint popup.
Like select multiple sources - press CTRL - select target -> constrain.
And maybe the more required option would be to disable popup: set multiple constraints without having the "Set / solve " constraint popup.
-
- Posts: 196
- Joined: Tue Jul 28, 2020 7:31 am
Re: Another approach to assembly solver (A2plus)
QUESTION:
In the imported parts there is a property Fixed Position = true/false
In the properties editor it is possible to add new property (or via python scripting)
How to add <Fixed Position = true> property to a sketch, so that A2P solver would consider the position of sketch - fixed??
Would be efficient in A2P to have a constrain-tool-button [AddFixedPositionPropertyToObject]
And also a very needed tool is: Apply <fixedPosition = true> to constrain-positioned parts.
In the imported parts there is a property Fixed Position = true/false
In the properties editor it is possible to add new property (or via python scripting)
How to add <Fixed Position = true> property to a sketch, so that A2P solver would consider the position of sketch - fixed??
Would be efficient in A2P to have a constrain-tool-button [AddFixedPositionPropertyToObject]
And also a very needed tool is: Apply <fixedPosition = true> to constrain-positioned parts.
Re: Another approach to assembly solver (A2plus)
For muti select it is #10 in the PDF file or "Keep 1"
There is no pop up in this workbench. Select two surfaces you have your constraint. If you want a different constraint select it before you select the second feature.Smiling_user wrote: ↑Tue Aug 18, 2020 6:18 pm And maybe the more required option would be to disable popup: set multiple constraints without having the "Set / solve " constraint popup.
Everything your asking for is write your own or (third party). My write my own is below and Yes there are bugs. I have the program on this machine but I haven't tried it on my other machine. Let me know if it works or not.Smiling_user wrote: ↑Tue Aug 18, 2020 6:18 pm And maybe the more required option would be to disable popup: set multiple constraints without having the "Set / solve " constraint popup.
Look in autoconstrainA2.py for "newcon.addProperty("App::PropertyPlacement","Placement2","LocateDan").Placement2 = ob2.Placement"Smiling_user wrote: ↑Wed Aug 19, 2020 6:06 am In the properties editor it is possible to add new property (or via python scripting)
- Attachments
-
- FullAuto Plane.JPG (35.32 KiB) Viewed 2520 times
-
- Full auto directions ver002.pdf
- (80.1 KiB) Downloaded 64 times
-
- A2plusmore ver002.zip
- (223.43 KiB) Downloaded 79 times
-
- Posts: 196
- Joined: Tue Jul 28, 2020 7:31 am
Re: Another approach to assembly solver (A2plus)
Question is: how to import a detail with a2plusmore into asm?
What is the general work-flow with this workbench?
And else, could you, please, provide a dependency graph of the project files?
After trying o use:
- convenient.
- but guidelines still must depend on an imported part (no option to set fixedPosition = true)
Need an option to start solving based on guidelines located in the assembly file.
And also, seems that at this moment the best would be a combination of tools/toolbars from A2P and A2P-more.
And to get it working I had to copy some files from A2P folder.
In the attached files - there is a detail->guidelines dependency assembly made with A2P 0.4.47d
A2P-more did not accept guidelines.
And what I'm willing to have: guidelines -> detail dependency
What is the general work-flow with this workbench?
And else, could you, please, provide a dependency graph of the project files?
After trying o use:
- convenient.
- but guidelines still must depend on an imported part (no option to set fixedPosition = true)
Need an option to start solving based on guidelines located in the assembly file.
And also, seems that at this moment the best would be a combination of tools/toolbars from A2P and A2P-more.
And to get it working I had to copy some files from A2P folder.
In the attached files - there is a detail->guidelines dependency assembly made with A2P 0.4.47d
A2P-more did not accept guidelines.
And what I'm willing to have: guidelines -> detail dependency
- Attachments
-
- det2.FCStd
- (3.69 KiB) Downloaded 98 times
-
- det1.FCStd
- (3.69 KiB) Downloaded 93 times
-
- Asm2PM2.FCStd
- (9.99 KiB) Downloaded 60 times