Mechanical DOFs simulator

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
User avatar
NewJoker
Veteran
Posts: 3018
Joined: Sun Oct 11, 2020 7:49 pm

Mechanical DOFs simulator

Post by NewJoker »

Hi,

for educational purposes, I'm looking for mechanical degrees of freedom (DOFs) simulator. I don't think that such software exists but it might be possible to do it in FreeCAD with existing tools and scripting. Basically, what I need is a possibility to apply constraints on selected DOFs (mainly translational but rotational could be also helpful in the future) of vertices, edges and faces. Those constraints would utilize global coordinate system directions but it would be also great to be able to operate with local coordinate systems. After applying constraints it would be possible to drag the model in such a way that the constraints are respected (like dragging in the Sketcher). This is quite similar to what assembly workbenches allow but I'm talking about individual parts and constraints would be different (not meant for connecting parts or fixing them completely but allowing for fixing in different directions). This description can be quite ambiguous so let me present some examples:

1) a single vertex of a cube is constrained in all directions (translations in 3 global axes) - the cube can only rotate about that vertex when dragged
2) 3 vertices (not lying on the same straight line) are constrained in all directions - the cube can't move at all
3) a single edge is constrained in all directions - the cube can rotate about that edge
4) a single face is constrained in all directions - the cube can't move at all
5) a single face is constrained in the direction normal to it - the cube can slide in the remaining two directions
6) two orthogonal faces are constrained in directions normal to them - the cube can slide in the remaining single direction
7) three orthogonal faces are constrained in directions normal to them - the cube can't move

Those are just selected examples and there would be more options with constraints applied to rotational DOFs (for example, constraining all 6 DOFs of a single edge would remove any movement).

Do you think that it's doable ? How would you approach this ?
User avatar
NewJoker
Veteran
Posts: 3018
Joined: Sun Oct 11, 2020 7:49 pm

Re: Mechanical DOFs simulator

Post by NewJoker »

@realthunder and @Zolko Your assembly workbenches use similar constraint tools, as I've mentioned above. May I ask for your opinion about the feasibility of this task ?
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Mechanical DOFs simulator

Post by thschrader »

Maybe the Manipulator-wb, Mover Tools, as a quick start?
rotate_cube_axis.JPG
rotate_cube_axis.JPG (70.89 KiB) Viewed 424 times
User avatar
NewJoker
Veteran
Posts: 3018
Joined: Sun Oct 11, 2020 7:49 pm

Re: Mechanical DOFs simulator

Post by NewJoker »

thschrader wrote: Sat Aug 06, 2022 8:01 am Maybe the Manipulator-wb, Mover Tools, as a quick start?
Thank you for the reply. I would definitely prefer dragging like in the Sketcher than numerical input of translation/rotation values but it can be a good start. However, a way to constrain vertices, edges and faces in the directions of the global coordinate system would still be necessary. Maybe I should ask on the scripting subforum since predefined solutions for that likely don't exist and Python codes might be able to achieve that.
Post Reply