Draft Textform Tutorium

From FreeCAD Documentation
Revision as of 15:39, 24 November 2019 by FuzzyBot (talk | contribs) (Updating to match new version of source page)
Tutorium
Thema
ShapeString (Draft workbench)
Niveau
Beginner
Zeit zum Abschluss
30 minutes
Autoren
r-frank
FreeCAD-Version
0.16.6704
Beispieldateien
Draft_Shapestring_Text
Siehe auch
None

Einleitung

In diesem Tutorial wird behandelt, wie man

  • einen Text mit dem ShapeString Werkzeug einfügt
  • ihn extrudiert zu einem Festkörper (Solid)
  • den Solid in 3D positioniert mit placement und Draft Move mit der Hilfe von Skizzen
  • ein Gravur herstellt durch eine boolsche Verschneidung

This tutorial was originally written by Roland Frank (†2017, r-frank), and it was rewritten and re-illustrated by vocx.

This tutorial describes a method to create 3D text and use it with solid objects. We will discuss how to

To use ShapeStrings inside the PartDesign Workbench go to the end of this tutorial.

Final model of the engraved text.

Es wird empfohlen, zuerst das Sketcher Tutorial durchzuarbeiten.

Setup

1. Open FreeCAD, create a new empty document with File → New, and switch to the Part Workbench.

1.1. Press the View isometric button, or press 0 in the numerical pad of your keyboard, to change the view to isometric to visualize the 3D solids better.
1.2. Press the View fit all button whenever you add objects in order to pan and zoom the 3D view so that all elements are seen in the view.
1.3. Hold Ctrl while you click to select multiple items. If you selected something wrong or want to de-select everything, just click on empty space in the 3D view.

Herstellung des Grundkörpers

  • Starten Sie FreeCAD und erstellen Sie eine neues Dokument
  • Wechseln Sie in den Arbeitsbereich "Part"
  • Fügen Sie einen Würfel ein durch Klick auf
  • Stellen Sie sicher, dass der Würfel in der Baumansicht ausgewählt ist
  • Ändern Sie seine Breite auf 31 mm durch Benutzung des Data-Tab in der Eigenschaften-Anzeige
  • Klicken Sie auf um zur axometrischen Ansicht zu wechseln
  • Klicken Sie auf um auf Alles zu zoomen
  • Wählen Sie die obere Kante der Frontfläche des Würfels in der 3D-Ansicht
  • Fügen Sie eine Fase an Kante6 an durch Klick auf
  • Stellen Sie sicher, dass das Objekt "Chamfer" in der Baumansicht ausgewählt ist und drücken Sie die Leertaste, um den Körper auszublenden

2. Insert a primitive cube by clicking on Box.

2.1. Select Cube in the tree view.
2.2. Change the dimensions in the Data tab of the property editor.
2.3. Change Width to 31 mm.

3. Create a chamfer.

3.1. Select the upper edge (Edge6) on the front face of the Cube in the 3D view.
3.2. Press Chamfer.
3.3. In the Chamfer edges task panel go to Selection, choose Select edges. As Fillet type choose Constant length, then set Length to 5 mm.
3.4. Press OK. This will create a Chamfer object.
3.5. In the tree view, select Chafmer, in the View tab change the value of Line Width to 2.0.

Base object created from a cube and a chamfer operation.

Einfügen von Text mit dem Draft Shapestring-Tool

  • Wechseln Sie in den Arbeitsbereich "Draft"
  • Stellen Sie sicher, dass nichts in der Baumansicht ausgewählt ist
  • Definieren Sie die Arbeitsebene als die XY-Ebene durch Klick auf Auto und Klick auf XY
  • Fügen Sie den Text "FreeCAD" ein durch
    • Klick auf
    • Markieren Sie den Text im Feld "Global X" und drücken Sie "0" auf der Tastatur und drücken Sie danach Template:Key
    • Klick auf
    • Markieren Sie den Text im Feld "Global Y" und drücken Sie "0" auf der Tastatur und drücken Sie danach Enter
    • Klick auf
    • Markieren Sie den Text im Feld "Global Z" und drücken Sie "0" auf der Tastatur und drücken Sie danach Enter
    • Geben Sie "FreeCAD" (ohne Anführungszeichen) im Eingabefeld ein und drücken Sie Enter
    • Wählen Sie eine Höhe von 5 mm
    • Wählen Sie Verfolgung von 0 mm
    • nun müssen Sie den Pfad zu einer TTF-Schriftart angeben (z.B. die "Arial"-Schriftart)
    • Nach dem Drücken von Enter wird das Draft-Shapestring-Objekt in der 3D-Ansicht und in der Baumansicht erstellt

4. Switch to the Draft Workbench.

4.1. Make sure nothing is selected in the tree view.
4.2. Establish the working plane to XY (Top) by clicking on SelectPlane and pressing Top (XY).

