Tutorial KinematicAssembly: Difference between revisions

From FreeCAD Documentation
(Removed "perpendicular" and "parallel"from the description of the parts. The images provide that information.)
m (Typo)
 
(26 intermediate revisions by 3 users not shown)
Line 2: Line 2:
<translate>
<translate>


<!--T:1-->
{{TutorialInfo
{{TutorialInfo
|Topic=Assemly3, a simple mechanism and a control panel
|Topic=Assembly3, a simple mechanism
|Level=Basic knowledge of Assembly3 tools is helpful
|Level=Basic knowledge of Assembly3 tools is helpful
|FCVersion=0.20 and later
|FCVersion=0.20 and later
|Time=(I don't know yet)
|Time=30 minutes
|Author=[[User:FBXL5|FBXL5]]
|Author=[[User:FBXL5|FBXL5]]
}}
}}


==Introduction==
==Introduction== <!--T:2-->


<!--T:3-->
This tutorial is about how to set up a simple mechanism, mainly with the tools from the external [[Image:Assembly3_workbench_icon.svg|16px]] [[Assembly3_Workbench|Assembly3 Workbench]].
This tutorial is about how to set up a simple mechanism, mainly with the tools from the external [[Image:Assembly3_workbench_icon.svg|16px]] [[Assembly3_Workbench|Assembly3 Workbench]].


<!--T:4-->
The kinematic assembly consists of four parts connected with four joints.
The kinematic assembly we will create consists of four parts: a Base, a Slider, a Crank, and a connecting Rod. They are connected with four joints.


</translate>
</translate>
[[Image:Assembly3_KinematicExample-01.png|400px]]
[[Image:Assembly3_KinematicExample-01.png|400px]]
<translate>
<translate>
<!--T:5-->
{{Caption|Assembled parts: Base (amber), Slider (light blue), connecting Rod (green), Crank (red)}}
{{Caption|Assembled parts: Base (amber), Slider (light blue), Crank (red), connecting Rod (green)}}


==Assembly==
==Assembly== <!--T:6-->


===Parts===
===Parts=== <!--T:7-->


<!--T:8-->
There are four parts in this assembly: Base, Slider, Crank, and connecting Rod.
The '''Base''' is an object with two main geometries, a hole and a pin. Both are cylindrical. The rest of the shape is not relevant for this tutorial unless it causes clashes. The same goes for the other parts.

The '''Base''' is an object with two main geometries, a hole and a pin. Both are cylindrical. The rest of the shape is not relevant for this tutorial unless it clashes with other parts in later steps. The same goes for the other parts.


</translate>
</translate>
Line 33: Line 36:
<translate>
<translate>


<!--T:9-->
The '''Slider''' consists of a shaft with a pin on one end. Both are cylindrical.
The '''Slider''' consists of a shaft with a pin on one end. Both are cylindrical.


Line 39: Line 43:
<translate>
<translate>


<!--T:10-->
The '''Crank''' has a hole and a pin. Both are cylindrical.
The '''Crank''' has a hole and a pin. Again both are cylindrical.


</translate>
</translate>
Line 45: Line 50:
<translate>
<translate>


<!--T:11-->
The '''Rod''' has two cylindrical holes.
The '''Rod''' has two cylindrical holes.


Line 51: Line 57:
<translate>
<translate>


===Joints===
===Joints=== <!--T:12-->


====Locked Base====
====Locked Base==== <!--T:13-->


<!--T:14-->
To keep the assembly at the desired position, the base part should be locked.
To keep the assembly at the desired position, the base part should be locked.
: (If the [[Image:Assembly_LockMover.svg|16px]] [[Assembly3_LockMover|Lock mover]] command is activated, motion tools are deactivated as long as a locked part is selected.)
: (If the [[Image:Assembly_LockMover.svg|16px]] [[Assembly3_LockMover|Lock mover]] command is activated, motion tools are deactivated as long as a locked part is selected.)


<!--T:15-->
# Select one face of the Base.
# Select one face of the Base.
# Press the button {{Button|[[Image:Assembly_ConstraintLock.svg|16px]] [[Assembly3_ConstraintLock|Create "Locked" constraint]]}} to keep the Base in place permanently.
# Press the button {{Button|[[Image:Assembly_ConstraintLock.svg|16px]] [[Assembly3_ConstraintLock|Create "Locked" constraint]]}} to keep the Base in place permanently.
Line 66: Line 74:
[[Image:Assembly3_KinematicExample-09.png|300px]]
[[Image:Assembly3_KinematicExample-09.png|300px]]
<translate>
<translate>
<!--T:16-->
{{Caption|Selected face → Resulting Element}}
{{Caption|Selected face → Resulting Element}}


<!--T:17-->
Then all four parts are connected with four joints. The kinematic chain starts at the base.
Then all four parts are connected with four joints. The kinematic chain starts at the base.


====Base-to-Slider joint====
====Base-to-Slider joint==== <!--T:18-->


<!--T:19-->
The Base-to-Slider joint is a '''cylindrical joint'''. It enables the slider to slide along and spin around the Base-Hole's Z axis while keeping both elements' Z axes aligned (colinear).
The Base-to-Slider joint is a '''cylindrical joint'''. It enables the Slider to slide along and spin around the Base hole's Z axis while keeping both elements' Z axes aligned (colinear).


<!--T:20-->
The matching constraint is the "AxialAlignment" constraint. It works with elements that represent cylindrical geometry such as the cylindrical faces, circular faces and circular edges.
The matching constraint is the "AxialAlignment" constraint. It works with elements that represent cylindrical geometry such as cylindrical faces, circular faces and circular edges.
# Select the cylindrical faces of the Base hole and the Slider shaft.
# Select the cylindrical faces of the Base hole and the Slider shaft.
# Press the button {{Button|[[Image:Assembly_ConstraintAxial.svg|16px]] [[Assembly3_ConstraintAxial|Create "AxialAlignment" constraint]]}}.
# Press the button {{Button|[[Image:Assembly_ConstraintAxial.svg|16px]] [[Assembly3_ConstraintAxial|Create "AxialAlignment" constraint]]}}.
Line 84: Line 96:
[[Image:Assembly3_KinematicExample-11.png|300px]]
[[Image:Assembly3_KinematicExample-11.png|300px]]
<translate>
<translate>
<!--T:21-->
{{Caption|Selected faces → Aligned objects}}
{{Caption|Selected faces → Aligned objects}}


====Base-to-Crank joint====
====Base-to-Crank joint==== <!--T:22-->


<!--T:23-->
The Base-to-Crank joint is a '''hinge joint'''. It enables the Crank to spin around the Base-Hole's Z axis while keeping both elements' Z axes aligned (colinear) and the offset between their XY planes constant.
The Base-to-Crank joint is a '''hinge joint'''. It enables the Crank to spin around the Base pin's Z axis while keeping both elements' Z axes aligned (colinear) and the offset between their XY planes constant.


<!--T:24-->
The matching constraint is the "PlaneCoincident" constraint. It works with elements that represent that represent planar geometry such as circular faces and circular edges (in this case).
The matching constraint is the "PlaneCoincident" constraint. It works with elements that represent planar geometry such as circular faces and circular edges (in this case).
# Select the circular face or edge of the Base pin and a circular edge of the Crank hole.
# Select the circular face or the outer circular edge of the Base pin, and the outer circular edge of the Crank hole.
# Press the button {{Button|[[Image:Assembly_ConstraintCoincidence.svg|16px]] [[Assembly3_ConstraintCoincidence|Create "PlaneCoincident" constraint]]}}.
# Press the button {{Button|[[Image:Assembly_ConstraintCoincidence.svg|16px]] [[Assembly3_ConstraintCoincidence|Create "PlaneCoincident" constraint]]}}.
# Optionally relabel the created elements.
# Optionally relabel the created elements.
Line 100: Line 115:
[[Image:Assembly3_KinematicExample-13.png|300px]]
[[Image:Assembly3_KinematicExample-13.png|300px]]
<translate>
<translate>
<!--T:25-->
{{Caption|Selected face and edge → Aligned objects}}
{{Caption|Selected face and edge → Aligned objects}}


====Slider-to-Rod joint====
====Slider-to-Rod joint==== <!--T:26-->


<!--T:27-->
The Slider-to-Rod joint is a '''hinge joint'''. It enables the Rod to spin around the Slider-Pin's Z axis while keeping both elements' Z axes aligned (colinear) and the offset between their XY planes constant.
The Slider-to-Rod joint is a '''hinge joint'''. It enables the Rod to spin around the Slider pin's Z axis while keeping both elements' Z axes aligned (colinear) and the offset between their XY planes constant.


<!--T:28-->
The matching constraint is the "PlaneCoincident" constraint (see above).
The matching constraint is the "PlaneCoincident" constraint (see above).
# Select the circular face or edge of the Slider pin and a circular edge of the Rod hole.
# Select the circular face or the outer circular edge of the Slider pin, and the outer circular edge of the Rod hole.
# Press the button {{Button|[[Image:Assembly_ConstraintCoincidence.svg|16px]] [[Assembly3_ConstraintCoincidence|Create "PlaneCoincident" constraint]]}}.
# Press the button {{Button|[[Image:Assembly_ConstraintCoincidence.svg|16px]] [[Assembly3_ConstraintCoincidence|Create "PlaneCoincident" constraint]]}}.
# Optionally relabel the created elements.
# Optionally relabel the created elements.
Line 116: Line 134:
[[Image:Assembly3_KinematicExample-15.png|300px]]
[[Image:Assembly3_KinematicExample-15.png|300px]]
<translate>
<translate>
<!--T:29-->
{{Caption|Selected face and edge → Aligned objects}}
{{Caption|Selected face and edge → Aligned objects}}


====Crank-to-Rod joint====
====Crank-to-Rod joint==== <!--T:30-->


<!--T:31-->
The Crank-to-Rod joint is a '''cylindrical joint'''. It enables the slider to slide along and spin around the Base-Hole's Z axis while keeping both elements' Z axes aligned (colinear). The movement along the Z axis is already restricted through the combination of Base-to-Crank joint and Slider-to-Rod joint.
The Crank-to-Rod joint is a '''cylindrical joint'''. It enables the Rod to spin around and slide along the Crank pin's Z axis while keeping both elements' Z axes aligned (colinear). But only spinning will be possible as the sliding movement is restricted through the combination of the Base-to-Crank joint and the Slider-to-Rod joint.


<!--T:32-->
The matching constraint is the "AxialAlignment" constraint (see above).
The matching constraint is the "AxialAlignment" constraint (see above).
# Select the cylindrical faces of the Crank pin and the Rod hole.
# Select the cylindrical faces of the Crank pin and the Rod hole.
Line 132: Line 153:
[[Image:Assembly3_KinematicExample-01.png|300px]]
[[Image:Assembly3_KinematicExample-01.png|300px]]
<translate>
<translate>
<!--T:33-->
{{Caption|Selected faces → Aligned objects}}
{{Caption|Selected faces → Aligned objects}}


====Redundant Constraints====
====Redundant Constraints==== <!--T:34-->


<!--T:35-->
When the Base is fixed and all four joints are constrained two messages appear in the [[Report_view|Report view]]:
When the Base is fixed and all four joints are constrained two messages appear in the [[Report_view|Report view]]:
* A warning (orange): "...redundant constraints".
* A warning (orange): "...redundant constraints".
* A simple message (black): "...dof remaining: 0".
* A simple message (black): "...dof remaining: 0".


<!--T:36-->
This combination of messages occurs when parts of an assembly are over-constrained but the solver is still able to find a valid solution. But what causes the redundacy?
This combination of messages occurs when parts of an assembly are over-constrained but the solver is still able to find a valid solution. But what causes the redundacy?


<!--T:37-->
It is the Z direction of the pins. If we take a look at the Slider pin for example we will notice that the Z axis of its element object is constrained parallel to the Base pin's Z axis through the assembly chain Base-Crank-Rod-Slider. This means that the Slider pin is prevented from rotating around its X and Y axes.
It is the Z direction of the pins. If we take a look at the Slider pin for example we will notice that the Z axis of its element object is constrained parallel to the Base pin's Z axis through the assembly chain Base-Crank-Rod-Slider. This means that the Slider pin is prevented from rotating around its X and Y axes.


Line 148: Line 173:
<translate>
<translate>


<!--T:38-->
On the other hand the rotation around the X axis (red) is already prevented by the Base-to-Crank joint; and so the corresponding degree of freedom (dof) is constrained twice (= redundant) and causes the warning.
On the other hand the rotation around the X axis (red) is already prevented by the Base-to-Crank joint; and so the corresponding degree of freedom (dof) is constrained twice (= redundant) and causes the warning.
: To avoid this redundancy an auxilliary object and corresponding constraints could be inserted, but that is for some other tutorial.
: To avoid this redundancy an auxilliary object and corresponding constraints could be inserted, but that is for some other tutorial.
: To avoid double constraining the offset between base and Rod, different constraints were used, with only one of them fixing the motion along the Z axis.
: To avoid double constraining the offset between base and Rod, different constraints were used, with only one of them fixing the motion along the Z axis.


===Actuator===
===Actuator=== <!--T:39-->


<!--T:40-->
Now it is still a static assembly. To turn it into a kinematic assembly one constraint has to be used as an actuator. To use the "PlaneCoincident" constraint of the Base-to-Crank joint as an actuator, we need to control the angle between Base pin and Crank. This can be done by setting the property {{PropertyData|Lock Angle}} to {{TRUE}}. And for later use the label is marked with the suffix '''.Driver'''.
Now it is still a static assembly. To turn it into a kinematic assembly one constraint has to be used as an actuator. To use the "PlaneCoincident" constraint of the Base-to-Crank joint as an actuator, we need to control the angle between Base pin and Crank. This can be done by setting the property {{PropertyData|Lock Angle}} to {{TRUE}}. And for later use the label is marked with the suffix '''.Driver'''.


<!--T:41-->
The {{PropertyData|Angle}} property can now be used to spin the Crank.
The {{PropertyData|Angle}} property can now be used to spin the Crank.


Line 162: Line 190:
<translate>
<translate>


==Controller==
==Controller== <!--T:42-->


<!--T:43-->
To have a dialog window to change property values without typing and with automatic recomputation would be nice.
To have a dialog window to change property values without typing and with automatic recomputation would be nice.


<!--T:44-->
Have a look at the [[Tutorial_KinematicController|Kinematc Controller]] tutorial.
Have a look at the [[Tutorial_KinematicController|Kinematic Controller]] tutorial.





Latest revision as of 08:28, 8 June 2022

Other languages:
Tutorial
Topic
Assembly3, a simple mechanism
Level
Basic knowledge of Assembly3 tools is helpful
Time to complete
30 minutes
Authors
FBXL5
FreeCAD version
0.20 and later
Example files
None
See also
None

Introduction

This tutorial is about how to set up a simple mechanism, mainly with the tools from the external Assembly3 Workbench.

The kinematic assembly we will create consists of four parts: a Base, a Slider, a Crank, and a connecting Rod. They are connected with four joints.

Assembled parts: Base (amber), Slider (light blue), Crank (red), connecting Rod (green)

Assembly

Parts

The Base is an object with two main geometries, a hole and a pin. Both are cylindrical. The rest of the shape is not relevant for this tutorial unless it causes clashes. The same goes for the other parts.

The Slider consists of a shaft with a pin on one end. Both are cylindrical.

The Crank has a hole and a pin. Again both are cylindrical.

The Rod has two cylindrical holes.

Joints

Locked Base

To keep the assembly at the desired position, the base part should be locked.

(If the Lock mover command is activated, motion tools are deactivated as long as a locked part is selected.)
  1. Select one face of the Base.
  2. Press the button Create "Locked" constraint to keep the Base in place permanently.

Selected face → Resulting Element

Then all four parts are connected with four joints. The kinematic chain starts at the base.

Base-to-Slider joint

The Base-to-Slider joint is a cylindrical joint. It enables the Slider to slide along and spin around the Base hole's Z axis while keeping both elements' Z axes aligned (colinear).

The matching constraint is the "AxialAlignment" constraint. It works with elements that represent cylindrical geometry such as cylindrical faces, circular faces and circular edges.

  1. Select the cylindrical faces of the Base hole and the Slider shaft.
  2. Press the button Create "AxialAlignment" constraint.
  3. Optionally relabel the created elements (edit their DataLabel property).

Selected faces → Aligned objects

Base-to-Crank joint

The Base-to-Crank joint is a hinge joint. It enables the Crank to spin around the Base pin's Z axis while keeping both elements' Z axes aligned (colinear) and the offset between their XY planes constant.

The matching constraint is the "PlaneCoincident" constraint. It works with elements that represent planar geometry such as circular faces and circular edges (in this case).

  1. Select the circular face or the outer circular edge of the Base pin, and the outer circular edge of the Crank hole.
  2. Press the button Create "PlaneCoincident" constraint.
  3. Optionally relabel the created elements.

Selected face and edge → Aligned objects

Slider-to-Rod joint

The Slider-to-Rod joint is a hinge joint. It enables the Rod to spin around the Slider pin's Z axis while keeping both elements' Z axes aligned (colinear) and the offset between their XY planes constant.

The matching constraint is the "PlaneCoincident" constraint (see above).

  1. Select the circular face or the outer circular edge of the Slider pin, and the outer circular edge of the Rod hole.
  2. Press the button Create "PlaneCoincident" constraint.
  3. Optionally relabel the created elements.

Selected face and edge → Aligned objects

Crank-to-Rod joint

The Crank-to-Rod joint is a cylindrical joint. It enables the Rod to spin around and slide along the Crank pin's Z axis while keeping both elements' Z axes aligned (colinear). But only spinning will be possible as the sliding movement is restricted through the combination of the Base-to-Crank joint and the Slider-to-Rod joint.

The matching constraint is the "AxialAlignment" constraint (see above).

  1. Select the cylindrical faces of the Crank pin and the Rod hole.
  2. Press the button Create "AxialAlignment" constraint.
  3. Optionally relabel the created elements.

Selected faces → Aligned objects

Redundant Constraints

When the Base is fixed and all four joints are constrained two messages appear in the Report view:

  • A warning (orange): "...redundant constraints".
  • A simple message (black): "...dof remaining: 0".

This combination of messages occurs when parts of an assembly are over-constrained but the solver is still able to find a valid solution. But what causes the redundacy?

It is the Z direction of the pins. If we take a look at the Slider pin for example we will notice that the Z axis of its element object is constrained parallel to the Base pin's Z axis through the assembly chain Base-Crank-Rod-Slider. This means that the Slider pin is prevented from rotating around its X and Y axes.

On the other hand the rotation around the X axis (red) is already prevented by the Base-to-Crank joint; and so the corresponding degree of freedom (dof) is constrained twice (= redundant) and causes the warning.

To avoid this redundancy an auxilliary object and corresponding constraints could be inserted, but that is for some other tutorial.
To avoid double constraining the offset between base and Rod, different constraints were used, with only one of them fixing the motion along the Z axis.

Actuator

Now it is still a static assembly. To turn it into a kinematic assembly one constraint has to be used as an actuator. To use the "PlaneCoincident" constraint of the Base-to-Crank joint as an actuator, we need to control the angle between Base pin and Crank. This can be done by setting the property DataLock Angle to true. And for later use the label is marked with the suffix .Driver.

The DataAngle property can now be used to spin the Crank.

Controller

To have a dialog window to change property values without typing and with automatic recomputation would be nice.

Have a look at the Kinematic Controller tutorial.