# Convert to Dashes

This extension can be used to create bridges / tabs for a laser cutter job. We can define a custom line style (dashed) and convert it using this extension.

<p class="callout info">See also [Lasercut bridges without using extensions](https://old.stadtfabrikanten.org/display/IFM/Lasercut+bridges+without+using+extensions) and [Create Links (Breakaway Connectors)](https://wiki.stadtfabrikanten.org/books/fablab-chemnitz/page/create-links-breakaway-connectors).</p>

# Example 1

### Draw some path

[![grafik.png](https://wiki.stadtfabrikanten.org/uploads/images/gallery/2025-05/scaled-1680-/uvkY0SzT8ybLWEfq-grafik.png)](https://wiki.stadtfabrikanten.org/uploads/images/gallery/2025-05/uvkY0SzT8ybLWEfq-grafik.png)

### Change stroke style to dashes

[![grafik.png](https://wiki.stadtfabrikanten.org/uploads/images/gallery/2025-05/scaled-1680-/PtRksgrAJFESNuKN-grafik.png)](https://wiki.stadtfabrikanten.org/uploads/images/gallery/2025-05/PtRksgrAJFESNuKN-grafik.png) [![grafik.png](https://wiki.stadtfabrikanten.org/uploads/images/gallery/2025-05/scaled-1680-/fC00Z7DkTM7eTWEB-grafik.png)](https://wiki.stadtfabrikanten.org/uploads/images/gallery/2025-05/fC00Z7DkTM7eTWEB-grafik.png)

### Run extension

Each "virtual" dash will be split into a real segmented line

[![grafik.png](https://wiki.stadtfabrikanten.org/uploads/images/gallery/2025-05/scaled-1680-/VSgSxOoLBUtYnuWP-grafik.png)](https://wiki.stadtfabrikanten.org/uploads/images/gallery/2025-05/VSgSxOoLBUtYnuWP-grafik.png)

## Example 2

Set the document units to mm

### Draw some curve and measure it's length in mm

[![grafik.png](https://wiki.stadtfabrikanten.org/uploads/images/gallery/2025-05/scaled-1680-/i1qE53ujJzzO0nsO-grafik.png)](https://wiki.stadtfabrikanten.org/uploads/images/gallery/2025-05/i1qE53ujJzzO0nsO-grafik.png)

### Set custom line style ("Dashes" → "Custom")

[![grafik.png](https://wiki.stadtfabrikanten.org/uploads/images/gallery/2025-05/scaled-1680-/WYfOMQsD3UqU5eOu-grafik.png)](https://wiki.stadtfabrikanten.org/uploads/images/gallery/2025-05/WYfOMQsD3UqU5eOu-grafik.png)

### Create a gap

Edit XML style to create a 2 mm gap. In the example line length is 168.71 mm. If we want a single 2 mm gap we set stroke dash array to 168.71mm - 2mm = 166.71mm

[![grafik.png](https://wiki.stadtfabrikanten.org/uploads/images/gallery/2025-05/scaled-1680-/OdrtkbmLJ8jZtFzz-grafik.png)](https://wiki.stadtfabrikanten.org/uploads/images/gallery/2025-05/OdrtkbmLJ8jZtFzz-grafik.png)

[![grafik.png](https://wiki.stadtfabrikanten.org/uploads/images/gallery/2025-05/scaled-1680-/Eu7Yty0PP5b4O4B0-grafik.png)](https://wiki.stadtfabrikanten.org/uploads/images/gallery/2025-05/Eu7Yty0PP5b4O4B0-grafik.png)

If we want three gaps in a path with length of 168.71 mm and a gap length of 2 mm we set the stroke-dasharray to: 80.355 2.0 → because 3 \* 80.355 mm + 2 \* 2.0 mm = 168.71 mm

[![grafik.png](https://wiki.stadtfabrikanten.org/uploads/images/gallery/2025-05/scaled-1680-/BRPwBg7XO304cA3G-grafik.png)](https://wiki.stadtfabrikanten.org/uploads/images/gallery/2025-05/BRPwBg7XO304cA3G-grafik.png)

If we want three gaps in a path with length of 168.71 mm and a gap length of 2 mm we set the stroke-dasharray to: 50.236 2.0 → because 3 \* 50.236 mm + 3 \* 2.0 mm = 168.71 mm

[![grafik.png](https://wiki.stadtfabrikanten.org/uploads/images/gallery/2025-05/scaled-1680-/AUE6v1gaCIJ0xG20-grafik.png)](https://wiki.stadtfabrikanten.org/uploads/images/gallery/2025-05/AUE6v1gaCIJ0xG20-grafik.png)

# Run the "Convert to Dashes" extension