Assembly3 preview

Discussion about the development of the Assembly workbench.
catman
Posts: 166
Joined: Fri Jan 11, 2019 10:42 pm

Re: Assembly3 preview

Postby catman » Fri Feb 28, 2020 11:02 pm

realthunder wrote:
Fri Feb 28, 2020 1:30 am
I haven't really tested, but by now, I think an element will always have a valid interpretation in any constraints. One thing you may not know, and I think many other CAD don't support, is that you can dynamically change the type of an existing constraint, using its 'ConstraintType' property. And in many case, you don't need to change its constraining elements because of this dynamic nature in element interpretation. Asking user to make more restrictive selection defeats its purpose.
It's more of matter of documentation. I should mention those auto relaxing logic in the document. If the user really cares about DOF and stuff, he'll read the document. If not, well, he definitely needs help from auto relaxing. Another fact is that, I did optimization only on those composite constraints that I created. The underlying SolveSpace solver only supports basic constraints, which are all exposed by asm3. So the user is free choose the hard way.
I guess this is a transitional thing. Clearly, the harder way development-wise is to apply the logic behind all constraint situations to safely avoid solver locks and errors. Once achived, it offers benefits and many chances for new features to the user, e.g. your very nice example with the already implemented dynamic modification. The other way to 'force' the user to fully understand what is going on under the hood makes it harder on the user to get going and maybe is less flexible. But its easier on the developer to reach a stable and fast solver functionality with less testing, even for more exotic use cases.
Not a big surprise though, that you are aiming for the more high end solution ;)

realthunder wrote:
Fri Feb 28, 2020 1:30 am
I have tested the "Attachment" constraint for attaching parts that are attached with multiple screws in real life. The most important info was that Attachment constraint saves on solver time, which I was not aware of. Maybe I am wrong, but this seems to be the counterpart of Zolkos Assembly4 LCS, just presented as constraint?
Yes, it is about the same. In fact, it is added as a result of discussion in one of his thread, before he made asm4.
I can confirm that it has become my favourit constraint by now. Despite the cumbersome angular corrections. By the way, I find that I am ending up mofiying both constraint element's "Angle" properties most of the time, because its quite impossible without Euler/Quaternion based rotations to correct normal axis flipping and plane orientations at the same time. So its very convenient to have two separate angular correction variables for a single constraint. I did not expect that I will need that.
realthunder wrote:
Fri Feb 28, 2020 1:30 am
So its usable, but its really not fun, because your are forced to click though this usability-nightmare-of-a-default-orientation property
Maybe I can add a context menu action for element to let user manipulate its transformation, similar to axial mover.
I think one use case would be "your part is flipped in the normal direction (i.e. 180° about X) and off alignment for 135° about Z". The axial mover is a great tool and it alreday has a keyboard short cut (a,m). I have not used it yet for precision control, like lock it to 15/45/90 deg steps, or make precision 1° steps. At least its not easy enough to find out how that is done with try and error. But I will have a look to your documentation, probaly it already can do that. :)

A totally different apporach could be to introduce a manual override constraints mode. Its could be applied on a selected existing tree constraint and allow to select an additional constraint as usual. Just the constraint is only applied to the selected constraint by an over-constraint reduction algorithm. It is not selected in the tree, but the selected constraint is modified. For example, after the "attachment" operation I would select the attachment constraint and select the manual override constraint mode. then I select two faces and press "align". The part would then find a solution to satisfy both constraints and modify the initially selected constraint (here "attachment"), so the part remains in that position. By confirming the mode the affected constraints are changed, by escaping the mode the part flips back.
Since by definition there are only two constraints involved, it should be much easier to apply an intelligent over-constraint solution logic, even create a solution table for each combination. For "Attachment", obviously the rotation axes of either element could be modified by another constraint.
Maybe just an intermediate step to a fully automatic DOF reducer (which would allow to keep both constraints in the tree), but there could be even benefits for the user explicitly reduce the number of constraints, e.g. for a more slim and simple tree, etc. On the other hand a modal feature is always a dangerous thing in GUI design, because it must be clear that you are in there and how to get out of it at any time - maybe thats not worth the benefits.
User avatar
jpg87
Posts: 336
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Assembly3 preview

Postby jpg87 » Mon Mar 02, 2020 12:10 pm

Hello,
I posted in the "Help on using FreeCAD" section a request for help for a macro problem intended to animate certain assemblies built with Asm3 WB.

Having not received an answer, I would like to report this request here, in case some of you have an idea. Here is the link to my request:
https://forum.freecadweb.org/viewtopic.php?f=3&t=43800

Thank you in advance.
Edit : My post has been moved here:
https://forum.freecadweb.org/viewtopic. ... 12#p373512

@vocx was kind enough to help me out for the first problem.
My website : http://help-freecad-jpg87.fr updated 2020/03/08
realthunder
Posts: 1396
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Thu Mar 05, 2020 5:03 am

catman wrote:
Fri Feb 28, 2020 11:02 pm
I think one use case would be "your part is flipped in the normal direction (i.e. 180° about X) and off alignment for 135° about Z". The axial mover is a great tool and it alreday has a keyboard short cut (a,m). I have not used it yet for precision control, like lock it to 15/45/90 deg steps, or make precision 1° steps. At least its not easy enough to find out how that is done with try and error. But I will have a look to your documentation, probaly it already can do that. :)
New functions implemented. There are now a few more menu actions available for Element and ElementLink (the link inside constraint) to offset and flip. Offset action activates dragger for you to drag the element, while flip offers shortcut to flip the normal. Depending on the type of constraint and the order of the element, you might want to try flip part or flip element (mostly for Attachment constraint).


