assembly without solver

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
fosselius
Posts: 381
Joined: Sat Apr 23, 2016 10:03 am
Contact:

Re: assembly without solver

Post by fosselius »

Saso, what is not correct with part design with respect to what you have described? Can you highlight red what is missing/wrong?

In your "part" in level1 i assume you can have several solids?

Regarding LCS, when you place a freecad body inside another body, do you not get this behaviour?

You can position things inside the bodies coordinatesystem and when you change placement to that body, all the contents move accordingly.
Like the finger video i made.

Code: Select all

Body
  Shape1
  Body2
    Shape2
    Body3
      Shape3
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: assembly without solver

Post by saso »

Sorry fosselius, but with such general questions I really don't know where to start. For example what do you mean by a Body? In current implementation of it in FreeCAD you are not able to place a Body inside a Body, unless you do a boolean operation between them (and that is actually a correct use of the body). And everything is mostly like this, full of misunderstanding, hacks and workarounds instead of doing it properly and step by step.

Take your finger example and do it in the three ways (1) with the Body and Part containers of the PDN (2) with A2+ and (3) with A3. And then tell me how does all of this go together? While on the other side I hope you can see that the actual proper structure is actually very simple and elegant, and that the same concepts and workflows are just repeating on each level.

As I have shown here https://forum.freecadweb.org/viewtopic. ... 21#p274913 , it should be possible to put every geometry inside a Part (Part Design WB, Part WB, Surface WB, Curves WB,... all should be able to use it). The Part example at that link is just a simple example, a Part like this can have hundreds of datum elements, hundreds of sketches, hundreds of surfaces, hundreds of bodies with each made of hundreds of features,... and it can still be just a single Part from hundreds or thousands of other Parts in a Assembly, that can again be just another subassembly in a much larger Assembly... And you can do all of this with no external linking and no constraints (ppemawm with his models Is already very much showing this), but I am not saying that having them is not useful :) What I am suggesting / asking for is nothing special it's parametric cad 101.
Last edited by saso on Thu Dec 27, 2018 10:59 pm, edited 1 time in total.
User avatar
fosselius
Posts: 381
Joined: Sat Apr 23, 2016 10:03 am
Contact:

Re: assembly without solver

Post by fosselius »

Ah, my bad, of cause its a Part, not a Body.. and i think i understand what you want now ^_^, sorry for being a bit slow.
LCS.gif
LCS.gif (26.8 KiB) Viewed 2417 times
Screenshot from 2018-12-27 22-55-50.png
Screenshot from 2018-12-27 22-55-50.png (24.32 KiB) Viewed 2417 times
Attachments
parts.fcstd
(35.65 KiB) Downloaded 82 times
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: assembly without solver

Post by saso »

Ok, first thing, don't mix lcs with Part origin, they are two different things. You can place an lcs at the origin, but you can also place it to a different position inside the Part. And each Part has just one origin, but you can add many lcs's (same as planes or other datum elements) to a single Part. Also when you assemble your parts with just lcs, the idea is not to have a movable assembly (for animations or kinematics) you just place/position them on the right position and orientation. But you can have some Parts with constraints (movable) and some just positioned with lcs.

But from the model structure it is a good example. We could have a debata if this is the best structure for FC or if some of the below are better or if we should/could maybe allow to have both (hint, having just one container (part) or having an additional one for assembly). And this structure I would already call a proper basic assembly. So how do A2+ or A3 allow you to add 3d constraints to this and keep this structure, because this is what I would then call a proper assembly with constraints.

PS: I am ignoring here that IMO our bodies should also not work the way they work now (they behave more like Parts but should be more like Groups). But I strongly believe that this is the right way forward for FreeCAD and that it will be awesome, for everyone.
Attachments
asm3.png
asm3.png (57.31 KiB) Viewed 2406 times
asm2.png
asm2.png (55.64 KiB) Viewed 2406 times
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: assembly without solver

Post by saso »

And using clones, solids, compounds or what ever for parts instead of the Part container is IMO wrong (they can be used on the geometry inside the Part of course). Sketcher, Part and Assembly containers are special in this hierarchy and there is nothing more or less to this structure (well it can be less if you use just one container for both Part and Assembly :) and I confess I also didn't know for some time that some parametric cad programs are doing this :roll: )
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: assembly without solver

