SVG/cs

Popis

SVG is the abbreviation of Scalable Vector Graphics, a vectorized image format for two-dimensional graphics.

Vector-based formats such as SVG are very useful in technical drawing programs, like FreeCAD, because an SVG image can be scaled to any size without losing its shape or amount of details. The SVG can be scaled to any required resolution and converted to bitmap formats like PNG or JPEG for printing.

The SVG image is described in an XML-type language, which means that it can be opened and edited with a simple text editor to make changes. Due to its text-based nature, the file can also be searched, indexed, and compressed easily. This SVG markup language is an open standard developed by the World Wide Web Consortium (W3C) since 1999. This means that an SVG file should be read and interpreted in the same way by compliant viewers and drawing applications.

For more information on the SVG format see: Scalable Vector Graphics.

SVG in FreeCAD

FreeCAD is primarily a 3D modeling application, and thus doesn't have many 2D drawing tools. On the other hand FreeCAD relies on SVG files:

In addition FreeCAD can import SVG files into 3D space:

Finally FreeCAD has tools exporting to SVG:

Std Import and Std Export handle SVG related 3D import and export tasks, they use the Draft SVG function of the Draft module to convert 3D geometry from/to the SVG format.

Usage

Here we have additional descriptions focussed on SVG files for Std Import and Std Export.

3D Import

  1. Make there is an activate document.
  2. Select the File → Import... option from the menu.
  3. In the file browser that appears do one of the following:
    • With the default settings unchanged:
      1. Select a file and press the Open button.
      2. The Select Module dialog appears. From Open svg as select:
        • Image formats (FreeCAD) to import the SVG file as an image plane.
        • SVG as geometry (importSVG) to import the SVG file as separate shapes.
      3. Press the Open button to close the dialog and finish the tool.
    • Optionally select the SVG as geometry filter option.
    1. Select the desired SVG file and press the Open button to finish the tool.
  4. Depending on the selected options an image plane or several shape and text objects are added to the document.

3D Export

Select one or more shapes.

  1. Select the File → Export... option from the menu.
  2. In the file browser that appears select the Flattened SVG filter option.
  3. Enter a filename.
  4. Select a folder to save the SVG file.
  5. Press the Save button to close the browser and finish the tool.

2D Import and Export

The descriptions of the 2D tools are well focussed on SVG files so that linking the relevant pages is sufficient here.

Related