Help with A2Plus. Crankshaft, Connecting Rod and Piston Restrictions and Movements

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
dcapeletti
Posts: 504
Joined: Wed Jul 23, 2014 2:27 pm

Help with A2Plus. Crankshaft, Connecting Rod and Piston Restrictions and Movements

Post by dcapeletti »

Hi, I'm trying to make a crankshaft system, connecting rod and gate or piston. The idea is to apply restrictions in such a way that when the crankshaft rotates upwards, there is an elevation of the gate. This with the restrictions that the model already has works properly.

But the problem is that when the crankshaft rotates, the connecting rod is lifted vertically, which also moves the piston or gate sideways.
In practice, the gate should move vertically but not sideways and the connecting rod should take an angle. Attached is a video recording to show what's going on. https://peertube.video/videos/watch/507 ... f02edb4d04

I hope you can help me on the restriction I must apply to achieve the movement of a crankshaft, connecting rod and gate or piston.

Thanks
Attachments
Vielva.FCStd
(13.8 KiB) Downloaded 43 times
Piston.FCStd
(13.19 KiB) Downloaded 48 times
Compuerta.FCStd
(17.61 KiB) Downloaded 37 times
Cigueñal.FCStd
(12.29 KiB) Downloaded 39 times
Assembly a2plus.FCStd
(14.23 KiB) Downloaded 52 times
kbwbe
Veteran
Posts: 1052
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Help with A2Plus. Crankshaft, Connecting Rod and Piston Restrictions and Movements

Post by kbwbe »

dcapeletti wrote: Tue Oct 23, 2018 2:57 pm Hi, I'm trying to make a crankshaft system, connecting rod and gate or piston. The idea is to apply restrictions in such a way that when the crankshaft rotates upwards, there is an elevation of the gate. This with the restrictions that the model already has works properly.

But the problem is that when the crankshaft rotates, the connecting rod is lifted vertically, which also moves the piston or gate sideways.
In practice, the gate should move vertically but not sideways and the connecting rod should take an angle. Attached is a video recording to show what's going on. https://peertube.video/videos/watch/507 ... f02edb4d04

I hope you can help me on the restriction I must apply to achieve the movement of a crankshaft, connecting rod and gate or piston.

Thanks
Your piston is not guided in X-direction in space. Do a new file and create a cube. Import this cube to your assembly (important). Place the import biside your piston and set the "fixedPosition" property of the cube to "True". Do a planeCoincident constraint between the dummy cube. Now the piston is guided. If you do not want to see the cube, make it invisible. Constraints still work.
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
dcapeletti
Posts: 504
Joined: Wed Jul 23, 2014 2:27 pm

Re: Help with A2Plus. Crankshaft, Connecting Rod and Piston Restrictions and Movements

Post by dcapeletti »

Hello, thank you very much for your help, now it worked as expected.

Now what I would like to achieve is an animation. For example when I change the crankshaft angle using the python API with this command:

Code: Select all

App.ActiveDocument.Cigue__al_001.Placement = App.Placement(App.Vector(0,0,0), App.Rotation(-90,0,0), App.Vector(0,0,0)) 
A2Plus automatically resolves the constraints. Maybe there is an A2plus API that allows you to solve the constraints.

Thanks
User avatar
dcapeletti
Posts: 504
Joined: Wed Jul 23, 2014 2:27 pm

Re: Help with A2Plus. Crankshaft, Connecting Rod and Piston Restrictions and Movements

Post by dcapeletti »

dcapeletti wrote: Wed Oct 24, 2018 12:00 pm Hello, thank you very much for your help, now it worked as expected.

Now what I would like to achieve is an animation. For example when I change the crankshaft angle using the python API with this command:

Code: Select all

App.ActiveDocument.Cigue__al_001.Placement = App.Placement(App.Vector(0,0,0), App.Rotation(-90,0,0), App.Vector(0,0,0)) 
A2Plus automatically resolves the constraints. Maybe there is an A2plus API that allows you to solve the constraints.

Thanks
Solved:

In python console:

Code: Select all

App.ActiveDocument.Cigue__al_001.Placement = App.Placement(App.Vector(0,0,0), App.Rotation(0,0,0), App.Vector(0,0,0)) 

from a2p_solversystem import SolverSystem
solver  = SolverSystem()
solver.solveSystem(App.ActiveDocument)
Sample video https://peertube.video/videos/watch/6f0 ... 06eb4f0d81
Post Reply