5. Insert the text "FreeCAD".

5.1. Press on ShapeString.
5.2. Change X to 0 mm.
5.3. Change Y to 0 mm.
5.4. Change Z to 0 mm.
5.5. Or press Reset point.
5.6. Change String to FreeCAD; change Height to 5 mm; change Tracking to 0 mm.
5.7. Make sure Font file points to a valid font, for example, /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf. Press the ellipsis ... to open the operating system's dialog to find a font.
5.8. Press OK. This will create a ShapeString object.
5.9. Recompute the document by pressing Refresh.
5.10. In the tree view, select ShapeString, in the View tab change the value of Line Width to 2.0.
5.11. In the tree view, select Chamfer, in the View tab change the value of Visibility to false, or press Space in the keyboard. This will hide the object, so you can see the ShapeString better.
5.12. To see the ShapeString from above change the view by pressing Top (XY), or 2 in the keyboard.
5.13. To restore the view to isometric, press View isometric, or 0 in the keyboard.

Text created as a ShapeString, that is, as a collection of edges in a plane.

Erstellen von 3D-Text

  • Wechseln Sie in den Arbeitbereich "Part"
  • Stellen Sie sicher, dass das Draft-Shapestring-Objekt in der Baumansicht ausgewählt ist
  • Benutzen Sie das Part-Extrude-Werkzeug mit den Parametern
    • extrude Z=1 mm
    • Stellen Sie sicher, dass "Erstelle Festkörper" angewählt ist
  • Stellen Sie sicher, dass das Objekt "Extrude" in der Baumansicht ausgewählt ist und drücken Sie die Leertaste, um es einzublenden

6. Switch back to the Part Workbench.

6.1. In the tree view, select ShapeString, then press Extrude.
6.2. In the Extrude task panel go to Direction, choose Along normal; in Length, set Along to 1 mm; also tick the Create solid option.
6.3. Press OK. This will create an Extrude object.
6.4. In the tree view, select Extrude, in the View tab change the value of Line Width to 2.0.

Text created as a ShapeString, and turned into a solid by extrusion.

Erstellen einer Skizze zur Positionierung

  • Wechseln Sie in den Arbeitsbereich "Skizze"
  • Stellen Sie sicher, dass das Objekt "chamfer" in der Baumansicht ausgewählt ist und drücken Sie die Leertaste, um es einzublenden
  • Wählen Sie die geneigte Fläche, die durch die Fasen-Operation entstanden ist, in der 3D-Ansicht aus
  • Klicken Sie auf zum Einfügen einer neuen Skizze
  • Zeichnen Sie eine (z.B. horizontale oder vertikale) Linie, die Länge ist nicht wichtig
  • Legen Sie den Abstand eines der Linienendpunkte zum Nullpunkt mit +2,5 mm vertikalem Abstand und +2 mm horizontalem Abstand zum Ursprung fest
  • Schließen Sie die Skizze

Now we will draw a simple sketch that will be used as auxiliary geometry to position the ShapeString extrusion.

7. In the tree view, select Extrude, and press Space in the keyboard to make it invisible.

8. Switch to the Sketcher Workbench.

9. In the tree view, select Chamfer, and press Space in the keyboard to make it visible.

9.1. Choose the sloped face created by the chamfer operation (Face3).
9.2. Click on NewSketch. In the Sketch attachment dialog, select FlatFace, and press OK.
9.3. The view should adjust automatically so that the camera is parallel to the selected face.
9.4. Draw a horizontal line in a general position on top of the face. The length is not important; we are just interested in its position.
9.5. Constrain the left endpoint to be 2.5 mm away from the local X axis and from the local Y axis, using ConstrainDistanceX and ConstrainDistanceY.
9.6. Since the sketch is just an auxiliary object, we don't need to have it fully constrained. You can do this if you wish by assigning a fixed distance, say, 20 mm, again with ConstrainDistanceX.
9.7. Close the sketch.

Line being created with the sketcher, with constraints.

Sketch line created on top of the solid face, to be used as reference guide for positioning the extruded text.

Positionierung von 3D-Text im 3D Raum

  • Stellen Sie sicher, dass das Objekt "Extrude" in der Baumansicht ausgewählt ist und drücken Sie die Leertaste, um es einzublenden
  • Stellen Sie sicher, dass das Objekt "Extrude" in der Baumansicht ausgewählt ist
  • Fügen Sie ein inkrementelles Placement hinzu, Rotationsachse Z=90°
  • Fügen Sie ein inkrementelles Placement hinzu, Rotationsachse Y=45°
  • Wechseln Sie in den Arbeitsbereich "Draft"
  • Wechseln Sie in den Draht-Modus
  • Stellen Sie sicher, dass nur der Fangmodus "Endpunkte" ausgewählt ist
  • Wählen Sie das "Extrude"-Objekt aus
  • Klicken Sie auf
  • Klicken SIe in der 3D-Ansicht auf den obersten linken Punkt des Extrude-Objektes (1) und dann auf den positionierten Punkt in der Skizze (2)

