Flexible assemblies. How manage them ?

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Flexible assemblies. How manage them ?

Post by Zolko »

fcaduser wrote: Mon Aug 03, 2020 10:05 am I perfectly understand the suggested method but I just don't like it.
Actually, my proposal doesn't work if a flexibel part is also an assembly (2 sub-assemblies)
try the Assembly4 workbench for FreCAD — tutorials here and here
dan-miel
Posts: 391
Joined: Thu Sep 13, 2018 12:29 am
Location: Spokane WA. USA

Re: Flexible assemblies. How manage them ?

Post by dan-miel »

Fcaduser
My solution would be to add part suppression to the A2plus program and control them with configurations. At present A2plus has constraint suppression. When you make the constraint invisible it also removes the effect of the constraint. Suppressing a part would suppress all of the constraints and turn the part invisible. A sub assembly would of course work the same as a part so when you suppress a sub assembly all the parts are invisible and constraints are suppressed. Then in the configurations you keep track of what is suppressed, so if you have a door opened and a door closed configuration each configuration would suppress the parts for that configuration.
Do you program? :D
Dan
fcaduser
Posts: 448
Joined: Wed Feb 19, 2014 6:53 pm
Location: Near Paris, France

Re: Flexible assemblies. How manage them ?

Post by fcaduser »

First of all, I don't see any valuable and serious blame that could de made about using underconstrained sub-assemblies, if there is no abuse. Of course, an assembly must always be constrained as fully as possible. What may remain free in term of DOF should be solely due to the fact this assembly is a joint, an actuator, etc. Like a counterpart in the material world .

So in substance an assembly is just a container with additional information about positions. And a tree structure can always be "flattened", this point is essential.

1) Scan from the root assembly all the children then split them in two lists : parts and sub-assemblies. Fetch all constraints related to each part (here the implicit construction of a graph begins.)

2) Iterate through the sub-assemblies list and do the substitution using its children, if necessary, until full depletion. (The trickiest point might be here, you need to do a sort of "concatenation" between constraints bound to a given part, and its father).

At the end you have a graph holding constraints, but exclusively between parts. Then the solver can operate.

So, this is not of course a serious attempt of writing an algorithm, just a very rough and preliminary thinking about what the process could be. Too bad I have not much time to seriously dive into this, yet I have a strong presentiment this problem is not of Himalayan stature. And as I said, the fact there is three potential modules is a complication.
Post Reply