Assembly3 preview

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
OakLD
Posts: 131
Joined: Fri Jan 12, 2018 7:38 pm
Location: Brno

Re: Assembly3 preview

Post by OakLD »

@Realthunder: Congratulations with the progress.

Is it possible to constrain two parts using planes? (with your 0.17 snapshot)
Basic cubes
Basic cubes
ASM3_001.PNG (2.78 KiB) Viewed 2048 times
I tried two basic cubes and it works with first planar face-to-face alignment (PlaneCoincident).
Cubes constrained by PlaneCoincident
Cubes constrained by PlaneCoincident
ASM3_002.PNG (40.16 KiB) Viewed 2048 times
But any other alignment results in error message:
Failure further constraint
Failure further constraint
ASM3_003.PNG (50.6 KiB) Viewed 2048 times
Of course it isn't important because of two cubes, but because planar alignments (both aligned and opposite) together with a hol-hole constraint account (IMHO) to about 90+% of real-world assembly constraints. All the rest are more or less nice-to-have, but auxilliary.

Assembly2 had "Plane constraint between two objects" which was working just fine. One of the reasons for a problem here in ASM3 could be, that the first "PlaneCoincident" constraint maybe removes more DOF then expected, the extra being rotation. It has "angle" in it's properties set (but it doesn't produce any change anything, if you modify it's value). If that's the case and it was meant to behave like this, then users will be definitely missing the most common plannar alignment (without fixed rotation).

The icons are really nice, but I would suggest to put list of constrained DOF into the ToolTipText.

I did another test, applying "PlaneAlignment" to one sides of the boxes, again, that worked fine. When applying the same to the top faces, I got an the same solver error again.
ASM3_004.PNG
ASM3_004.PNG (44.3 KiB) Viewed 2048 times
So am I doing something wrong? From the discussion it even seems that this was an intention, but then how to do such simple constraining?
Regards,

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

Re: Assembly3 preview

Post by realthunder »

OakLD wrote: Fri Mar 02, 2018 7:34 pm Assembly2 had "Plane constraint between two objects" which was working just fine. One of the reasons for a problem here in ASM3 could be, that the first "PlaneCoincident" constraint maybe removes more DOF then expected, the extra being rotation. It has "angle" in it's properties set (but it doesn't produce any change anything, if you modify it's value). If that's the case and it was meant to behave like this, then users will be definitely missing the most common plannar alignment (without fixed rotation).
Only setting the angle values does nothing. You have to change the LockAngle option to true.

There is a bug in angle options in the master. Angle 0 is going to give you some trouble with error message as redundant constraints. Anything other than 0 should work fine. But if you cubes are initially have 0 angles before locking the angle, you'll still have redundant constraint error. Use the part mover to slightly move the cubes to get the snap. I have fixed this problem in my asm3 dev branch. I am preparing to release a new version soon.
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 »

Only setting the angle values does nothing. You have to change the LockAngle option to true.
Oh, it's working now. I figured that out, but I probably had there another constraint, because it wasn't working before.
There is a bug in angle options in the master. Angle 0 is going to give you some trouble with error message as redundant constraints. Anything other than 0 should work fine. But if you cubes are initially have 0 angles before locking the angle, you'll still have redundant constraint error. Use the part mover to slightly move the cubes to get the snap. I have fixed this problem in my asm3 dev branch. I am preparing to release a new version soon.
I still have no luck here, but maybe I misunderstood your hints. What I am trying is to apply classic 3 plane constraint combination: Face-face + side-side + top-top. Meaning one "oposite" and two "aligned" plannar coincident constraints. I still get solver error message to any combination of constraints like that right in 2nd step. I'm sorry to bother with this; I'd wait until next release with testing, if it's a kind of a bug and is fixed already...
Regards,

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

Re: Assembly3 preview

Post by realthunder »

OakLD wrote: Fri Mar 02, 2018 11:10 pm I still have no luck here, but maybe I misunderstood your hints. What I am trying is to apply classic 3 plane constraint combination: Face-face + side-side + top-top. Meaning one "oposite" and two "aligned" plannar coincident constraints. I still get solver error message to any combination of constraints like that right in 2nd step. I'm sorry to bother with this; I'd wait until next release with testing, if it's a kind of a bug and is fixed already...
The plane alignment constraint removed 3 DOF, meaning that after the constraint, the other object can only move in a 2D space and rotate with one axis. Adding another plane alignment, and you'll be removing another 2 DOF rotation degree, which there isn't, causing over constraint.

