assembly without solver

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

assembly without solver

Post by Zolko »

Hello,

I'm new here on the forum, but have used FreeCAD since at least v0.15. I'm also a mechanical engineer, and have used — and I'm still using — all main CAD programs out there: Catia V5, SolidWorks, Siemens NX, Pro/Engineer ... and also T-Flex, which is lesser known (its Russian, very very good). I have a very deep knowledge of professional CAD platforms.

While the Parts design workbench in FreeCAD is usable, I think that FreeCAD is absolutely unusable for any CAD work as long as there is no Assembly workbench. I've seen over time efforts to make some Assembly module, but so far none have succeeded. No offence meant, you know what I mean. I'm no programmer therefore I won't be able to code anything better.

One difficulty that you — those who actually do the coding, and I thank-you very much for that — seem to encounter is the solving of constraints. But there is also a way to do assemblies without any constraints ! This is what I'll try to explain here.

The very purpose of an assembly is to link several parts into ... well, an assembly. A higher level of goal is to make this dynamic, in the sense that you can have physical links between the parts. But a lesser goal is to link parts together in a static way, such that the parts are placed where they are placed, parametrically of course or that would defeat FreeCAD's purpose, but fixed.

In T-Flex, this is done in a very nice and elegant way: through LCS, Local Coordinate Systems (called Csys in Catia V5). When a part is inserted into an assembly, you choose which of the LCS of the part you want to use (this must pre-exist in the part) and you choose to which target LCS in the assembly you want to link it (this must pre-exist in the assembly) and the part snaps in place. This seems less natural than the constraints way of doing things, but at usage it's much — much much — more logical. For example, if you want to insert a screw, you define an LCS at the hole, an LCS at the neck of the screw, and you're done. This actually forces the designer to think the part in terms of functional behaviour, and not in terms of geometrical features. Once used to it, making assemblies using constraints seems awkward.

In the current FreeCAD (I'm using 0.18-14495) there is a coordinate system created with each body, but I don't see a way to create additional coordinate systems. Therefore, of course, it would not be possible to implement an assembly using coordinate systems.

LCS (or Csys)

So I have a question:would it be possible to allow the creation of local coordinate systems in a part ? These could be defined by an origin (either an existing point or as a specified offset), and 2 directions (X and Y).

Once it's possible to create arbitrary (parametric) coordinate systems it's probably quite trivial to make even complex assemblies, without any need for a constraints solver: when a part is inserted into an assembly, you choose the target LCS in the assembly and the matching LCS in the part, and it's done. If you want to move the part, you can change the parameters of the target LCS (in the assembly)

Later, it should be possible to define degrees of freedom in the LCS and develop constraints to solve them (for example you can leave the rotation around an axis free, or a translation...). The number of degrees of freedom would be limited to those expressly authorised, thus the solver much simpler than having to solve all 6 degrees of freedom for all parts. This can be implemented at a later stage to provide a full assembly functionality that wouldn't lag the leading CAD systems. The assembly workbench of FreeCAD could become it's best selling point.
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
ppemawm
Veteran
Posts: 1240
Joined: Fri May 17, 2013 3:54 pm
Location: New York NY USA

Re: assembly without solver

Post by ppemawm »

Zolko wrote: Mon Dec 17, 2018 10:58 am While the Parts design workbench in FreeCAD is usable, I think that FreeCAD is absolutely unusable for any CAD work as long as there is no Assembly workbench.
I beg to differ. Please see an example: https://forum.freecadweb.org/viewtopic.php?f=24&t=29354
Zolko wrote: Mon Dec 17, 2018 10:58 am When a part is inserted into an assembly, you choose which of the LCS of the part you want to use (this must pre-exist in the part) and you choose to which target LCS in the assembly you want to link it (this must pre-exist in the assembly) and the part snaps in place.
This is essentially how I create my assemblies as I create each body ('part' in your vernacular) in PartDesign. I refer to this as "design in context". Each new body origin is located by the first sketch attachment at its logical mating location. This is parametric (but not dynamic) in the sense that, if I need to move a body, it is quite straight forward to change the body placement properties. Of course, each mating body must also be moved, so in complex assemblies, it can be tedious to make many changes. I use PartDesign "Part" container to collect logical subassemblies so that the part placement or visibility can be quickly changed to isolate the subassemblies, if desired. Changing body or part placement is also an easy way to explode the assembly for graphic purposes.

I have used the A2plus workbench to make assemblies with dynamic constraints, but for me it causes much more work because I like to create all bodies in context in a single file. It is so much easier to maintain that way. Now, if I could just set the assembly constraint at the time of body creation, life would be good...and dynamic!
"It is a poor workman who blames his tools..." ;)
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: assembly without solver

