assembly without solver
assembly without solver
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.
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.
Re: assembly without solver
I beg to differ. Please see an example: https://forum.freecadweb.org/viewtopic.php?f=24&t=29354
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.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.
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..." 

Re: assembly without solver
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
Re: assembly without solver
They are editable, parametrically in fact.
"It is a poor workman who blames his tools..." 

Re: assembly without solver
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 ?
Re: assembly without solver
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

Last edited by saso on Mon Dec 17, 2018 5:53 pm, edited 2 times in total.
Re: assembly without solver
Of course, you simply export the body.
Not yet...but wouldn't that be wonderful?
"It is a poor workman who blames his tools..." 

Re: assembly without solver
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.
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.
A solver needed ? This differs from threads topic.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 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)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
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
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
Re: assembly without solver
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.
Re: assembly without solver
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..." 
