Assembly3 preview

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Assembly3 preview

Post by triplus »

realthunder wrote: Fri Mar 09, 2018 2:33 amBecause 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.
Yes that would definitely explain the results i am getting. When using most of "the standard" relations. I had a feeling SolveSpace shouldn't have an issue with robustness to such extent. PlaneAlignment is a composite constraint and it removes 3 DOF. When used on a two cube example above. When adding the second PlaneAlignment constraint issues will occur. In theory (from DOF point of view) they shouldn't. But as currently there is no detection and removal of i guess "duplicate constraints" from each composition. Issues occur. I do imagine once this gets tackled and if you can figure it out. You won't hear all that much complaints in user feedback anymore. Regarding "why doesn't it work more like Assembly 2 plane constraint". ;)
I am currently caught in the middle of the topological naming thing. So this may have to wait for a while.
Sounds good and take your time.
User avatar
OakLD
Posts: 131
Joined: Fri Jan 12, 2018 7:38 pm
Location: Brno

Re: Assembly3 preview

Post by OakLD »

triplus wrote: Sat Mar 10, 2018 1:24 amYes that would definitely explain the results i am getting. When using most of "the standard" relations. I had a feeling SolveSpace shouldn't have an issue with robustness to such extent. PlaneAlignment is a composite constraint and it removes 3 DOF. When used on a two cube example above. When adding the second PlaneAlignment constraint issues will occur. In theory (from DOF point of view) they shouldn't. But as currently there is no detection and removal of i guess "duplicate constraints" from each composition. Issues occur. I do imagine once this gets tackled and if you can figure it out. You won't hear all that much complaints in user feedback anymore. Regarding "why doesn't it work more like Assembly 2 plane constraint". ;)
The composite constraints are a choice of RealThunder, the solve space documentation simply states:
Parallel / Tangent: This constraint forces two vectors to be parallel.
And there's a "Same orientation" constraint equal to the above, but while parallel allows two configurations (aligned and oposite), the "Same orientation" allows only one.
That is why I think, that it should be easier to avoid over-constraining, than to fix it later. But I don't know anything about the way how it is implemented and whether this is not imposed as a requirement. And I'm sure RealThunder will figure a good solution soon. Or maybe even we are using it incorrectly and eventually this will get clarified... We'll see.
triplus wrote: Sat Mar 10, 2018 1:24 am
I am currently caught in the middle of the topological naming thing. So this may have to wait for a while.
Sounds good and take your time.
Yep :-). I know how hard it is to manage such a project... So it definetely sounds good to me tooo :-)
Regards,

Oak
User avatar
OakLD
Posts: 131
Joined: Fri Jan 12, 2018 7:38 pm
Location: Brno

Re: Assembly3 preview

Post by OakLD »

@RealThunder: There's one thing I came across during the testing lately, it's the naming of the constraints. They're all grouped in 1 folder and have generic names (like PlaneCoincident1). Very soon one gets lost in the names, even with small assemblies, and all the time searches for the right constraint, when in need to modify it. I'd suggest to extend the generic name to something like

Code: Select all

<constraint_type_name><Iteration>_<SourcePart>-<TargetPart>
The way you display the constraints in one folder has it's advantages (disadvantages too, of course), but it certainly increases the need for naming it after the constrained parts.
Or of course, there can be other was to handle it, i.e. mouse-over constraint event could select/highlight the parts in assembly, which is certainly more difficult to implement.
Regards,

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

Re: Assembly3 preview

Post by realthunder »

OakLD wrote: Mon Mar 12, 2018 10:31 am Or of course, there can be other was to handle it, i.e. mouse-over constraint event could select/highlight the parts in assembly, which is certainly more difficult to implement.
I think that's a better idea, and may be easier to implement, saving the trouble to keep track of user re-label of both the constraints and the parts.
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 »

Hello,
I'm testing asm3 on an assembly containing multiple nested subassemblies.
For the creation of subassemblies, I get the expected results.
On the other hand, I had some problems to achieve the overall assembly. I receive this error message, but I noticed that if I select the object that refuses to position itself and then I use "Move part", as soon as the moved object arrives near the element of constraint, it is positioned correctly. ... except for the two spheres ("patin" and "vis patin M8" end with PointsCoïncidents constraint, as well as "embout sphérique piston" and "levier" plane with PointsDistance - PointPlaneDistance not being available).
message_erreur.png
message_erreur.png (54.81 KiB) Viewed 2107 times

I enclose the file.
Regards,
jpg87
Attachments
bride_hydrau_asm3.FCStd
(516.8 KiB) Downloaded 102 times
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 »

jpg87 wrote: Mon Mar 12, 2018 9:48 pm I'm testing asm3 on an assembly containing multiple nested subassemblies.
The NoneType error you see is caused by an empty Lock constraint in sub-assembly bati. I have fixed the code to tolerate such problem.

The overall failure of your assembly is because there is a bug in DatumPoint somewhere. If you type,

Code: Select all

Part.show(App.ActiveDocument.DatumPoint002.Shape)
You'll see that the datum point's shape is at some seemingly random position. The datum point object is shown correctly in 3D view because its view provider does not use the shape for display. But asm3 relies on the shape for constraining. I didn't manage to trace out the root cause of this problem, but I added a workaround, after which a simple solver recompute will give you the correct result.

PS. I notice that it is not possible to use the Mover to move parts in sub-assembly at the moment. There is actually implementation for that in asm3. You can select a sub-assembly and then select a part to move in the context of that sub-assembly. However, currently, tree view will auto unselect children if a parent group is selected. I'll make it fully working next time.

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
jpg87
Posts: 809
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Assembly3 preview

Post by jpg87 »

Thank you very much.
I replaced the datum points with classical sketches where I could designate points: as a result, the PointsCoincidents constraint works, and the PointPlaneDistance constraint becomes available.
Everything is working.
realthunder wrote: Tue Mar 13, 2018 2:03 am The NoneType error you see is caused by an empty Lock constraint in sub-assembly bati.
What does an "empty lock constraint in the built subassembly" mean? Do I have to change something?

Another question: can we animate the whole other than with the Move tool?
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 »

jpg87 wrote: Tue Mar 13, 2018 8:06 pm What does an "empty lock constraint in the built subassembly" mean? Do I have to change something?
In bati sub-assembly, you left a Lock constraint with no geometry element link inside.
Another question: can we animate the whole other than with the Move tool?
Currently, no. I'll add that in the future. But I expect this to be a big feature, so may need some time.
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: Tue Mar 13, 2018 10:23 pm Currently, no. I'll add that in the future. But I expect this to be a big feature, so may need some time.
I have an idea, but I do not know how to program, not even in python:
it would be enough of a function that would vary with an adjustable step
  • a distance (linear motor) over a given range (amplitude of displacement of a cylinder for example)
  • or an angle (rotary motor) over a range from 0 to 1 turn.
Maybe by a macro? But I do not know how to do ...
What do you think ?
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 »

jpg87 wrote: Wed Mar 14, 2018 5:52 am What do you think ?
It's not that simple. We'll need a way to programmatically determine the DOF left. It's not that obvious with some combinations of constraints. But I am sure it can be done. SolveSpace, the CAD software, does have animation of DOF.
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
Post Reply