Tutorial KinematikSkelett

From FreeCAD Documentation
Revision as of 09:45, 17 July 2022 by FBXL5 (talk | contribs) (Created page with "===Antrieb===")
Other languages:
Tutorium
Thema
Assembly3, ein Kinematik-Skelett
Niveau
Grundwissen über Assembly3 und Sketcher ist hilfreich
Zeit zum Abschluss
40 Minuten
Autoren
FBXL5
FreeCAD-Version
0.20 und neuer
Beispieldateien
None
Siehe auch
None

Einleitung

In dieser Anleitung geht es darum, einen einfachen 2D-Mechanismus zu erstellen und daran 3D-Objekte zu befestigen, hauptsächlich mit den Werkzeugen des externen Arbeitsbereichs Assembly3.

Diese Anleitung verwendet nicht das Skeleton-Sketch-Prinzip (siehe Assembly3 Create-Skeleton-Sketch auf GitHub).

Stattdessen werden PartDesign Bodies (Körper) verwendet, die jeweils nur eine Skizze enthalten, um einen 2D-Mechanismus aufzubauen, ein Skizzen-Skelett.

Die Maße und die Farben wurden von der Anleitung SolveSpace tutorial übernommen, auf die sich auch die Assembly3-GitHub-Seite bezieht (siehe oben).

Skizzen-Skelett

Dieses sogenannte Skizzen-Skelett besteht aus mehreren einzelnen Körpern und einem Assembly-Container. Um weitere Objekte befestigen zu können, wird jeder Körper in einen eigenen Assembly-Container gepackt.

2D-Body-Objekte

Die Körper (Bodies) und ihre Skizzen, die in diesem Zusammenbau (auch Baugruppe genannt) verwendet werden:

  • Eine Grundplatte (grün)
  • Eine Kurbel (blau)
  • Zwei bewegliche Scheiben (rot und grau)
  • Vier Verbindungsstangen (weiß, gelb, lila und braun)

Alle acht Skizzen sind unterschiedlich eingefärbt und durch das Verschieben ihrer übergeordneten Körper, manuell positioniert

Die Form kann von dem tatsächlichen Teil abweichen, aber die Position der Geometrien, die die Gelenke festlegen, müssen genau sein.

Assembly-Container

Übergeordneter Zusammenbau

Um die Positionen aller Körper festzusetzen oder zu steuern, braucht man ein Assembly-Objekt. Das fügt dem Konstruktionsbaum in der Baumansicht einen Ast für den Zusammenbau hinzu.

Unterbaugruppen

Diese Aktion wiederholt man, um für jeden Körper (Body) ein Assembly-Objekt zu erstellen, in dessen Parts-Container das jeweilige Body-Objekt gezogen wird. Danach setzt man den Körper in seiner Baugruppe fest:

  1. Das Assembly-Objekt aktivieren (Doppelklick).
  2. Einen Kreis/Bogen auswählen, der zum Body-Objekt gehört.
  3. Die Schaltfläche Create "Locked" constraint drücken, um den Körper innerhalb seiner Unterbaugruppe festzusetzen.

Die Kurbelbaugruppe sollte beispielsweise so aussehen:

Der Unterbaugruppenast der Kurbel in der Baumansicht und die Kurbel mit ihrem festgesetzten Element in der 3D-Ansicht

Konstruktionsbaum

In der Baumansicht werden alle Unterbaugruppenäste in den Parts-Container des übergeordneten Assembly-Objekts gezogen.

Zusammenbauast in der Baumansicht

Jetzt sind sie bereit, angeordnet zu werden.

Festgesetzte Grundplatte

Als Erstes braucht man ein unbewegliches Teil. Um die Grundplatte komplett festzusetzen, würde man normalerweise eine Fläche auswählen, aber in diesem Falle funktioniert es auch mit einem Kreis.

  1. Einen Kreis der Grundplatte auswählen.
  2. Die Schaltfläche Create "Locked" constraint drücken, um die Grundplatte festzusetzen.

Der ausgewählte Kreis → Die festgesetzte Grundplatte mit dem erzeugten Element-Objekt dessen Element-Koordinatemsystem (EKS) angezeigt wird (grün)

Gelenke

For hinge-like joints we select one circle of each sketch and use the Plane Coincidence constraint. It not only sets both Element's XY planes coplanar, but sets their Z axes colinear, too.

  1. Select a circle of each object to connect.
  2. Press the Create "Plane Coincidence" constraint button.

Grundplatte - Kurbel

Circles on Base and Crank selected → Relocated Crank with the created Element objects and ECSs displayed (green)

