Manage constraints through sub-assembly ?
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Manage constraints through sub-assembly ?
Hello developpers.
I would like to ask you something about the future assembly workbench development, whatever assembly WB would be eventually chosen.
Question : is the management of constraint solving through a tree hierarchy already envisaged ?
Here is a perfect example to clarify :
Imagine two shafts included in an assembly (say a machine frame assembly.) Besides them, consider a sub-assembly which is an universal joint (cardan type.) In the UJ sub-assembly, the spider would be for example locally fixed (set as the reference part of the UJ), and both yokes leaved each with a rotation (1 DOF.) Then the UJ is inserted into the aforementioned frame upper assembly. So, you can see the critical point, the constraint solver should apply alignment of each yoke with shaft *through* the UJ sub-assembly and therefore not consider it as monolithic.
IMHO it's a critical feature to keep a well-structured hierarchy for huge project (not be obliged to awkwardly split some assembly just because difficulties related to constraints appear.) So I would like to know, is this bringing some challenging problem to the code ?
Thank you.
I would like to ask you something about the future assembly workbench development, whatever assembly WB would be eventually chosen.
Question : is the management of constraint solving through a tree hierarchy already envisaged ?
Here is a perfect example to clarify :
Imagine two shafts included in an assembly (say a machine frame assembly.) Besides them, consider a sub-assembly which is an universal joint (cardan type.) In the UJ sub-assembly, the spider would be for example locally fixed (set as the reference part of the UJ), and both yokes leaved each with a rotation (1 DOF.) Then the UJ is inserted into the aforementioned frame upper assembly. So, you can see the critical point, the constraint solver should apply alignment of each yoke with shaft *through* the UJ sub-assembly and therefore not consider it as monolithic.
IMHO it's a critical feature to keep a well-structured hierarchy for huge project (not be obliged to awkwardly split some assembly just because difficulties related to constraints appear.) So I would like to know, is this bringing some challenging problem to the code ?
Thank you.
Last edited by fcaduser on Sun Nov 24, 2019 12:02 pm, edited 1 time in total.
Re: Manage constraints through sub-assembly ?
It may be a good idea if you provide the subparts of such an assembly, so it is easier to compare the different approaches.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Manage constraints through sub-assembly ?
Is my explanation clear enough ?
Anyway, I can provide you a minimal yet typical test case, of course.
Anyway, I can provide you a minimal yet typical test case, of course.
Re: Manage constraints through sub-assembly ?
Here is further information and an example.
1) I use A2+
2) You can see the tree structure in the left panel (UJ is a sub-assembly.)
3) Tar joined.
1) I use A2+
2) You can see the tree structure in the left panel (UJ is a sub-assembly.)
3) Tar joined.
- Attachments
-
- Test.tar
- (110 KiB) Downloaded 59 times
-
- Capture d’écran de 2019-11-24 12-32-43.png (168.42 KiB) Viewed 3613 times
Re: Manage constraints through sub-assembly ?
this is not the correct way of doing this, and I don't think that there are CAD systems out there that can handle this use-case. I had a similar problem in CATIA and I had to jump through hoops to get it working.fcaduser wrote: ↑Sat Nov 23, 2019 7:22 pm Imagine two shafts included in an assembly (say a machine frame assembly.) Besides them, consider a sub-assembly which is an universal joint (cardan type.) In the UJ sub-assembly, the spider would be for example locally fixed (set as the reference part of the UJ), and both yokes leaved each with a rotation (1 DOF.) Then the UJ is inserted into the aforementioned frame upper assembly. So, you can see the critical point, the constraint solver should apply alignment of each yoke with shaft *through* the UJ sub-assembly and therefore not consider it as monolithic.
The correct way to do is not to consider the cardan as an assembly, but as separate parts, that are assembled into the assembly and attached to their respective LCS. The LCS are positioned and calculated with a master sketch. I attached the assembly (made with Assembly4). It was actually trickier than I thought, but I think this is an exact solution.
you can animate the rotation with:
Code: Select all
vars = App.ActiveDocument.getObject('Variables')
step = 2
for angle in range( 0, 720+step, step ):
vars.Angle_rot = angle
App.ActiveDocument.recompute()
FreeCADGui.updateGui()
- Attachments
-
- asm_Cardan.FCStd
- (99.88 KiB) Downloaded 74 times
Re: Manage constraints through sub-assembly ?
Thank you for replying.
I'm quite surprised, so high-end CADs don't handle this very mundane situation more cleverly ? In my opinion, the ultimate goal of a CAD should be to tend to mimic as close as possible the material world. And an UN joint should definitively set as an independent assembly (and so not fully constrained), and the tree (d/f) a reflection of it. So I dislike the suggested approach.
This is why I directly post this problem here. Is there some fundamental hurdle to overcome ?
I'm quite surprised, so high-end CADs don't handle this very mundane situation more cleverly ? In my opinion, the ultimate goal of a CAD should be to tend to mimic as close as possible the material world. And an UN joint should definitively set as an independent assembly (and so not fully constrained), and the tree (d/f) a reflection of it. So I dislike the suggested approach.
This is why I directly post this problem here. Is there some fundamental hurdle to overcome ?
Re: Manage constraints through sub-assembly ?
I'm waiting impatiently to see your cleverer solution.
Then you are wrong: the purpose of a CAD system is to BUILD the real world.In my opinion, the ultimate goal of a CAD should be to tend to mimic as close as possible the material world.
Re: Manage constraints through sub-assembly ?
Don't get me wrong. It's a limitation of CATIA, clearly. I wasn't saying there is a *better* solution than your proposal. I too regularly use some unsatisfactory solution to circumvent obstacles raised while using CAD. But I stick to my view, I think this is a patch.
Well... first model, then build.
Well... first model, then build.
Re: Manage constraints through sub-assembly ?
I did a very quick search and actually commercial CADs are able to manage this problem. I would have been be surprised of the contrary. Really, this is not an anecdotal problem. For huge project it's of tremendous importance to keep a very well structured tree. An assembly must be constituted with the parts that make it a coherent functional entity, no matter if some part must be leaved with some degree of liberty within.
Two examples with CATIA and SW. They call this "flexible sub-assembly" (vs rigid):
https://www.youtube.com/watch?v=v8KFHWGtq3I
https://www.youtube.com/watch?v=3JZ6xQ4O5Ig
Two examples with CATIA and SW. They call this "flexible sub-assembly" (vs rigid):
https://www.youtube.com/watch?v=v8KFHWGtq3I
https://www.youtube.com/watch?v=3JZ6xQ4O5Ig
Re: Manage constraints through sub-assembly ?
After further investigation...
All commercial CADs have addressed this problem (CATIA, SW, SE, Inventor, Creo.) They call that rigid vs flexible/adjustable assembly, etc. But it boils down to what I was talking about : leave a sub-assembly with some DOF free inside then fully constrain it in the upper assembly.
I'm still very interested to hear developers about this subject, even if it's a laconic : "We are well aware of this problem, but this would require a lot of work or we are hitting some difficulties, so we will see later..."
Great new year for all and FC.
All commercial CADs have addressed this problem (CATIA, SW, SE, Inventor, Creo.) They call that rigid vs flexible/adjustable assembly, etc. But it boils down to what I was talking about : leave a sub-assembly with some DOF free inside then fully constrain it in the upper assembly.
I'm still very interested to hear developers about this subject, even if it's a laconic : "We are well aware of this problem, but this would require a lot of work or we are hitting some difficulties, so we will see later..."
Great new year for all and FC.