Assembly3 preview

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Post by realthunder »

OakLD wrote: Thu Mar 08, 2018 7:34 pm when using circle/circle PlaneCoincident + another circle/circle PointCoincident
This causes overconstraint, because Plane Coincident removes 5 DOF, after which you can only rotate in one axis, apparently not enough DOF left for another PointsCoincident. I used 2D PointsHorizontal/Vertical constraint in this post to solve this problem. As I mentioned before, this does need improvement. I can track the number of composite constraints on pairs of parts, and say, if found two PlaneCoincident constraints, auto reduce the second one to PointsHorizontal or something. Expect it to be improved before next release.
Try Assembly3 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
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Assembly3 preview

Post by triplus »

realthunder wrote: Wed Mar 07, 2018 11:43 pm It is for stacking multiple sheet or bar together, similar to asm2's bolt constraint. I put it there in very early stage of development, haven't tested this feature much.
Thanks for the explanation. Didn't test this just yet. As i don't know what exactly to do to test it. ;)
composite constraints
Does SolveSpace impose how composite constraints should be made. That is you made Plane constraint that removes 5 DOF (plus an optional rotation one). By constructing (a composite) Plane constraint. Is this just your take on it or more or less imposed by SolveSpace on how Plane constraint should work?
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Post by realthunder »

triplus wrote: Fri Mar 09, 2018 12:16 am Does SolveSpace impose how composite constraints should be made. That is you made Plane constraint that removes 5 DOF (plus an optional rotation one). By constructing (a composite) Plane constraint. Is this just your take on it or more or less imposed by SolveSpace on how Plane constraint should work?
That's my take. I roughly model these composite constraints after Assembly2's.
Try Assembly3 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
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Assembly3 preview

Post by triplus »

realthunder wrote: Fri Mar 09, 2018 12:40 am That's my take. I roughly model these composite constraints after Assembly2's.
The thing that doesn't make much sense to me ATM is. On why is SolveSpace solver not robust with some combinations of constraints. For example 2 Part Cubes. One being moved 20mm in X direction. Adding first SameOrientation or PlaneAlignment by selecting Top faces. Everything works as expected. Trying to add another one of the same type between for example Front faces simply won't work. This leads me to believe something is not optimal when it comes to composite constraints?
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Post by realthunder »

triplus wrote: Fri Mar 09, 2018 1:19 am The thing that doesn't make much sense to me ATM is. On why is SolveSpace solver not robust with some combinations of constraints. For example 2 Part Cubes. One being moved 20mm in X direction. Adding first SameOrientation or PlaneAlignment by selecting Top faces. Everything works as expected. Trying to add another one of the same type between for example Front faces simply won't work. This leads me to believe something is not optimal when it comes to composite constraints?
Because composite constraint removes multiple DOFs, multiple composite constraints of similar types on the same pair of parts (which have at most 6 Dof between them) will definitely lead to overconstraint. I'll add code to detect that and downgrade or (if appropriate) simply ignore extra composites. I am currently caught in the middle of the topological naming thing. So this may have to wait for a while.
Try Assembly3 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
User avatar
OakLD
Posts: 131
Joined: Fri Jan 12, 2018 7:38 pm
Location: Brno

Re: Assembly3 preview

Post by OakLD »

realthunder wrote: Fri Mar 09, 2018 2:33 am
triplus wrote: Fri Mar 09, 2018 1:19 am The thing that doesn't make much sense to me ATM is. On why is SolveSpace solver not robust with some combinations of constraints. For example 2 Part Cubes. One being moved 20mm in X direction. Adding first SameOrientation or PlaneAlignment by selecting Top faces. Everything works as expected. Trying to add another one of the same type between for example Front faces simply won't work. This leads me to believe something is not optimal when it comes to composite constraints?
Because composite constraint removes multiple DOFs, multiple composite constraints of similar types on the same pair of parts (which have at most 6 Dof between them) will definitely lead to overconstraint. I'll add code to detect that and downgrade or (if appropriate) simply ignore extra composites. I am currently caught in the middle of the topological naming thing. So this may have to wait for a while.
I would suggest to build ASM3 abilities "bottom-up", meaning to put there the missing low-level plane/plane constraint as you proposed earlier on. You can do a LOT (nearly everything), just with Plane/Plane, Point/point (you have that) and Point/plane (you have that too) constraints. The rest is either "sexy" nice-to-have, or even desperately needed, but only once per a long time.
To try to insert composite constraints with a lot of DOF removed and then to fix that by blackbox-removing some of them will necesarilly create a lot of issues, meaning a lot of your effort (even just the mechanism of removing the correct DOF constraints will need quite a lot of effort, I guess).
It's just a suggestion, not a criticism :-).
Regards,