Grundplatte - Obere Scheibe

Circles on Base and Upper Plate selected → Relocated Upper Plate

Previously created joints can be identified by their constraint representations (red).

Kurbel - Stange 1

Circles on Crank and Rod 1 selected → Relocated Rod 1 and tilted Crank

Obere Scheibe - Stange 1

The last link in this kinematic chain connects two Elements whose Z directions are already defined and a Point on line constraint is all we need.

  1. Select a circle of each object to connect.
  2. Press the Create "PointOnLine" constraint button.

Circles on Upper Plate and Rod 1 selected → Relocated Rod 1, and tilted Crank and Upper Plate

If the 3 joints are colinear (those belonging to Crank and Rod 1), the solver might fail to rearrange the objects. In that case we need to help the solver and tilt one object (e.g. the Crank) manually using the Axial move tool.

Obere Scheibe - Stange 2

Another kinematic (sub-)chain starts with Plane Coincidence constraints.

Circles on Upper Plate (or Base) and Rod 2 selected → Relocated Rod 2

Stange 2 - Untere Scheibe

Circles on Rod 2 and Lower Plate selected → Relocated Lower Plate and tilted Rod 2

Obere Scheibe - Stange 3

Circles on Upper Plate and Rod 3 selected → Relocated Rod 3 and rearranged upper kinematic sub-chain

Untere Scheibe - Stange 3

And this kinematic (sub-)chain ends with a Point on line constraint, too.

Circles on Lower Plate and Rod 3 selected → Relocated Rod 3 and rearranged ukinematic sub-chains

To connect both kinematic sub-chains we use Rod 4 with a Plane Coincidence constraint on one end and a Point on line constraint on the other.

Kurbel - Stange 4

Circles on Crank and Rod 4 selected → Relocated Rod 4

Untere Scheibe - Stange 4

Circles on Lower Plate and Rod 4 selected → Relocated Rod 4 and final layout of kinematic assembly

Antrieb

Since Assembly3 doesn't provide any means to control kinematic assemblies, we need external assistance such as this kinematic controller. To use this controller we need to mark one constraint's label with the suffix "Driver" to make it a driving constraint. It may be separated by a "." or "-" for clarity, as the controller will only check if the label ends with "Driver".

We therefore change the label of the Base-Crank joint to Base-Crank.Driver.

Finished skeleton

The finished kinematic assembly with deactivated representation of Elements and Constraints should look like this:

Finished assembly in the Tree view and the 3D view

GIF animation made from an image sequence from this kinematic controller

Attaching 3D geometry

My expectations about attaching a new object to a base object belonging to a kinematic assembly were something like:

  • Put the new object into the base objects Parts container.
  • Position the new object in relation to the base object.
  • Fix the relative offset and orientation using the Attachment constraint.

But that would have been too easy.


The Assembly3 ConstraintAttachment tool, like any Assembly3 constraint tool, relies on the use of Element objects and their element coordinate systems (ECSs) for positioning tasks.

And so attaching objects is just another way of adding objects to a (sub-)assembly.


Let's attach Rod 4-3D to Rod 4 for example:

The objects have a different orientation and the 3D object should have an offset from the 2D object.

  1. Put the new object into the base objects Parts container.
  2. Select two corresponding circles or arcs.
  3. Press the Create "Attachment" constraint.

Rod 4 (locked) and Rod 4-3D → Selected arcs → Relocated Rod 4-3D (both ECSs are in the same place with identical orientation)

It is now plain to see that the Assembly3 ConstraintAttachment tool ignores the offset and orientation between both objects.

However the position is already defined as we wanted and so we only need to adapt the angle manually and define the desired offset:

  • Set the DatenOffset, Angle of the first Element in the Attachment container to match the orientation.
  • Set the DatenOffset, Position, z of the same Element to apply an offset.

In case we set the properties of the second Element, the movement of angle and offset would go in the opposite direction.

As attached → Angle adapted → Offset defined

If there is a 3D object attached to each 2D object, it could look like this:

Notes

The section Attaching 3D geometry just scratches the surface of extending a sub-assembly, and other constraints or combinations of constraints may be more suitable than the attachment constraint.

It is important to move such a kinematic assembly in tiny steps or the solver will give up and fail. It is almost impossible to use Move part or Axial move for this task.

The Assembly3_ConstraintCoincidence constraint is used to drive the kinematic assembly, its property DatenAngle (enabled by the property DatenLock Angle) accepts positive or negative floating point numbers greater than 360 and so could do several full turns.