This is how I did it. Come to think of it, it is probably worthwhile to add a dedicate 2-plane alignment constraint type.

Image
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 »

That's a great help, such an animation, thank you.

This setup works well, no problem what so ever, I was also able to fully constrain just using PlaneCoincidence and PointOnPoint constraints - at least apparently, I couldn't move them with MovePart command in ASM3 toolbar.
ASM3_005.PNG
ASM3_005.PNG (16.8 KiB) Viewed 1962 times
But I was wondering, how to proceed in more real scenario, so I increased one cube to 30,30,30mm. Then assume, that you'd want to place the smaller cube excentrically i.e. 10 and 20mm from two edges.
ASM3_006.PNG
ASM3_006.PNG (23.31 KiB) Viewed 1962 times
As I expected, I couldn't figure out a combination of constraints to achive that and even if I found one which would please the solver, it would be quite wild work-around. So...
Come to think of it, it is probably worthwhile to add a dedicate 2-plane alignment constraint type.
...would be a great addition. Parallel lines constraint would do too, but plane constraint is the standard one which a user would look for.

One more little suggestion regarding a range of constraints: A one which would bound LCS of the "inserted" part against a point of the "base" part (and it's LCS orientation) would be very easy to implement and could save a day, when the parts are very awkward. So user would pic a part (or feature to indentify a part?) and a point and the first would be moved with it's LCS start point to the picked point of the other part and the X axis aligned with direction of X axis of the target part. Then 3 parameters with default [1,1,1] values would change the LCS relation (i.e. [-1,1,1] would point the part into oposite direction). Such constraint wouldn't be used often (I used it few times in my design engineer years), but due to it's low-level and powerful nature it can solve troubles difficult to handle otherwise.

Also, I wonder, how's that you have in your toolbar "Midpoint" of the edge and the Sketcher lacks it? Is it SolveSpace method, which cannot be propagated to the Sketcher?

Anyhow, I am looking forward to get my hands on the upcoming release of 0.17+ASM3. It's exciting to see an open source project to get to such level and to look this lively (both FC and ASM3)!
Regards,

Oak
User avatar
jpg87
Posts: 809
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Assembly3 preview

Post by jpg87 »

Hello,
Here is the version of FreeCad I use:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.5235 (Git shallow)
Build type: Release
Branch: (HEAD detached at FETCH_HEAD)
Hash: f405cbcfb65f681366cf4ff09518cc4b95d19c99
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
Locale: French/France (fr_FR)


I'm struggling to test asm3 and here's what I get:
pb_asm3.jpg
pb_asm3.jpg (47.99 KiB) Viewed 1907 times
Note: Initially, I used objects that I had drawn previously and I thought my problems came from there. So I created these simple parts from Part primitives but I always get the same message.
Do I have a problem in my installation?

Thank you in advance.

jpg87
My website : http://help-freecad-jpg87.fr updated 2023/11/06
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Post by realthunder »

OakLD wrote: Sat Mar 03, 2018 1:15 pm But I was wondering, how to proceed in more real scenario, so I increased one cube to 30,30,30mm. Then assume, that you'd want to place the smaller cube excentrically i.e. 10 and 20mm from two edges.
As shown in my previous screencast, just replace the two PoinInPlane constraint with PoinPlaneDistance, and set a distance of your desire. In fact, I think you can get what you want with only PoinPlaneDistance constraint, lots of them.

Another idea, the new PartDesign offers some great option to attach a datum plane to the part you created, or you can create a sketch in the Body for the same purpose. Then it will be a lot easier to assemble. Just select those datum plane/sketches, and use PlaneCoincedence.

One more little suggestion regarding a range of constraints: A one which would bound LCS of the "inserted" part against a point of the "base" part (and it's LCS orientation) would be very easy to implement and could save a day, when the parts are very awkward. So user would pic a part (or feature to indentify a part?) and a point and the first would be moved with it's LCS start point to the picked point of the other part and the X axis aligned with direction of X axis of the target part. Then 3 parameters with default [1,1,1] values would change the LCS relation (i.e. [-1,1,1] would point the part into oposite direction). Such constraint wouldn't be used often (I used it few times in my design engineer years), but due to it's low-level and powerful nature it can solve troubles difficult to handle otherwise.
Eh...I don't quite get what you mean. Is it similar to the all PointPlaneDistance solution I mentioned above?

Also, I wonder, how's that you have in your toolbar "Midpoint" of the edge and the Sketcher lacks it? Is it SolveSpace method, which cannot be propagated to the Sketcher?
Sketcher has a great solver, but it can't cross its 2D plane dimension, so it can only appear as a bunch of fixed wires to asm3. Sometimes, you can create an auxiliary sketch to define a constraining element, like I suggested above, but there are situations where the auxiliary lines/planes itself need to be constrained against other parts, meaning that they should not belong to any part, but instead, be inserted to the assembly as an 'auxiliary part'. You can use draft wires/circles for that purpose. And this is where I expect MidPoint might be useful. Also, yes, this is what SolveSpace provided, I merely exposed it as it is.
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
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Post by realthunder »

jpg87 wrote: Sat Mar 03, 2018 9:41 pm Do I have a problem in my installation?
Seem so. Can you post your file for me to test?
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
jpg87
Posts: 809
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Assembly3 preview

Post by jpg87 »

realthunder wrote: Sat Mar 03, 2018 11:18 pm Seem so. Can you post your file for me to test?
test_pivot_asm3_V2.FCStd
(15.56 KiB) Downloaded 49 times
The first test :
test_pivot_asm3.FCStd
(31.6 KiB) Downloaded 63 times
My website : http://help-freecad-jpg87.fr updated 2023/11/06
User avatar
OakLD
Posts: 131
Joined: Fri Jan 12, 2018 7:38 pm
Location: Brno

Re: Assembly3 preview

Post by OakLD »

realthunder wrote: Sat Mar 03, 2018 11:17 pm As shown in my previous screencast, just replace the two PoinInPlane constraint with PoinPlaneDistance, and set a distance of your desire. In fact, I think you can get what you want with only PoinPlaneDistance constraint, lots of them.
Well, as I wrote I tried and soon run into divergence. I tried again with purely point-related constraints and didn't get much farther. The problem is, that you cannot set point-to-plane distance into the direction of cube. When you set a negative number (and there's no "revert" option), then sometimes the solver doesn't converge (that happens often anyway), but even if it takes the negative number, it interprets it as a positive value.
ASM3_007.PNG
ASM3_007.PNG (23.69 KiB) Viewed 1842 times
However it is a work-around anyway. I can't imagine doing that for an "everyday" assemlby like a welding assembly of a "L" shaped plate and 2 ribs...

realthunder wrote: Sat Mar 03, 2018 11:17 pmAnother idea, the new PartDesign offers some great option to attach a datum plane to the part you created, or you can create a sketch in the Body for the same purpose. Then it will be a lot easier to assemble. Just select those datum plane/sketches, and use PlaneCoincedence.
Well, it won't hurt me if I expand my views and experiment a bit with this method. Good for specials, good for ASM3 testing. Still, I think it is not feasible to do the "everyday" assembly this way.

One more little suggestion regarding a range of constraints: A one which would bound LCS of the "inserted" part against a point of the "base" part (and it's LCS orientation) would be very easy to implement and could save a day, when the parts are very awkward. So user would pic a part (or feature to indentify a part?) and a point and the first would be moved with it's LCS start point to the picked point of the other part and the X axis aligned with direction of X axis of the target part. Then 3 parameters with default [1,1,1] values would change the LCS relation (i.e. [-1,1,1] would point the part into oposite direction). Such constraint wouldn't be used often (I used it few times in my design engineer years), but due to it's low-level and powerful nature it can solve troubles difficult to handle otherwise.
Eh...I don't quite get what you mean. Is it similar to the all PointPlaneDistance solution I mentioned above?
No, I don't thik so. The point is, that you'd typically use it to constrain parts which are difficult to constrain, they may have no plannar faces at all. imagine fixing a braket onto a piral section of tube. Could be also possible to use some aux planes but LCS/point should be much easier. But don't get bothered by this now, it's not important and I'm sure you have a lot in your mind.
Regards,

Oak
Post Reply