Post by Zolko »

ppemawm wrote: Mon Dec 17, 2018 3:43 pm I like to create all bodies in context in a single file.
Nice work, but if it's all 1 file its not an assembly in the CAD sense. The purpose of an assembly is to have many small(-ish) reusable parts, each editable separately
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
ppemawm
Veteran
Posts: 1240
Joined: Fri May 17, 2013 3:54 pm
Location: New York NY USA

Re: assembly without solver

Post by ppemawm »

Zolko wrote: Mon Dec 17, 2018 4:34 pm many small(-ish) reusable parts, each editable separately
They are editable, parametrically in fact.
"It is a poor workman who blames his tools..." ;)
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: assembly without solver

Post by Zolko »

To be sure to understand: in your example, could I reuse the cylinder head to make a boxer ? And when I modify the cylinder head in the boxer, it's also modified in the star engine ?
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: assembly without solver

Post by saso »

Zolko wrote: Mon Dec 17, 2018 4:34 pm Nice work, but if it's all 1 file its not an assembly in the CAD sense. The purpose of an assembly is to have many small(-ish) reusable parts, each editable separately
Your first argument that constraints are not what makes the assembly is something I am arguing about now for some time, so thank you for some support on that :) But building an assembly from different files or having all of it in one file is also not what makes an assembly. A proper hierarchical tree structure of part and assembly containers is what is the basic of an assembly and everything else eg. constraints, file linking, kinematics, BOM,... are all build on top of that. That we should have independent origin elements (coordinate system axis) has also been said before.
Last edited by saso on Mon Dec 17, 2018 5:53 pm, edited 2 times in total.
User avatar
ppemawm
Veteran
Posts: 1240
Joined: Fri May 17, 2013 3:54 pm
Location: New York NY USA

Re: assembly without solver

Post by ppemawm »

Zolko wrote: Mon Dec 17, 2018 5:19 pm could I reuse the cylinder head to make a boxer ?
Of course, you simply export the body.
Zolko wrote: Mon Dec 17, 2018 5:19 pm And when I modify the cylinder head in the boxer, it's also modified in the star engine ?
Not yet...but wouldn't that be wonderful?
"It is a poor workman who blames his tools..." ;)
kbwbe
Veteran
Posts: 1052
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: assembly without solver

Post by kbwbe »

Hi,
i think everyone should do an assembly in his prefered way. It will be difficult to get consense here in forum.

Coming back to the topic of this thread "assembly without solver"

@Zolko: Perhaps i do not get behind the hidden secrets of your proposals and you have to explain it more detailed to me.
Zolko wrote: Later, it should be possible to define degrees of freedom in the LCS and develop constraints to solve them (for example you can leave the rotation around an axis free, or a translation...). The number of degrees of freedom would be limited to those expressly authorised, thus the solver much simpler than having to solve all 6 degrees of freedom for all parts. This can be implemented at a later stage to provide a full assembly functionality that wouldn't lag the leading CAD systems.
A solver needed ? This differs from threads topic.
Zolko wrote: For example, if you want to insert a screw, you define an LCS at the hole, an LCS at the neck of the screw, and you're done.
...
Later, it should be possible to define degrees of freedom in the LCS and develop constraints to solve them
A constraint is something like a local LCS, combined already with the degrees of freedom. A constraint takes reference points, some axis and (Edit: each half of it) is moved with the body, where it has been defined. OK, it is attached to geometry and cannot be defined without. Where is the advantage of the new proposal ? I do not get it. (no offense, but please explain)
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: assembly without solver

Post by Zolko »

ppemawm wrote: Mon Dec 17, 2018 5:47 pm Not yet...but wouldn't that be wonderful?
well, that would be an assembly, that's the very purpose of it. And if you can't, then it's not an assembly (in the engineering CAD sense). Which doesn't forbid you to do great stuff, like your aero-engine, but then it's a one-off design. More-or-less for fun, not proper engineering.
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
ppemawm
Veteran
Posts: 1240
Joined: Fri May 17, 2013 3:54 pm
Location: New York NY USA

Re: assembly without solver

Post by ppemawm »

Zolko wrote: Mon Dec 17, 2018 6:59 pm More-or-less for fun, not proper engineering.
I have 50+ years of mechanical design and development that begs to differ, again.
Cut my teeth on full-on Unigraphics implementation in a $200M international engineered-products company.

There is usually more than one way to productively 'skin the cat'. Thank goodness.
"It is a poor workman who blames his tools..." ;)
Post Reply