10. In the tree view, select Extrude, and press Space in the keyboard to make it visible.

11. In the tree view, select Extrude, in the Data tab of the property editor, click on the Placement value so the ellipsis button ... appears on the right.

11.1. Tick the option Apply incremental changes.
11.2. Change the Rotation to Rotation axis with angle; Axis to Z, and Angle to 90 deg, then click on Apply. This will apply a rotation around the Z-axis, and will reset the Angle field to zero.
11.3. Change the Rotation to Rotation axis with angle; Axis to Y, and Angle to 45 deg, then click on Apply. This will apply a rotation around the Y-axis, and will reset the Angle field to zero.
11.4. Click on OK to close the dialog.

12. Switch again to the Draft Workbench.

12.1. Switch to "Wireframe" draw style with View → Draw style Wireframe, or press the Wireframe button in the view toolbar. This will allow you to see the objects behind other objects.
12.2. Make sure the Draft Snap "Snap to endpoint" method is active. This can be done from the menu Draft → Snapping → File:Draft ToggleSnap.svg Toggle On/Off, and then File:Snap Endpoint.svg Endpoint, or by pressing the File:Draft ToggleSnap.svg ToggleSnap and File:Snap Endpoint.svg Snap endpoint buttons in the Snap toolbar.

13. In the tree view, select Extrude.

13.1. Click on Move.
13.2. In the 3D view click on the upper left corner point of the Extrude object (1), and then click on the leftmost point in the line drawn with the sketcher (2).
13.3. If File:Snap Endpoint.svg Snap endpoint is active, as soon as you move the pointer close to a vertex, you should see that it attaches to it exactly.
Note: if you have problems snapping to vertices, make sure only the File:Snap Endpoint.svg Snap endpoint method is enabled. Having multiple snapping methods active at the same time may make it difficult to select the right feature.
13.4. The extruded text should now be inside the body of the Fillet object.

The extruded ShapeString should be moved to the position of the sketched line that lies on the face of the base body.

Extruded ShapeString positioned in the Fillet.

Einen vertieften Text herstellen

  • Wechseln Sie in den Arbeitsbereich "Part"
  • Wechseln Sie in den "Original"-Ansichtsmodus
  • Wählen Sie den 3D-Text ("extrude") und dann zusätzlich das Basis-Objekt ("chamfer") in der Baumansicht aus
  • Fügen Sie eine boolsche Verschneidung durch Klick auf hinzu
  • Stellen Sie sicher, dass das Objekt "Sketch" in der Baumansicht ausgewählt ist
  • Drücken Sie die Leertaste, um es auszublenden
  • Klicken Sie auf um in die axometrische Ansicht zu wechseln
  • Klicken Sie auf um auf Alles zu zoomen
  • fertig ...

14. Switch back to the Part Workbench.

14.1. Switch to "As is" draw style with View → Draw style As is, or press the As is button in the view toolbar. This will show all objects with the normal shading and color.
14.2. In the tree view, select Sketch, and press Space in the keyboard to make it invisible.

15. In the tree view select Chamfer first, and then Extrude.

15.1. Then press Cut. This will create a Cut object. This is the final object.
Note: the order in which you select the objects is important for the cut operation. The base object is selected first, and the subtracting object comes at the end.
15.2. In the tree view, select Cut, in the View tab change the value of Line Width to 2.0.

Final model of a filleted cube, with carved text created from a ShapeString, Extrude, and boolean Cut operations.

Engraving 3D text with the PartDesign Workbench

A similar process as described above can be done with the PartDesign Workbench.

  1. Create the Draft ShapeString first.
  2. Create a PartDesign Body, make it active, and add a base solid by adding primitives, or using a Sketch and extruding it with PartDesign Pad.
  3. Move the ShapeString object into the active body.
  4. Attach the ShapeString object to one of the faces of the solid, or to a PartDesign Plane, using Part Attachment.
  5. Now create a PartDesign Pad or a PartDesign Pocket from the ShapeString, in order to produce an additive or a subtractive feature of the base body, respectively.

See the forum thread, How to use ShapeStrings in PartDesign.

Bemerkungen

  • um einen gebogenen Text herzustellen kann man das Makro Circular Text benutzen
  • um Text aus Inkscape zu importieren schauen Sie sich bitte das Tutorial Importing text from inkscape tutorial an
  • Extrusion des Shapestring-Textes kann auch mit dem Pad-Werkzeug aus dem Arbeitsbereich "Part Design" erfolgen
  • Bedenken Sie bitte, dass das DraftShapestring-Objekt keiner Fläche zugewiesen werden kann, somit ist keine Taschen-Funktion möglich