Post by realthunder »

Just scan through this thread. I believe no one have pointed out the definitive answer to why a solver is needed, yes? A solver is required, if there is any 'part' positioned by multiple constraints. How is the proposed 'local coordinate system only assembly' going to solve this, where the same 'part' has requirements to met on more than one 'local coordinate system'? Are these LCS going to talk to each other somehow? For single constrained 'part', yes, of course it is possible. In fact, FreeCAD's AttachEngine is used for this purpose. A solver's job is to find a solution that satisfy all the requirements simultaneously. I don't think you can do it with separate 'local coordinate systems'.
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
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: assembly without solver

Post by saso »

You are of course right, but in a multi persona design team that is working on very large assemblies do you think someone is actually constraining together all the thousands or even hundred of thousands of parts together with constraints? Just some percentage of parts are actually constrained in such assemblies.
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: assembly without solver

Post by Zolko »

realthunder wrote: Sun Dec 30, 2018 12:18 pm A solver is required, if there is any 'part' positioned by multiple constraints.
yes, "IF". But in the real world, in 90% of cases (probably closer to 99%) you don't need a complex solver, a part is positioned at a particular position. The assembly knows where the part is supposed to go (that's the target LCS), and the part knows where it is supposed to be attached (that's the attachment LCS).

Furthermore, you can also have 2D solvers in the assembly, where a complex Sketch represents some kinematics, and you place various LCSs on key points of the sketch. Then, if you attach parts to those target LCS, you can move the parts around by changing the parameters in the assembly's sketch. This is often more reliable and useful than having an empty assembly, placing parts, constraining them, checking that none are over- or under-constrained, making sure that you don't accidentally destroy geometries used for the constrains....


How is the proposed 'local coordinate system only assembly' going to solve this, where the same 'part' has requirements to met on more than one 'local coordinate system'?
Not sure to understand, but the idea is to have many LCS in the assembly, and many LCS in the part. The LCS in the assembly correspond to places where parts — or sub-assemblies — are going to be placed, and the LCS in the part correspond to the different attachment possibilites that the part has. Think of a wheel that can be attached on both sides of its axis, that's 2 LCS. Or if you want to attach a bicycle wheel centred, that's 3 LCS.

In fact, FreeCAD's AttachEngine is used for this purpose.
That's an information I didn't know, thank-you. Could you please give more info on that ? Supposed, for example, that I have an assembly, a part, each having 2 LCS, and I want to attach — using your App::Link framework — the part by one of its LCS to the assembly, twice, once on each LCS. Would it be possible to do it today ?
A solver's job is to find a solution that satisfy all the requirements simultaneously.
Yes, and all 3D CAD systems have a particular solver: mate 2 LCSs, one in the assembly and one in the part. So, even if you want to create a sophisticated solver that can work with partial constraints — parallelism, distance, coaxiality... — you'll have to make a solver for LCS only attachments.

Whet we're talking here is to solve that particular problem first, that's all.
try the Assembly4 workbench for FreCAD — tutorials here and here
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: assembly without solver

Post by triplus »

I read the rationale again and i must say some of you are heavily underestimating the importance of having a robust assembly solver. You just somehow assume all the parts in assembly will automagically be in correct relations to other parts. Sure, if somebody else would assemble the parts elsewhere, and just provide the assembled result. Then yes, you basically don't need a robust assembly solver. And after you can use for example an expression engine, or some similar approach, to attach a wheel to an axle. As for the document structure. Part feature is a LCS feature.
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: assembly without solver

Post by Zolko »

triplus wrote: Sun Dec 30, 2018 7:36 pm You just somehow assume all the parts in assembly will automagically be in correct relations to other parts.
You somehow seem to assume you always have some geometry in your part to which you can attach constraints. You failed until now to address the problem of assembling parts and sub-assemblies that are not finalised, that are in a development stage, constantly changing, may-be to the point that geometrical interfaces don't even exist yet. I such a case, you can define, very early in the process, LCS where parts and assemblies are functionally linked, assemble everything, and develop in parallel all sub-assemblies distributed between several engineers, and the master assembly will, automagically, always include all sub-assemblies at the correct placement.
try the Assembly4 workbench for FreCAD — tutorials here and here
Post Reply