# The OpenEmbroidery software: a free machine embroidery design interface

OpenEmbroidery software is a part of the OpenEmbroidery system wich include OSHW OpenEmbroidery module and the [openembroidery.com](http://openembroidery.com) website

## Important

This software is in an early-stage development status, not yet in alpha version (core functionnalities).
There is no real hmi nor buttons yet, more details below under [Current HMI](#CurrentHMI).

## Prerequisites to build

  * Make tool
  * Qt development tools and libraries (Qt5 core with openGL support, qmake)
  * libpakal (included)

## License

OpenEmbroidery is released as opensource software under CeCILL licence

## Build

  * With Qt creator: open oe_designer.pro with Qt creator, select 'Release' build, compile and run with 'Ctrl+R'
  * From command line:
```
mkdir build
cd build
qmake CONFIG+=release -o Makefile ../oe_designer.pro
make (or mingw32-make on windows)
```

## <a name="CurrentHMI"/>Current HMI

Your view is an embroidery XY plan of infinite size,
you can import vector drawing (svg format, from Inkscape
or Adobe Illustrator) and move or resize them. These
drawings will be the skeleton of your embroidery.

A virtual frame of 10x10cm is displayed on your drawing
and let you evaluate the actual size of your design and
your stitches. First grid has squares of 1x1cm, and when
you zoom in a second grid of 1x1mm appears.

Based on your drawing, you will do stitches actions,
you start one by pressing the corresponding key binding
and go to next action step by pressing Enter. Each
step is action-specific and described below.

The software only use the curves of your svg design,
it can't handle filling or svg curve patterns.

There is some tools to basicaly edit your design but
this is only for adjustment, this is not a vector dawing software.


### View: translate, zoom in and out

  * Translate view: hold mouse middle button, then drag and release

  * Zoom in: mouse scroll up
  * Zoom out: mouse scroll down

  * Look a selection: home key
Note: zoom is centered on screen center, not on mouse !

### Element selection

  * Select all elements in an area: mouse left button and drag, everything fully inside selecting rectangle is taken
  * Select with a simple left click: svg curves or every kind of stitches. replace the current selection.

  * Add to selection: hold Shift when selecting
  * Remove from selection: hold Ctrl when selecting

A red rectangle surround selection.

Selected elements are highlighted and show their controlers.

### Move, resize and delete elements

  * Delete: press Suppr key

Svg curves selected can be moved and resized at your ease
with handles on your selection rectangle:

  * Move: click and drag the red cross on top left corner
  * Resize: click and drag the red arrow on top left corner

### Curve edit, point move, vector edit

SVG curves show their control points when selected. You can move them by click and drag it

Stitches show different controller based on their type:
  * Line: start (red arrow that show the direction) and end (red point) of every curves segment that is used as guide for the stitch.
There is also a perpendicular line with two arrow that can be used to ajust the width of the stitch (work only with 2d pattern)
  * Birail: start (red arrow) and end (red point) of the curves segment that is used as guide for the stitch.
There is two guide line for this stitch
  * Link: a plus symbol at the middle of the stitch that let you add intermediate points by click and drag it.
Every added point shows a minus controller to remove it and can be moved by click and drag. those intermediate points are very usefull for hidding links under the next stitch
  * Fill: start (red arrow) and end (red point) of the curves segment that is used as contour for the filling.
control points for the fill grid (for curved filling). **WARNING! this tool is under active development, it doesn't really work for now.**
If you move guide lines of a fill stitch without selected it too his grid control point will stay in place.
If the contour of a fillstitch is not fully contained inside his control grid it will fail to be generated.

### Save/load and undo

Current state of save and load:

  * Save as: Ctrl+s, choose the target file in file dialog
  * Load: Ctrl+o, choose the file from file dialog
  * Save: not supported yet, use 'Save as' function

Warning: there is no confirmation of any kind: unsaved documents will be lost during a load, tab close or application close without notice!
Note: this file format is not yet finalized nor decided. This means your current file **will** be unusable one day. It will be stable with the beta version.

  * Undo: Ctrl+z, undo last action. Known bug: actions **MUST** be finished, don't undo while creating a stitch !
if you make a mistake during stitch creation, you can just finish it then delete it with del key

### Action stich: line

A line stitch is an embroidery following svg lines.
This stitch embroid a pattern along svg lines segments and can jump between thems.

Press l key to activate line stitch mode. A red dot
now follow your cursor and find the nearest curve to snap on.
You can mark the line segment you want with a click hold, drag and drop.
You can jump to another curve as you like, when you have finished
just press enter.

Your stitch is now created, but you can adjust starts
and ends of segments by click and drag them if you want to.

Default stitch pattern is a straight line (standard point), but you can try
the nine available patterns by selecting your stitch and
press keypad buttons 1 to 9. (keypad only, **not** other number keys).
the 2nd key represent triple line stitch so you will not see the difference with standard point (points are superposed)

if a svg curve is open it display a blue dot. you can switch beetween open and closed curve with the C key.
when a curve is closed there is two path to join start and end point of the segment. The software use the direction of the first move of the drag during creation.
The R curve hold during start or end move switch the path. Exemple: click and drag start point (red arrow), hold R key, drop the start point, release the key.
Those keys are working with every stitch segment editing.

keypad plus and minus keys are used to change width and length of the stitch pattern.
used as is those key enlarge/reduce the stitch lenght but if you hold the control key it act on his width.


### Action stich: birail

Birail creation is near line creation but there wil be two lines to create.
Press b key to activate birail stitch mode. A green dot act as in line stitch creation. use the same procedure to create the first line.
When you will validate this first line with enter key the sofware will ask you to create the second one with the well known red dot.
As soon as you start to create the second line the stitch will be shown as a zigzag point between those two curves.
Validate the creation with enter key at the end of this second line definition.

### link stitch
link stitches are automatically created between two stitches. It represent the jump between two stitches and add long stitches (0.5cm) to prevent fabric or needle deformation.
You can edit them by adding intermediate points but the creation is automatic.

### Action stich: fill

**WARNING! this tool is under active development, it doesn't really work for now.**

To try this new stitch type press the F key then define your fill contour (like in linestitch creation)
you can switch between pattern and change width and length with the same keys as in linestitch.

