Assembly3 preview

Discussion about the development of the Assembly workbench.
triplus
Posts: 9475
Joined: Mon Dec 12, 2011 4:45 pm

Re: Assembly3 preview

Postby triplus » Sat Mar 10, 2018 1:24 am

realthunder wrote:
Fri Mar 09, 2018 2:33 am
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.
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: 99
Joined: Fri Jan 12, 2018 7:38 pm
Location: Brno

Re: Assembly3 preview

Postby OakLD » Sat Mar 10, 2018 8:23 pm

triplus wrote:
Sat Mar 10, 2018 1:24 am
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". ;)
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: 99
Joined: Fri Jan 12, 2018 7:38 pm
Location: Brno

Re: Assembly3 preview

Postby OakLD » Mon Mar 12, 2018 10:31 am

@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
Posts: 1810
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Mon Mar 12, 2018 12:32 pm

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 (latest version 0.11) 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
User avatar
jpg87
Posts: 431
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Assembly3 preview

Postby jpg87 » Mon Mar 12, 2018 9:48 pm

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 861 times

I enclose the file.
Regards,
jpg87
Attachments
bride_hydrau_asm3.FCStd
(516.8 KiB) Downloaded 23 times
My website : http://help-freecad-jpg87.fr updated 2020/11/30
realthunder
Posts: 1810
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Tue Mar 13, 2018 2:03 am

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 (latest version 0.11) 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
User avatar
jpg87
Posts: 431
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Assembly3 preview

Postby jpg87 » Tue Mar 13, 2018 8:06 pm

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 2020/11/30
realthunder
Posts: 1810
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Tue Mar 13, 2018 10:23 pm

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 (latest version 0.11) 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
User avatar
jpg87
Posts: 431
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Assembly3 preview

Postby jpg87 » Wed Mar 14, 2018 5:52 am

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 2020/11/30
realthunder
Posts: 1810
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Wed Mar 14, 2018 8:53 am

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 (latest version 0.11) 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