Image
Try Assembly3 (latest version 0.10.2) along with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
catman
Posts: 166
Joined: Fri Jan 11, 2019 10:42 pm

Re: Assembly3 preview

Postby catman » Thu Mar 05, 2020 8:51 am

realthunder wrote:
Thu Mar 05, 2020 5:03 am
New functions implemented.
Just brilliant! :D
Thanks so much
catman
Posts: 166
Joined: Fri Jan 11, 2019 10:42 pm

Re: Assembly3 preview

Postby catman » Thu Mar 05, 2020 5:37 pm

Question to the AppImage Team:
- when realthunder makes an update, is there a way for updating the Assembly3 in the AppImage? Or is the AppImage updated on a regular schedule using the newest Github version?
- how can I check which version of Assembly3 is running in my AppImage (i.e. something I can compare with the github repo number)?
vocx
Posts: 3303
Joined: Thu Oct 18, 2018 9:18 pm

Re: Assembly3 preview

Postby vocx » Thu Mar 05, 2020 6:01 pm

catman wrote:
Thu Mar 05, 2020 5:37 pm
...
- when realthunder makes an update, is there a way for updating the Assembly3 in the AppImage?
As long as the changes are Python code, you can unpack the AppImage, add the new Python files, and repackage that AppImage. See AppImage.
Or is the AppImage updated on a regular schedule using the newest Github version?
I presume yes. The AppImage is updated if not daily, at least weekly. I presume looo takes the latest Assembly3 from realthunder's repository in the same way he takes updates from other components like OCCT, Coin, etc.
looo wrote: ping
- how can I check which version of Assembly3 is running in my AppImage (i.e. something I can compare with the github repo number)?
Good question. This has been brought up several times when discussing the Addon Manager. Most external workbenches don't define versions of their code, they use a rolling release model. The Addon Manager always takes the code from the "master" branch of the external repository. Ideally authors of the external workbench would tag their releases so that the Addon Manager can determine which version is installed.

I think some workbenches display their own version, like A2plus, but this isn't consistently used by all external addons.
Always add the important information to your posts if you need help.
To support the documentation effort, and code development, your donation is appreciated: paypal.
User avatar
looo
Posts: 3176
Joined: Mon Nov 11, 2013 5:29 pm

Re: Assembly3 preview

Postby looo » Fri Mar 06, 2020 8:19 am

vocx wrote:
Thu Mar 05, 2020 6:01 pm
I presume yes. The AppImage is updated if not daily, at least weekly. I presume looo takes the latest Assembly3 from realthunder's repository in the same way he takes updates from other components like OCCT, Coin, etc.
I haven't updated asm package for some time. And yes I am using the master branch +a patch to make asm3 installable with pip.

If asm3 needs to be updated please ping me.

Regarding the version: I will only build releases after the next is available. So checking with:

Code: Select all

import freecad.asm3 as asm3
asm3.__version__
please help with my conda-packaging efforts: https://liberapay.com/looooo/
minimalistic blog: https://looooo.github.io/mini-blog/
User avatar
looo
Posts: 3176
Joined: Mon Nov 11, 2013 5:29 pm

Re: Assembly3 preview

Postby looo » Fri Mar 06, 2020 9:57 am

I just updated the asm3 package to latest master commit which is:
https://github.com/realthunder/FreeCAD_ ... 24a3332182

You can check if you are using this version by:

Code: Select all

export DEBUG=1
./FreeCAD_<..>.AppImage
and look for freecad.asm3 . It should show a version-number (0.10.2) and a build-number (py_4). That's the latest package uploaded.
But this is not immediately available within the appimage as the appimage is build only once a day.

So you might ask why is the extra work necessary:
We will get to the point where asm3 and FreeCAD 0.19 will get incompatible due to missing functionality in freecad. So then we are happy to have some versioning and provide a status of asm3 which works with freecad 0.19. The add-on manager currently doesn't provide such functionality.
please help with my conda-packaging efforts: https://liberapay.com/looooo/
minimalistic blog: https://looooo.github.io/mini-blog/
adrianinsaval
Posts: 163
Joined: Thu Apr 05, 2018 5:15 pm

Re: Assembly3 preview

Postby adrianinsaval » Fri Mar 06, 2020 7:52 pm

looo wrote:
Fri Mar 06, 2020 9:57 am
But this is not immediately available within the appimage as the appimage is build only once a day.
Where can I download these daily appimages? the one in the github release page is not updated daily and is almost 200 commits behind master
catman
Posts: 166
Joined: Fri Jan 11, 2019 10:42 pm

Re: Assembly3 preview

Postby catman » Fri Mar 06, 2020 9:32 pm

looo wrote:
Fri Mar 06, 2020 9:57 am
You can check if you are using this version by:

Code: Select all

export DEBUG=1
./FreeCAD_<..>.AppImage
and look for freecad.asm3 . It should show a version-number (0.10.2) and a build-number (py_4). That's the latest package uploaded.
But this is not immediately available within the appimage as the appimage is build only once a day.
Great. To get a procedure is always the most helpful thing.
Last edited by catman on Sun Mar 08, 2020 11:37 am, edited 1 time in total.