1
0
Fork 0

chore(markdown): Updated plugin docs

This commit is contained in:
Joost De Cock 2021-12-28 09:09:27 +01:00
parent 6c2977bf0d
commit 01cf9d5254
7 changed files with 195 additions and 6 deletions

View file

@ -0,0 +1,45 @@
---
title: "@freesewing/plugin-export-dxf"
---
The **@freesewing/plugin-export-dxf** plugin exports your pattern
to [the DXF file format](https://en.wikipedia.org/wiki/AutoCAD_DXF).
It will attach the [the postDraft lifecycle
hook](/reference/api/hooks/postdraft) to add a `renderDxf()` method
to the pattern object.
<Warning>
##### Maintainer note: This is de-facto unmaintained
This plugin is de-facto unmaintained because I have no use for it.
I keep it around in case it might be useful, and I've used it
myself for exporting to different software.
The being said, DXF is a poor choice as a file format for storing sewing patterns.
For one thing, it only allows straight lines, no curves. Yikes!
</Warning>
## Installation
```sh
npm install @freesewing/plugin-export-dxf
```
## Usage
Like all [run-time plugins](/guides/plugins/types-of-plugins#run-time-plugins), you
load them by by passing them to the `use()` method of an instatiated pattern.
That method is chainable, so if you have multiple plugins you can just chain them together.
```js
import Aaron from "@freesewing/aaron";
import theme from "@freesewing/plugin-theme";
const pattern = new Aaron().use(theme);
```
After calling `pattern.draft()` you will be able to call `pattern.renderDxf()`
which will return the Dxf output.