Oak
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Post by realthunder »

OakLD wrote: Fri Mar 09, 2018 7:59 am I would suggest to build ASM3 abilities "bottom-up", meaning to put there the missing low-level plane/plane constraint as you proposed earlier on. You can do a LOT (nearly everything), just with Plane/Plane
How does this plane/plane constraint of yours behave. I can't imagine one that is not actually a composite of others.
Try Assembly3 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
User avatar
OakLD
Posts: 131
Joined: Fri Jan 12, 2018 7:38 pm
Location: Brno

Re: Assembly3 preview

Post by OakLD »

realthunder wrote: Fri Mar 09, 2018 8:28 am
OakLD wrote: Fri Mar 09, 2018 7:59 am I would suggest to build ASM3 abilities "bottom-up", meaning to put there the missing low-level plane/plane constraint as you proposed earlier on. You can do a LOT (nearly everything), just with Plane/Plane
How does this plane/plane constraint of yours behave. I can't imagine one that is not actually a composite of others.
Well, I'd assume that you call a composite constraint one which is composed of two or more another. I.e. ASM3 PlaneCoincident is a Plane/Plane + CenterPoint/CenterPoint (+ optionally angle).
I think you can take a good example of Plane/Plane constraint from the Assembly2:
Plane/Plane.
Plane/Plane.
ASM2icon.PNG (1.33 KiB) Viewed 1989 times
.
It's very similar in SolidWorks, SolidEdge and Catia and certainly in other 3D CAD/CAM/CAE too.

I think, that if you could do following simple example with 2 cubes effectively (asemble two cubes in any configuration, including given Plane/plane distances), than the command is fine:
ASM3_11.PNG
ASM3_11.PNG (15.8 KiB) Viewed 1989 times
Regards,

Oak
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Post by realthunder »

OakLD wrote: Fri Mar 09, 2018 9:51 am I think you can take a good example of Plane/Plane constraint from the Assembly2: ASM2icon.PNG.
It's very similar in SolidWorks, SolidEdge and Catia and certainly in other 3D CAD/CAM/CAE too.
asm3 composite constraints are actually modeled after Assembly2. In asm3, this plane-plane constraint is called PlaneAlignment. I originally wanted to use Assembly2's solver, so I checked its code. It is a while back, but I do remember that it is doing similar thing like I described, that is, to keep track of DOF of pairs of parts, and reduce constraining DOF automatically when necessary.
Try Assembly3 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
User avatar
OakLD
Posts: 131
Joined: Fri Jan 12, 2018 7:38 pm
Location: Brno

Re: Assembly3 preview

Post by OakLD »

realthunder wrote: Fri Mar 09, 2018 10:03 amasm3 composite constraints are actually modeled after Assembly2. In asm3, this plane-plane constraint is called PlaneAlignment. I originally wanted to use Assembly2's solver, so I checked its code. It is a while back, but I do remember that it is doing similar thing like I described, that is, to keep track of DOF of pairs of parts, and reduce constraining DOF automatically when necessary.
I'm sorry, I forgot to test the PlaneAlignment, however I did it now and had no luck with those constraints either. When I attempted to add the 2nd constraint, the solver thrown an error about redundant constraints, even though I was adding the Plane alignment constraint to a perpendicular faces to the first one, so it should work (like in ASM2 or elsewhere)... There's a catch somewhere...
ASM3_12.PNG
ASM3_12.PNG (65.19 KiB) Viewed 1969 times
Regards,

Oak
Post Reply